Re: Wrong usage of pqMsg_Close message code?

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: pavel(dot)stehule(at)gmail(dot)com
Cc: aleksander(at)timescale(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Wrong usage of pqMsg_Close message code?
Date: 2023-08-28 21:12:00
Message-ID: 20230829.061200.192005411012654565.t-ishii@sranhm.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> Hi Pavel,
>>
>> > There is message PqMsgClose, but this should be used from client side.
>> Here should be used PqMsg_CommandComplete instead?
>>
>> It seems so. This change was introduced in f4b54e1ed98 [1]:
>>
>> ```
>> --- a/src/backend/tcop/dest.c
>> +++ b/src/backend/tcop/dest.c
>> @@ -176,7 +176,7 @@ EndCommand(const QueryCompletion *qc, CommandDest
>> dest, bool force_undecorated_o
>>
>> len = BuildQueryCompletionString(completionTag, qc,
>>
>> force_undecorated_output);
>> - pq_putmessage('C', completionTag, len + 1);
>> + pq_putmessage(PqMsg_Close, completionTag, len + 1);
>>
>> case DestNone:
>> case DestDebug
>> ```
>>
>> It should have been PqMsg_CommandComplete.
>>
>> [1]:
>> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=f4b54e1ed98
>
>
> here is a patch - all tests passed

I think EndReplicationCommand needs to be fixed as well.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristen Raab 2023-08-28 21:49:41 Re: Allow specifying a dbname in pg_basebackup connection string
Previous Message Peter Geoghegan 2023-08-28 21:05:57 Re: Eager page freeze criteria clarification