Re: Set notice receiver before libpq connection startup - Mailing list pgsql-hackers

From Chao Li
Subject Re: Set notice receiver before libpq connection startup
Date
Msg-id 4974E7EE-5E95-456E-B79F-B26F4D7339E5@gmail.com
Whole thread
In response to Re: Set notice receiver before libpq connection startup  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Set notice receiver before libpq connection startup
List pgsql-hackers

> On May 28, 2026, at 13:22, Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Thu, May 28, 2026 at 9:40 AM Chao Li <li.evan.chao@gmail.com> wrote:
>>> The committed patch violates the .gitattributes whitespace rules:
>>>
>>> git show --check 06a5c3cdef02
>>>
>>> contrib/postgres_fdw/connection.c:651: indent with spaces.
>>> +                                                   /* expand_dbname = */ false);
>>>
>>> It is unfortunate that pgindent produces this layout that contradicts the git configuration.  (The current
formattingalso doesn't look like what I would produce in an editor, so I think git is right here.) 
>>>
>>> Maybe we could reformat this slightly to avoid that?  (unless someone wants to try to fix pgindent)
>
> Thanks for the report!
>
>
>> Ah, I was not aware of the whitespace rule. I think it was not pgindent; I made that change manually. I added “=”
becauseI thought it might read more fluently. 
>>
>> Attached is a fix for that.
>
> Thanks for the patch!
>
> I suspect the whitespace issue was caused by pgindent that I ran
> before committing the patch.
>
> -     /* expand_dbname = */ false);
> +    false /* expand_dbname */ );
>
> I think "/* expand_dbname = */ false" looks better. libpqwalreceiver.c
> also uses that comment style. So how about the attached v2 patch, which
> reformats the comment accordingly?
>
> After applying the v2 patch, I confirmed that neither "git show --check ..."
> nor pgindent reports any issues.
>
> Regards,
>
> --
> Fujii Masao
> <v2-0001-Fix-an-indentation-problem-in-postgres_fdw-connec.patch>

Oh, I misunderstood the problem. Nice to learn a new thing, I never knew git show check before. Yes, v2 passed “git
show--check d359d02a238”. 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Shinya Kato
Date:
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples
Next
From: Jakub Wartak
Date:
Subject: new connection establishment (pgbench --connect) slow with pgbouncer due to libpq/OpenSSL global thread contention