Re: allow online change primary_conninfo

Поиск
Список
Период
Сортировка
От Sergei Kornilov
Тема Re: allow online change primary_conninfo
Дата
Msg-id 34084371566985786@sas1-0a6c2e2b59d7.qloud-c.yandex.net
обсуждение исходный текст
Ответ на Re: allow online change primary_conninfo  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: allow online change primary_conninfo  (Fujii Masao <masao.fujii@gmail.com>)
Re: allow online change primary_conninfo  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Hello

Updated patch attached. (also I merged into one file)

> + <para>
> + WAL receiver will be restarted after <varname>primary_slot_name</varname>
> + was changed.
>           </para>
> The sentence sounds strange. Here is a suggestion:
> The WAL receiver is restarted after an update of primary_slot_name (or
> primary_conninfo).

Changed.

> The comment at the top of the call of ProcessStartupSigHup() in
> HandleStartupProcInterrupts() needs to be updated as it mentions a
> configuration file re-read, but that's not the case anymore.

Changed to "Process any requests or signals received recently." like in other places, e.g. syslogger

> pendingRestartSource's name does not represent what it does, as it is
> only associated with the restart of a WAL receiver when in streaming
> state, and that's a no-op for the archive mode and the local mode.

I renamed to pendingWalRcvRestart and replaced switch with simple condition.

> So when shutting down the WAL receiver after a parameter change, what
> happens is that the startup process waits for retrieve_retry_interval
> before moving back to the archive mode. Only after scanning again the
> archives do we restart a new WAL receiver.

As I answered earlier, here is no switch to archive or wal_retrieve_retry_interval waiting in my patch. I recheck on
currentrevision too:
 

2019-08-28 12:16:27.295 MSK 11180 @ from  [vxid: txid:0] [] DEBUG:  sending write 0/30346C8 flush 0/30346C8 apply
0/30346C8
2019-08-28 12:16:27.493 MSK 11172 @ from  [vxid: txid:0] [] LOG:  received SIGHUP, reloading configuration files
2019-08-28 12:16:27.494 MSK 11172 @ from  [vxid: txid:0] [] LOG:  parameter "primary_conninfo" changed to "host='/tmp'
port=5555sslmode=disable sslcompression=0 gssencmode=disable target_session_attrs=any"
 
2019-08-28 12:16:27.496 MSK 11173 @ from  [vxid:1/0 txid:0] [] LOG:  The WAL receiver is going to be restarted due to
changeof primary_conninfo
 
2019-08-28 12:16:27.496 MSK 11176 @ from  [vxid: txid:0] [] DEBUG:  checkpointer updated shared memory configuration
values
2019-08-28 12:16:27.496 MSK 11180 @ from  [vxid: txid:0] [] FATAL:  terminating walreceiver process due to
administratorcommand
 
2019-08-28 12:16:27.500 MSK 11335 @ from  [vxid: txid:0] [] LOG:  started streaming WAL from primary at 0/3000000 on
timeline1
 
2019-08-28 12:16:27.500 MSK 11335 @ from  [vxid: txid:0] [] DEBUG:  sendtime 2019-08-28 12:16:27.50037+03 receipttime
2019-08-2812:16:27.500821+03 replication apply delay 0 ms transfer latency 0 ms
 

No "DEBUG:  switched WAL source from stream to archive after failure" messages, no time difference
(wal_retrieve_retry_interval= 5s).
 

regards, Sergei
Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Crash in BRIN summarization
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join