Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOn0q-0005uz-FY for pgsql-hackers@arkaria.postgresql.org; Thu, 09 May 2019 17:39:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hOn0n-0006ZS-TM for pgsql-hackers@arkaria.postgresql.org; Thu, 09 May 2019 17:39:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOn0n-0006ZL-DE for pgsql-hackers@lists.postgresql.org; Thu, 09 May 2019 17:39:17 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOn0k-0007wP-Dx for pgsql-hackers@postgresql.org; Thu, 09 May 2019 17:39:16 +0000 Received: by mail-qt1-x843.google.com with SMTP id i31so3417797qti.13 for ; Thu, 09 May 2019 10:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=3Ea7ChpIgNYLxCOOKS9pabIk1WEd0YpEe2CuW6/pFe8=; b=R9R0MeQK3BQg4/TGbxzIq6tFvhKUeEpj9uI/ElLnde4jyrZcBfWebmqRTc9kGb1vE6 PMuBZXERdeQi+rlMhh0T01FliWCFmWQnWGzMAS8vlbkmOAmXzQZ8haTInJNmJOCQlqsK AL5831y0+e0gxf7ugWkq3lvnmjK9ZBqEx/8dKVboZdlOPszDmS1NZKeAYzRpZj4s+udv RT3H4ZHbin/9Pwudu0VkTf/ZoQJCdq9SepOx4AdFL6tRhPIz1tQULFWNKTqc+ux9b8dJ 9f4c5mcww/x9SJ7VrtGbx/YDeVKG02OqsnHo3TMzLyGMfwAguV5bmW3QVtavdx7eaiIu 0mXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=3Ea7ChpIgNYLxCOOKS9pabIk1WEd0YpEe2CuW6/pFe8=; b=hHf2sYHABEp6LHLPLTGtORzVDX9a02TIJTiI4wfi/KQUFOydAC27MTsdIREuP8VfKi qDTM+l/spKGyysClJCoqshi/0CfXoeBCRjqWAEWM5mvWemF/5V9vIIXAqphvoVT7h9YW 5oGspDD65sAEc/e/e9rWsLs4mWZcE+cljPL+9yRVSbiFI/iVg1aZb4U7VdEi4Pv/ewqL TKt884qpXh3sqAvJhNxVW6ydrjsQMfWB+kzXb7G/tnVWgTdS6l4S8q2mpwmEB+2pvrI+ wDsjoprDMAVm/1ZIY2g480CwrEO/sQlezL2jyOLEJkYyG+N3wAHI6nmaZLeN19OLKCqp d6Iw== X-Gm-Message-State: APjAAAXHhsj/jUzMav5J60NX/76b0l8ZhFoG7vdVbOzMykmN+yba9mzY OYiwL8vzMhrpQN1/jDbeVUUCnA== X-Google-Smtp-Source: APXvYqyUzPStsNhHm4aYENtp4XcNyAcJMrQ8nvNrMpqdftGPd6wq1uRCQzMaiLe7DSMj8vuVRJ2ANA== X-Received: by 2002:ac8:34b7:: with SMTP id w52mr4939666qtb.11.1557423553678; Thu, 09 May 2019 10:39:13 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id d1sm1232979qkj.7.2019.05.09.10.39.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 May 2019 10:39:13 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 1EB3D120A54; Thu, 9 May 2019 13:39:11 -0400 (-04) Date: Thu, 9 May 2019 13:39:11 -0400 From: Alvaro Herrera To: Tom Lane Cc: Peter Eisentraut , Ian Barwick , "pgsql-hackers@postgresql.org" Subject: Re: PG12, PGXS and linking pgfeutils Message-ID: <20190509173911.GA16616@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <26438.1557422453@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-May-09, Tom Lane wrote: > I'm not especially on board with the idea of moving FE-specific error > handling code into libpgcommon, as that breaks the concept that > src/common/ is broadly for code that can work in either frontend or > backend contexts. However, we already have a few violations of that > rule: common/Makefile already has > > # A few files are currently only built for frontend, not server > OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o file_utils.o restricted_token.o > > So maybe the answer is to move these logging support functions into > src/common, in a file that's only built for frontend. I wonder if a better solution isn't to move the file_utils stuff to fe_utils. Half of it is frontend-specific. The only one that should be shared to backend seems to be fsync_fname ... but instead of sharing it, we have a second copy in fd.c. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services