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

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Euler Taveira <euler(at)eulerto(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()
Date: 2023-12-18 10:36:25
Message-ID: 3c8b4a23-2176-4104-94e9-76f92d9bb455@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 12/13/23 3:33 PM, Michael Paquier wrote:
> On Tue, Dec 12, 2023 at 04:54:32PM -0300, Euler Taveira wrote:
>> Couldn't it give up before starting if you apply your patch? My main concern is
>> due to a slow system, the walrcv_connect() took to long in WalReceiverMain()
>> and the code above kills the walreceiver while in the process to start it.
>> Since you cannot control the hardcoded WALRCV_STARTUP_TIMEOUT value, you might
>> have issues during overload periods.
>
> Sounds like a fair point to me,

Thanks for looking at it! I'm not sure about it, see my comment in [1].

> Another thing that I'm a bit surprised with is why it would be OK to
> switch the status to STREAMING only we first_stream is set, discarding
> the restart case.

Yeah, that looks like a miss on my side. Thanks for pointing out!

Please find attached v2 addressing this remark.

[1]: https://www.postgresql.org/message-id/c76c0a65-f754-4614-b616-1d48f9195745%40gmail.com

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v2-0001-move-walrcv-walRcvState-assignment-to-WALRCV_STRE.patch text/plain 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-12-18 10:40:06 Re: planner chooses incremental but not the best one
Previous Message Drouvot, Bertrand 2023-12-18 10:18:10 Re: Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()