Re: Annoying warning in SerializeClientConnectionInfo

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org, Andy Fan <zhihuifan1213@163.com>
Date: 2025-08-13T03:54:27Z
Lists: pgsql-hackers

Attachments

On Tue, Aug 12, 2025 at 01:44:32PM -0700, Jacob Champion wrote:
> I don't think I understand what you mean by this? I don't want to get
> rid of the check, but I was wondering if we could strengthen the
> behavior on HEAD to raise an ERROR regardless of whether assertions
> are enabled or not. Similar to the approach taken by
> SerializeComboCIDState().

Yeah, we could do that as well.  I was looking at all routine calls,
but did not notice the elog(ERROR) thrown in this case for the
combocid case.

> I think the PG_USED_FOR_ASSERTS_ONLY fix is preferable for backport,
> so I don't want to get in the way of that approach.

The attached has been working for me.  Thoughts?
--
Michael

Commits

  1. Fix compilation warning with SerializeClientConnectionInfo()