From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>, Andy Fan <zhihuifan1213(at)163(dot)com> |
Subject: | Re: Annoying warning in SerializeClientConnectionInfo |
Date: | 2025-08-12 14:31:32 |
Message-ID: | jtpkpnn4wds6hxi3sde5wwzkn5g3rcmjva6a4wagca5tu5c6j2@myis4xpnjkwv |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2025-08-11 16:30:30 -0700, Jacob Champion wrote:
> On Mon, Aug 11, 2025 at 3:52 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > And the warning is right. Not sure why a new compiler is needed, IIRC this
> > warning is present in other cases with older compilers too.
>
> Probably
> https://github.com/gcc-mirror/gcc/commit/0eac9cfee
> which was committed last month.
>
> Andy Fan reported this as well [1] but I did not see it at the time.
> :( Sorry, Andy, my email had changed.
>
> > The most obvious fix is to slap on a PG_USED_FOR_ASSERTS_ONLY. However, we so
> > far don't seem to have used it for function parameters... But I don't see a
> > problem with starting to do so.
>
> WFM. Do you have any opinions on our use of maxsize in general?
It's somewhat odd.
> I think there are other serialization functions that just assert, but it
> looks like some are more actively throwing errors if there's not enough
> space. Given the subject matter here I'm wondering if we should take the
> stricter approach.
I think it'd be fine to error out here. For many asserts we don't want them in
real builds because they'd (in very small increments) make the code slower and
bigger. But this is very very far from a hot path...
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Benoit Tigeot | 2025-08-12 14:54:10 | pg_stat_statements: Add `calls_aborted` counter for tracking query cancellations |
Previous Message | Andres Freund | 2025-08-12 14:24:15 | Re: Adding basic NUMA awareness |