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 1nZxcK-0006wl-TZ for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Mar 2022 16:25:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZxcJ-0004HJ-Qu for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Mar 2022 16:25:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZxcJ-0004H9-Hj for pgsql-hackers@lists.postgresql.org; Thu, 31 Mar 2022 16:25:47 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZxcG-0006rw-Tk for pgsql-hackers@lists.postgresql.org; Thu, 31 Mar 2022 16:25:47 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id A2D7F40005; Thu, 31 Mar 2022 16:25:40 +0000 (UTC) Content-Type: multipart/mixed; boundary="------------0cb6J8xXxMUn9nsX62rY8J4B" Message-ID: <61e2e2c0-1b1c-3b48-4d5c-2fe581e63121@dunslane.net> Date: Thu, 31 Mar 2022 12:25:38 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: pgsql: Add 'basebackup_to_shell' contrib module. Content-Language: en-US To: Tom Lane , Robert Haas Cc: Nathan Bossart , Andres Freund , Thomas Munro , PostgreSQL Hackers , Magnus Hagander References: <20220329222504.aylyimyub6igsvpy@alap3.anarazel.de> <684ed71e-0876-60c0-8e44-066ba702f0a6@dunslane.net> <20220330163024.fsbpbxwxh5oo2ktx@alap3.anarazel.de> <20220330165450.3lruwky7eveddsvq@alap3.anarazel.de> <285252.1648671723@sss.pgh.pa.us> <20220330223531.GA134543@nathanxps13> <472639.1648684865@sss.pgh.pa.us> <485495.1648692468@sss.pgh.pa.us> <639823.1648740735@sss.pgh.pa.us> From: Andrew Dunstan In-Reply-To: <639823.1648740735@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------0cb6J8xXxMUn9nsX62rY8J4B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/31/22 11:32, Tom Lane wrote: > Robert Haas writes: >> On Thu, Mar 31, 2022 at 10:52 AM Andrew Dunstan wrote: >>> We should probably fix the test though, so it doesn't require Unix >>> sockets. It should be possible, although I haven't looked yet to see how. >> Our mutual colleague Neha Sharma pointed out this email message to me: >> http://postgr.es/m/106926.1643842376@sss.pgh.pa.us Yep, that's kinda what I was expecting. >> I actually don't understand why using pg_regress --auth-extra would >> fix it, or what that option does, or why we're even running pg_regress >> at all in PostgreSQL::Test::Cluster::init. I think it might be to fix >> this exact issue, but there's no SGML documentation for pg_regress, I really don't know why this stuff is in pg_regress at all. It seems rather odd to me and it's annoyed me for a while. But that's a fight for another day. > I'm not volunteering to fix that, but this comment in pg_regress.c > is probably adequately illuminating: > > * Rewrite pg_hba.conf and pg_ident.conf to use SSPI authentication. Permit > * the current OS user to authenticate as the bootstrap superuser and as any > * user named in a --create-role option. > > This script is creating users manually rather than letting the TAP > infrastructure do it, which is an antipattern. > > Yeah, I think the fix is as simple as the attached. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com --------------0cb6J8xXxMUn9nsX62rY8J4B Content-Type: text/x-patch; charset=UTF-8; name="basebackup_to_shell-tap-fix.patch" Content-Disposition: attachment; filename="basebackup_to_shell-tap-fix.patch" Content-Transfer-Encoding: base64 ZGlmZiA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