Re: [HACKERS] Update low-level backup documentation to match actualbehavior

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: [HACKERS] Update low-level backup documentation to match actualbehavior
Дата
Msg-id 294064cc-b6de-3290-f5e6-67ba717c5f30@pgmasters.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Update low-level backup documentation to match actual behavior  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Update low-level backup documentation to match actual behavior  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Hi Michael,

Thanks for reviewing!

On 8/29/17 9:44 PM, Michael Paquier wrote:
> On Tue, Aug 29, 2017 at 10:59 PM, David Steele <david@pgmasters.net> wrote:
>>
>> Attached is the 9.6 patch.  It required a bit more work in func.sgml
>> than I was expecting so have a close look at that.  The rest was mostly
>> removing irrelevant hunks.
> 
> +     switch to the next WAL segment.  On a standby, it is not possible to
> +     automatically switch WAL segments, so you may wish to run
> +     <function>pg_switch_wal</function> on the primary to perform a manual
> +     switch. The reason for the switch is to arrange for
> [...]
> +    WAL segments have been archived. If write activity on the primary
> is low, it
> +    may be useful to run <function>pg_switch_wal</> on the primary in order to
> +    trigger an immediate segment switch of the last required WAL
> It seems to me that both portions are wrong. There is no archiving
> wait on standbys for 9.6, and 
I think its clearly stated here that pg_stop_backup() does not wait for
WAL to archive on a standby.  Even, it is very important for the backup
routine to make sure that all the WAL *is* archived.

> pg_stop_backup triggers by itself the
> segment switch, so saying that enforcing pg_switch_wal on the primary
> is moot. 

pg_stop_backup() does not perform a WAL switch on the standby which is
what this sentence is referring to.  I have separated this section out
into a new paragraph to (hopefully) make it clearer.

> pg_switch_xlog has been renamed to pg_switch_wal in PG10, so
> the former name applies.

Whoops!

New patch is attached.

Thanks,
-- 
-David
david@pgmasters.net

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] segment size depending *_wal_size defaults (wasincreasing the default WAL segment size)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] [BUGS] [postgresql 10 beta3] unrecognized node type: 90