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 1mSXcF-0007xo-5F for pgsql-committers@arkaria.postgresql.org; Tue, 21 Sep 2021 04:42:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mSXcD-0002w8-90 for pgsql-committers@arkaria.postgresql.org; Tue, 21 Sep 2021 04:42:45 +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 1mSXcD-0002vz-31 for pgsql-committers@lists.postgresql.org; Tue, 21 Sep 2021 04:42:45 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSXcA-0000fh-D6 for pgsql-committers@lists.postgresql.org; Tue, 21 Sep 2021 04:42:44 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id ACECD5C00B4; Tue, 21 Sep 2021 00:42:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 21 Sep 2021 00:42:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=g6WbOTskAamX8LnVkucmdRAH8DP tvqCUXUkqPdgTnao=; b=SAVq/+j5WYyHhJ/uvtu+wHy/hvWfpHeV1SgbxCIn+88 iT+O49lrOTxiC9/L8A4EydPll4wxi1KoAl6wWN3OCJ0wCEfn6qzKAabt6VkVD4WG 3yV/zfSEjRrHEy9Oiy/rYSjUSvCSqac00vhXiixGEDMfB8zNJFIPUek+q9G0jceR ZNU4phUDrTNggEGy73ZfUQO0fY68RjDtiFnk+G3c8nGPuc3Ss+N48MBTixuFuAoc 7/sgLc6hszZtvlK6tLqq4NU6Or2KHaX8Ykf6oqwj9N3AUXskRpXBH0WJC6g6MOlf pZLqYJxSZ8yExeDPa9Wg4ZHEDiOvQCbCTy2c4cX+Euw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=g6WbOT skAamX8LnVkucmdRAH8DPtvqCUXUkqPdgTnao=; b=eUKbrbQVvhP3n2LW8GAis/ XxfE0hYngRLCXwYKzSVQ0oFkRyAi4vPWRMwnkKk77akmPDL8n4Qgb9VougyBO+6n eaVm6GJRKWa4wLrE992zR3ixPhixzZnHO/ELvn1rJZfpXgqinr8adFxtLDYF4rl+ 2Pzq5rNKdCCyPeZ17jT0LPzeukDj1/44P/mZzR8avXgEbno7djaA96jnfPleiEt2 iBOvF44rZ4wRxzT75V9xCh8Qbc0R9e0EeeDEXVCkiDUG7kKRWTmvPeeuF4Wj8SE2 Advj+pr1XxNuwxMTCK3v4EU0rGyFx7LEJkxXkVF6gFYgYJoPd+biTKfxOAhlpadQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeifedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Sep 2021 00:42:38 -0400 (EDT) Date: Tue, 21 Sep 2021 13:42:34 +0900 From: Michael Paquier To: Andres Freund Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Support "postgres -C" with runtime-computed GUCs Message-ID: References: <20210921032040.lyl4lcax37aedx2x@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="44AAkmkHCQncjonu" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --44AAkmkHCQncjonu Content-Type: multipart/mixed; boundary="ljfbaz385OtmbGQ3" Content-Disposition: inline --ljfbaz385OtmbGQ3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 21, 2021 at 12:47:24PM +0900, Michael Paquier wrote: > This would print the parameter, while getting to stderr mostly a > "could not start server". Would that work for you? And.. Here is an actual patch. The first test works here on Win32, but I don't have a CI environment with an unprivileged account. The second is funky, as pg_ctl would return 0 causing a failure with command_fails_like() because of the way start_postmaster() differs in pg_ctl. it may be possible to work around that by switching to command_checks_all() but that would make the whole uglier with different error handling, and I guess different reports generated, so I would just remove it. Could you check if the first case would work in your environment? If not, I would not mind just removing the test. I have discovered a separate bug thanks to it, but that's not worth breaking your case either. -- Michael --ljfbaz385OtmbGQ3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="checksum-tap-fix.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t= /002_actions.pl index 97492caab4..085c264a8e 100644 --- a/src/bin/pg_checksums/t/002_actions.pl +++ b/src/bin/pg_checksums/t/002_actions.pl @@ -11,7 +11,7 @@ use PostgresNode; use TestLib; =20 use Fcntl qw(:seek); -use Test::More tests =3D> 69; +use Test::More tests =3D> 66; =20 =20 # Utility routine to create and check a table with corrupted checksums @@ -181,17 +181,22 @@ command_fails( =20 # Test postgres -C for an offline cluster. # Run-time GUCs are safe to query here. Note that a lock file is created, -# then unlinked, leading to an extra LOG entry showing in stderr. +# then unlinked, leading to an extra LOG entry showing in stderr so use +# log_min_messages=3Dfatal to remove this noise. This test uses a startup +# wrapped with pg_ctl to allow the case of a CI running under an unprivile= ged +# account on Windows. SKIP: { skip "unstable output generated with Msys", 3 if ($Config{osname} eq 'msys'); command_checks_all( - [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ], - 0, + [ + 'pg_ctl', 'start', '-D', $pgdata, '-s', '-o', + '-C data_checksums -c log_min_messages=3Dfatal' + ], + 1, [qr/^on$/], - # LOG entry when unlinking lock file. - [qr/database system is shut down/], + [qr/could not start server/], 'data_checksums=3Don is reported on an offline cluster'); } =20 @@ -200,15 +205,6 @@ $node->start; command_fails([ 'pg_checksums', '--check', '-D', $pgdata ], "fails with online cluster"); =20 -# Test postgres -C on an online cluster. -command_fails_like( - [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ], - qr/lock file .* already exists/, - 'data_checksums is not reported on an online cluster'); -command_ok( - [ 'postgres', '-D', $pgdata, '-C', 'work_mem' ], - 'non-runtime parameter is reported on an online cluster'); - # Check corruption of table on default tablespace. check_relation_corruption($node, 'corrupt1', 'pg_default'); =20 --ljfbaz385OtmbGQ3-- --44AAkmkHCQncjonu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmFJYroACgkQnvQgOdby QH25xg/+NTOzFpFJcwDZRQ9RfFb+zggquV/AeS1kbS7qfH9BU75prJgSTYrH+zwW 9ICCcKp6xlywEgCe6SA56gvG+wQYvPaUC3vSFOguaZItbMAF5scezoDoXQHon8Oq FhDOO+LhGfYoli6ly7frKh/hvJfh2tNNI958yYGFAeRNatRsiRqU4D/1cC3v/Kcx t+ccEoJhhNI5C5TpyBuFEEH2wjL3jVSfQg03HqoOlh/bJS8SvOF6/6qNKi6Dn3l3 kT3sNMiwvnmK+5RlFMSXIvpeTkRCQAB8mpjGCzp+np7H8yEUZOVcOlz0i1lTLbSW 6ap8nnaYsDFh/YaQw6no802AUCf2wQ694UO3yw+o/iyD0yIq2sUhUGL+5d4grx04 opZOq/d6w0JjGrdkHN6kigxgplVsntr42adMjYmZun/FrD2fyNhKSs14Ctve0WyA QxDoYl+mRboKseg1E1SM5ZbZChR8VqcpWAAxKBvSplr3WmQv7hNYV0Bmg7sc/eou N6QRe37aDsow0sWN6FXFryPx163IAHR9cZ79amC/5hEeV/8Ni5rfKCqeexOsnJN4 muYJPRHPEZde3fcFaN4MvvqfL5VxDOqB33lIurSvxKhgt0euyLkdxwilwEkBV5wg OQxZaKlZ4sqZLrRuNWpeoE0fVKRxzgUwjRvt9MVbu0oE7kgbSbM= =eiPV -----END PGP SIGNATURE----- --44AAkmkHCQncjonu--