Re: Don't use pq_putmessage in socket comm function

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Don't use pq_putmessage in socket comm function
Date: 2026-07-22 08:29:53
Message-ID: amB_gJ5m8SaPL3hC@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 22, 2026 at 10:16:53AM +0200, Anthonin Bonnefoy wrote:
> However, if a custom PqCommMethods is defined, any call to
> socket_putmessage_noblock will then loop to the custom putmessage.
>
> This patch fixes the issue by directly using socket_putmessage in
> socket_putmessage_noblock.

Yes, that's strange. It seems like a mistake going down to 9.5, as of
2bd9e412f92b where socket_putmessage_noblock() has been introduced,
leaving the pq_putmessage() around.

Thoughts or opinions?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-07-22 08:41:10 Re: Unexpected behavior after OOM errors
Previous Message Antonin Houska 2026-07-22 08:28:01 Re: Allow progress tracking of sub-commands