Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YsvL7-0004Er-D0 for pgsql-committers@arkaria.postgresql.org; Thu, 14 May 2015 15:46:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YsvL6-0000Ax-Dd for pgsql-committers@arkaria.postgresql.org; Thu, 14 May 2015 15:46:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YsvL5-0000Ar-OL for pgsql-committers@postgresql.org; Thu, 14 May 2015 15:46:23 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YsvL2-0001Ky-NQ for pgsql-committers@postgresql.org; Thu, 14 May 2015 15:46:22 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 02A1B5F7AA; Thu, 14 May 2015 11:46:19 -0400 (EDT) Date: Thu, 14 May 2015 11:46:19 -0400 From: Stephen Frost To: Tom Lane Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Add pg_audit, an auditing extension Message-ID: <20150514154619.GY30322@tamriel.snowman.net> References: <20150514144833.GW30322@tamriel.snowman.net> <20267.1431615541@sss.pgh.pa.us> <20150514150047.GX30322@tamriel.snowman.net> <20458.1431615970@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="u6BZDkbk+R0NQdEl" Content-Disposition: inline In-Reply-To: <20458.1431615970@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-46-generic (x86_64) X-Uptime: 11:34:40 up 55 days, 21:23, 9 users, load average: 0.09, 0.14, 0.17 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org --u6BZDkbk+R0NQdEl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Tom Lane (tgl@sss.pgh.pa.us) wrote: > >> + ERROR: pg_audit must be loaded via shared_preload_libraries > >>=20 > >> This seems like a rather poorly thought-through error check. > >> It will break not only the buildfarm but any dump/restore scenario. > >> You really can't have extensions that refuse to let themselves > >> be created. >=20 > > Yeah, the original idea behind it was to force the user to think about > > if they really would want to load it later on down the line rather than > > have it pre-loaded always. >=20 > > I'll put something in the docs which recommends it and provides the > > reasoning behind it. >=20 > Could we apply a check at some later time, when the user actually does > something that is not sensible unless the library was preloaded? Even > then, just a WARNING might be better than ERROR. Actually, we do.. The order in which the hooks are called matters and if it's not loaded before anything real is called then it's going to blow up. > (Still, it's not clear how you'd get buildfarm testing to pass, so > maybe this line of thought is just as fruitless.) I've pushed a change which should clean it up by simply loading the module after each reconnects is done, more-or-less simulating having it be in shared_preload_libraries. It also wasn't using the correct database for reconnecting. I'll keep an eye on it. Thanks! Stephen --u6BZDkbk+R0NQdEl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJVVMNLAAoJEO1sijiDR2RVwHMP/3S/6EGmlrLmSZ0KF9F6s/L9 CijMNw2tL+LsnSu/WBveU7Yy2UKWIZKZViii6ibL56VfQV6oWSzBE6VCup72SJeC XQFis32LQtUDLnPF7tvUWn5TmpjV3CrCI6Z42xQk+0XP3uaL07IlzBzu1nVtKrSj byf0ZKDEqPm32+uXe0dnJYnPF5Owd4F1LDgStyVPKkP+lj3EdGVb1ssNI8pn2WKQ wkNF/ex8wWECORsEZBYLDelk8fsIDC9XksLNDxjBCEZqeWGneHBE9fAvH3lhm2fx nmlb8OungvwgmbW6mCxlRlg89BvGSZM2v7FxE7x4Oq+wRIiyXvIZVsw4cZkIMZ3V Qnc9VnbZCbRULWQ6pzuPn1MMH31IH41koqtajYWo1OnAdvnIQelKjZLlqNIWEP0M M047NqfloYr/BbHRCrX0eUv1Bzat9mnfnwLJJt1nYZ4eEip4f6NHQhLPxfV5cKjI J5OWMP3Gf1rDS4yS1MG+aAF2KLLWZZOSzYmDzUD/YPPzaiFx8TuSzaHX9Vtgf4HQ dXUSekJ7wmnK0epFPPca27+LdEEE2U3xqRuzL7VZ/NBWl/NyxRKpli9VezuIH9az 26X+5ekXo8SIClza2ZwFB7bV5CIiGxggdmYvHeLFbx/eh6wRGtxLMyQOCvNdQE7b rV7rh/Y2WAWLxxb9r4Am =atTi -----END PGP SIGNATURE----- --u6BZDkbk+R0NQdEl--