Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()
Дата
Msg-id 11ff040c-2eca-421a-b74a-0e99937c2d93@gmail.com
обсуждение исходный текст
Ответы Re: Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()  ("Euler Taveira" <euler@eulerto.com>)
Список pgsql-hackers
Hi hackers,

Currently walrcv->walRcvState is set to WALRCV_STREAMING at the
beginning of WalReceiverMain().

But it seems that after this assignment things could be wrong before the
walreicever actually starts streaming (like not being able to connect
to the primary).

It looks to me that WALRCV_STREAMING should be set once walrcv_startstreaming()
returns true: this is the proposal of this patch.

I don't think the current assignment location is causing any issues, but I
think it's more appropriate to move it like in the attached.

Looking forward to your feedback,

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: typedefs.list glitches
Следующее
От: "Euler Taveira"
Дата:
Сообщение: Re: Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()