Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eALWy-0006uE-Fe for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Nov 2017 19:52:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eALWx-00012v-Ss for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Nov 2017 19:51:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eAKbg-0005bt-Qo for pgsql-hackers@postgresql.org; Thu, 02 Nov 2017 18:52:49 +0000 Received: from sub4.mail.dreamhost.com ([69.163.253.135] helo=homiemail-a55.g.dreamhost.com) by makus.postgresql.org with esmtps (TLS1.1:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eAKbd-0006UO-3P for pgsql-hackers@postgresql.org; Thu, 02 Nov 2017 18:52:47 +0000 Received: from homiemail-a55.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a55.g.dreamhost.com (Postfix) with ESMTP id F3C2568003C1C; Thu, 2 Nov 2017 11:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=aLFNFCktBiYATk exQjwHnp2wqiQ=; b=dJyIFkEcT7m/U7/KOkQI8BfER/G2OpU7+5MH0iw25wq1B2 j/NvRfnOw426FArmTSKlM0Hr0cFZ+LycU6Z3d5/EAPryo67wDfkGbQcXKvY7Jco7 EwOQV1ukJguHI01tajpnS5kOV82SIDOPH4jhABKdqYmtRWr5I2kBXeUf1AGN8= Received: from localhost (cpe-70-123-158-140.austin.res.rr.com [70.123.158.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a55.g.dreamhost.com (Postfix) with ESMTPSA id 8D81268003C1A; Thu, 2 Nov 2017 11:52:43 -0700 (PDT) Date: Thu, 2 Nov 2017 13:52:39 -0500 From: Nico Williams To: Tom Lane Cc: Robert Haas , Pavel Stehule , PostgreSQL Hackers Subject: Re: proposal: schema variables Message-ID: <20171102185237.GQ4496@localhost> References: <20171102153505.GP4496@localhost> <28927.1509637724@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28927.1509637724@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Thu, Nov 02, 2017 at 11:48:44AM -0400, Tom Lane wrote: > Nico Williams writes: > > With access controls, GUCs could become schema variables, and settings > > from postgresql.conf could move into the database itself (which I think > > would be nice). > > People re-propose some variant of that every so often, but it never works, > because it ignores the fact that some of the GUCs' values are needed > before you can access system catalogs at all, or in places where relying > on system catalog access would be a bad idea. ISTM that it should be possible to break the chicken-egg issue by having the config variables stored in such a way that knowing only the pgdata directory path should suffice to find them. That's effectively the case already in that postgresql.conf is found... there. One could do probably this as a PoC entirely as a SQL-coded VIEW that reads and writes (via the adminpack module's pg_catalog.pg_file_write()) postgresql.conf (without preserving comments, or with some rules regarding comments so that they are effectively attached to params). Nico -- -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers