Re: Annoying warning in SerializeClientConnectionInfo
От | Jacob Champion |
---|---|
Тема | Re: Annoying warning in SerializeClientConnectionInfo |
Дата | |
Msg-id | CAOYmi+=UjAHzm0MXBvRCYf0Fz0OzgXh0K4wXM5aBdkV7Ei1T_w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Annoying warning in SerializeClientConnectionInfo (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: Annoying warning in SerializeClientConnectionInfo
|
Список | pgsql-hackers |
On Mon, Aug 11, 2025 at 7:34 PM Michael Paquier <michael@paquier.xyz> wrote: > And the rest was looking OK, so appending a > PG_USED_FOR_ASSERTS_ONLY in the declaration seems OK from here. If we're the first to use the attribute this way, I think I'd prefer to put it on the definition only. > I'd rather keep the sanity check on maxsize, even if it means to have > a tweak based on the size of SerializedClientConnectionInfo. 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(). 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. > Another thing that we can do is use an USE_ASSERT_CHECKING around the > variable getting set, but as far as I can see the > PG_USED_FOR_ASSERTS_ONLY in the function declaration should work fine. > If the buildfarm blurps on the first approach, we could always use the > second approach as fallback. Agreed. Thanks, --Jacob
В списке pgsql-hackers по дате отправления: