Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNV0i-0001j7-JE for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 05:50:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNV0g-00067y-Fo for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 05:50:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNV0e-00067r-D6 for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 05:50:37 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNV0Z-00075C-7o for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 05:50:35 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B460E5C0112; Wed, 30 Sep 2020 01:50:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 30 Sep 2020 01:50:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=uez+qHybJ32eNMPT+3Qo+of81uu dxUsB2mepQgkg4eY=; b=bAfM4VbsHIEyxpePR6aRZbf0QFFf2zfHv5Su/iEo8RH 3Nk7+Qj3NGUslk2n9t1PR7qGxWiW+ILtQeqb9si/vknt+0MDgF0jYf53NAWFlUCc KcwKuEIfal3fGhw3dugbz81fgG2D6eiDk0m+IYpgaxdwrfRFryVuRDH2hc61TB2a b+hJTnE4cjC8ofM53dM+pzsPQ/uqocfwPcoVADf40OQ2VZMprsnmymjtXNKyr8yn xRZjpAZJcLr9ocG833/iimwCwZK/4n8WGSGGqUJSr66VJB8/P2tCgmPqVmvLSAx5 w0DyomdCq287Jr7BR1tCefHDEiz+SGLUwviw3TGyqjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=uez+qH ybJ32eNMPT+3Qo+of81uudxUsB2mepQgkg4eY=; b=uUQnjyBDZORnhBtBhhgCpo EXTW33G6baDqU1X8+cf9dMU9Y+f4vVfhEiEJ6VyC7Pm0Xm2sLPyP04pWV/lpLn+y BRebj9/32cBmWtrXa9ssRKV0GOcW1qpMZGKINa08pDKNu1hvBLmHjYJgdau6UeOY /CJrMPqAbHTKbkRg0/kc1EtJEJkaeRInQypUstbiG0UeUpddcmClDRCKoPmSnC1F ZI8FbeFKdZPEwcLL7DdWzVnLjMCKz7k4RZ7n8B1Qi1npXQdwkVmZWZ9RZB4bFNiH iuh6KayrGC4nwWugkzTFaAzn5IInr4oq7b9RCuc0VqKtbUMOUoRG8TAmqx0PGojA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrfedtgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecukfhppeduuddurddutddvrddukedtrd dukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id E2EB9328005A; Wed, 30 Sep 2020 01:50:27 -0400 (EDT) Date: Wed, 30 Sep 2020 14:50:25 +0900 From: Michael Paquier To: Tom Lane Cc: Postgres hackers Subject: Re: __pg_log_level in anonynous enum should be initialized? (Was: pgsql: Change SHA2 implementation based on OpenSSL to use EVP digest ro) Message-ID: <20200930055025.GA1996@paquier.xyz> References: <20200928073330.GC2316@paquier.xyz> <300644.1601311769@sss.pgh.pa.us> <20200929020312.GA10200@paquier.xyz> <607460.1601386158@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" Content-Disposition: inline In-Reply-To: <607460.1601386158@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --hHWLQfXTYDoKhP50 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 29, 2020 at 09:29:18AM -0400, Tom Lane wrote: > Hm, it doesn't seem like "OBJS_PGCOMMON" conveys much. I think > OBJS_FRONTEND ought to be the set of files built for frontend > application use (i.e., libpgcommon.a), so we need a new name > for what will go into libpgcommon_shlib.a. Maybe OBJS_SHLIB, > or to be even more explicit, OBJS_FRONTEND_SHLIB. OBJS_SHLIB is already used to list the _shlib.o objects compiled with libpgcommon_shlib.a, which is why I switched OBJS_FRONTEND to OBJS_PGCOMMON, and an object cannot reference itself so we either need two variables for the shlib list, or we could just do something like that: OBJS_FRONTEND = \ $(OBJS_COMMON) \ fe_memutils.o \ restricted_token.o \ sprompt.o OBJS_SHLIB = $(OBJS_FRONTEND:%.o=%_shlib.o) OBJS_FRONTEND += logging.o However I would prefer the style of the attached. > As for the comment, maybe "logging.c is excluded from OBJS_SHLIB > as a matter of policy, because it is not appropriate for general > purpose libraries such as libpq to report errors directly." WFM. Thanks! -- Michael --MGYHOYXEY6WxJCY8 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="common-shlib-split-v2.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/common/Makefile b/src/common/Makefile index f281762885..25c55bd642 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -88,16 +88,21 @@ OBJS_COMMON +=3D sha2.o endif =20 # A few files are currently only built for frontend, not server -# (Mkvcbuild.pm has a copy of this list, too) -OBJS_FRONTEND =3D \ +# (Mkvcbuild.pm has a copy of this list, too). logging.c is excluded +# from OBJS_FRONTEND_SHLIB (shared library) as a matter of policy, +# because it is not appropriate for general purpose libraries such +# as libpq to report errors directly. +OBJS_FRONTEND_SHLIB =3D \ $(OBJS_COMMON) \ fe_memutils.o \ - logging.o \ restricted_token.o \ sprompt.o +OBJS_FRONTEND =3D \ + $(OBJS_FRONTEND_SHLIB) \ + logging.o =20 # foo.o, foo_shlib.o, and foo_srv.o are all built from foo.c -OBJS_SHLIB =3D $(OBJS_FRONTEND:%.o=3D%_shlib.o) +OBJS_SHLIB =3D $(OBJS_FRONTEND_SHLIB:%.o=3D%_shlib.o) OBJS_SRV =3D $(OBJS_COMMON:%.o=3D%_srv.o) =20 # where to find gen_keywordlist.pl and subsidiary files --MGYHOYXEY6WxJCY8-- --hHWLQfXTYDoKhP50 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl90HKEACgkQnvQgOdby QH3ZBg//TSicDfc9NohoNxVpwNqKBX00iLmqGDm3lPvI49MRUTqrpQcs0HH+y7PA /1FOpXwyeY8/PEB3Jnn8TaHkOEf+ODmRrD1PxHA+JZVl+gOdoFK6A/OyH2nzmt6B kVE0NojzjqiYZk4huvEd5kf2s6jXLU9dKLsYJkd05sq8VH6KpGdwZDLHi52PM0QA rLmscCM1+zqeU6WfRCVBXzuGjmk0IRCZ7sw57TDefMvntoLKW272XhIbGTVrzc9i O9wgVoyzhLhyrAmqu7ThZpzoW9G9y1b2gZWp8xHmaPnT82XrfouGY+nt4qHLiHcn xKusPk32QvLybpBTYglfVFLP60Ny8xl1ZPecr9MqqEzFJWs9utrusRqx7Hu2mr7k V0SdVhcsapvskuCXRCQlzcoPDpBaBuINLZNotWa0tk9ofzx/M3VgpY7YmOyJd4FP 5ZGROsO2WNY+1X8PQRf1rj/gV3mod7sfsxsokSL+/X8UMnzifsJfVQKVtZwoo1Fm 2XXYmX6adjlL9Y+Xlw+iss9acPRx0dek9/MyjHbEan6SiRTZwghfJsRa9O4yo27p bArb3zjafPVOmPmWHGtL7iiwg96eK//veTlUeJdocHihv3i26WexvSVsdXKfF11z fQZa2/azABDFw8m+lNxCbV2F5tcEX/VIn5hBKJXfL1bHrK5IP9s= =92ht -----END PGP SIGNATURE----- --hHWLQfXTYDoKhP50--