pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: __pg_log_level in anonynous enum should be initialized? (Was: pgsql: Change SHA2 implementation based on OpenSSL to use EVP digest ro)
Date: Mon, 28 Sep 2020 12:49:29 -0400
Message-ID: <300644.1601311769@sss.pgh.pa.us> (raw)
In-Reply-To: <20200928073330.GC2316@paquier.xyz>
References: <E1kMk96-0008Gm-7c@gemulon.postgresql.org>
	<20200928073330.GC2316@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> It looks like this commit has broken prairiedog as follows:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedog&dt=2020-09-28%2005%3A45%3A55
> ld: common symbols not allowed with MH_DYLIB output format with the
> -multi_module option
> ../../../src/common/libpgcommon_shlib.a(logging_shlib.o) definition of
> common ___pg_log_level (size 4)

> Looking around, I have found a similar report from MacPorts and 10.4,
> leading to the fact that it may be better to initialize
> __pg_log_level:
> https://trac.macports.org/ticket/19829

I experimented and confirmed that explicitly initializing __pg_log_level
would suppress this build error on prairiedog.  However, I'm not sure
that doing so is a good idea, because it seems to me that this animal
has accidentally saved us from a serious design error.  IMO it is quite
unacceptable for libpq to contain either a forced write to stderr or a
forced exit(1).  It should be reporting the failure back to the calling
application, instead.  So the error handling in this patch needs to be
reconsidered.

Since prairiedog is not likely to be around forever, I propose that
we ought to enforce this going forward by arranging for common/logging.c
to not get built into the libpgcommon_shlib library variant.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <300644.1601311769@sss.pgh.pa.us>
Permalink:  ../300644.1601311769@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/300644.1601311769@sss.pgh.pa.us

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: __pg_log_level in anonynous enum should be initialized? (Was: pgsql: Change SHA2 implementation based on OpenSSL to use EVP digest ro)
  In-Reply-To: <300644.1601311769@sss.pgh.pa.us>
  References: <E1kMk96-0008Gm-7c@gemulon.postgresql.org> <20200928073330.GC2316@paquier.xyz> <300644.1601311769@sss.pgh.pa.us>

* 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