pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Fan <zhihuifan1213@163.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jacob Champion <jchampion@timescale.com>
Cc: Drouvot, Bertrand <bdrouvot@amazon.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: sfrost@snowman.net <sfrost@snowman.net>
Cc: rjuju123@gmail.com <rjuju123@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: andres@anarazel.de <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
Date: Thu, 15 Feb 2024 16:53:30 +0800
Message-ID: <875xyqhzs6.fsf@163.com> (raw)
In-Reply-To: <YwWjqSPH7WtSrjrF@paquier.xyz>
References: <127bd019-04f0-313c-551c-d949cdc4ad50@amazon.com>
	<YvjHFPs2yEDiMLVU@paquier.xyz>
	<520bd3ce-334b-b9c2-2130-858fb04ce56f@amazon.com>
	<CAAWbhmgJ-5YHyOO4ioa-q1bDRexiwMBFru6jJVmV+ShUx_0yeQ@mail.gmail.com>
	<2541c086-e370-d114-69a7-b48b05b25471@amazon.com>
	<YwNpWPCx63D8R8gG@paquier.xyz>
	<CAAWbhmjmwz+QYVTANpmOayfST4x1ey1ZALpgjNwqTeMeH9Ssew@mail.gmail.com>
	<YwQ6r35/uNC2lm26@paquier.xyz>
	<c4800477-c877-25ab-3ba8-ab53a1510831@amazon.com>
	<bbf2b922-4ff7-5c30-e3ef-2a8bdcdd1116@timescale.com>
	<YwWjqSPH7WtSrjrF@paquier.xyz>


Hi,

Michael Paquier <michael@paquier.xyz> writes:

> [[PGP Signed Part:Undecided]]
> On Tue, Aug 23, 2022 at 10:04:30AM -0700, Jacob Champion wrote:
>
> My main worry here is EXEC_BACKEND, where we would just use our own
> implementation of fork(), and it is a bad idea at the end to leave
> that untouched while we could have code paths that attempt to access
> it.  At the end, I have moved the initialization at the same place as
> where we set MyProcPort for a backend in BackendInitialize(), mainly
> as a matter of consistency because ClientConnectionInfo is aimed at
> being a subset of that.  And applied.

I found a compiler complaint of this patch. The attached fix that.

-- 
Best Regards
Andy Fan

Attachments:

v1-0001-Remove-the-parameter-maxsize-set-but-not-used-err.patch (text/x-diff, 988B) download From 9e8a3fb7a044704fbfcd682a897f72260266bd54 Mon Sep 17 00:00:00 2001 From: "yizhi.fzh" <yizhi.fzh@alibaba-inc.com> Date: Thu, 15 Feb 2024 16:46:57 +0800 Subject: [PATCH v1 1/1] Remove the "parameter 'maxsize' set but not used" error. maxsize is only used in Assert build, to make compiler quiet, it is better maintaining it only assert build. --- src/backend/utils/init/miscinit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 23f77a59e5..0e72fcefab 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -1050,7 +1050,9 @@ SerializeClientConnectionInfo(Size maxsize, char *start_address) Assert(maxsize >= sizeof(serialized)); memcpy(start_address, &serialized, sizeof(serialized)); +#ifdef USE_ASSERT_CHECKING maxsize -= sizeof(serialized); +#endif start_address += sizeof(serialized); /* Copy authn_id into the space after the struct */ -- 2.34.1

view thread (89+ messages)

Message-ID: <875xyqhzs6.fsf@163.com>
Permalink:  ../875xyqhzs6.fsf@163.com/
Also on:    postgresql.org/message-id/875xyqhzs6.fsf@163.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: zhihuifan1213@163.com, michael@paquier.xyz, jchampion@timescale.com, bdrouvot@amazon.com, mail@joeconway.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, rjuju123@gmail.com, andres@anarazel.de
  Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
  In-Reply-To: <875xyqhzs6.fsf@163.com>
  References: <127bd019-04f0-313c-551c-d949cdc4ad50@amazon.com> <YvjHFPs2yEDiMLVU@paquier.xyz> <520bd3ce-334b-b9c2-2130-858fb04ce56f@amazon.com> <CAAWbhmgJ-5YHyOO4ioa-q1bDRexiwMBFru6jJVmV+ShUx_0yeQ@mail.gmail.com> <2541c086-e370-d114-69a7-b48b05b25471@amazon.com> <YwNpWPCx63D8R8gG@paquier.xyz> <CAAWbhmjmwz+QYVTANpmOayfST4x1ey1ZALpgjNwqTeMeH9Ssew@mail.gmail.com> <YwQ6r35/uNC2lm26@paquier.xyz> <c4800477-c877-25ab-3ba8-ab53a1510831@amazon.com> <bbf2b922-4ff7-5c30-e3ef-2a8bdcdd1116@timescale.com> <YwWjqSPH7WtSrjrF@paquier.xyz> <875xyqhzs6.fsf@163.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox