Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-22 Thread Andres Freund
On 2021-09-22 11:01:05 +0900, Michael Paquier wrote: > On Tue, Sep 21, 2021 at 03:12:02PM +0900, Michael Paquier wrote: > > Thanks. I'll group this stuff with what I still need to do for Msys. > > This just needs to wait until RC1 is tagged as I need to address the > > existing issues in TestLib.p

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-22 Thread Michael Paquier
On Wed, Sep 22, 2021 at 11:01:05AM +0900, Michael Paquier wrote: > 1a9d8028 should have taken care of the problem. Thanks for the > report. jacana has reported green after this commit, and the test has passed with Msys. So we are done here. -- Michael signature.asc Description: PGP signature

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-21 Thread Michael Paquier
On Tue, Sep 21, 2021 at 03:12:02PM +0900, Michael Paquier wrote: > Thanks. I'll group this stuff with what I still need to do for Msys. > This just needs to wait until RC1 is tagged as I need to address the > existing issues in TestLib.pm first. 1a9d8028 should have taken care of the problem. Th

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-21 Thread Michael Paquier
On Tue, Sep 21, 2021 at 08:30:13AM +0900, Michael Paquier wrote: > Please note that I am planning to get the fixes in TestLib.pm applied > and back-patched to prevent surprises if there is any bug fix that > introduces a test where this could be hit. As 14 RC1 has just been > stamped, this will ha

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Michael Paquier
On Mon, Sep 20, 2021 at 10:33:05PM -0700, Andres Freund wrote: > And while not finished entirely, the checksum tests passed: > > [05:28:13.788] t/001_basic.pl ok > [05:28:35.762] t/002_actions.pl .. ok > [05:28:35.767] All tests successful. > [05:28:35.767] Files=2, Tests=74, 22 wallclock sec

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Andres Freund
Hi, On 2021-09-21 14:37:05 +0900, Michael Paquier wrote: > > If interesting I can also come up with the necessary steps to activate > > it in your repo... > > That could be helpful. I have never played with those tools. It's really useful. I'm planning to propose a bit more minimal version to b

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Michael Paquier
On Mon, Sep 20, 2021 at 10:11:53PM -0700, Andres Freund wrote: > On 2021-09-21 13:42:34 +0900, Michael Paquier wrote: > > The first test works here on Win32, but I don't have a CI environment > > with an unprivileged account. > > I assume it's just a typo, but the problem is the opposite, it's a >

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Andres Freund
Hi, On 2021-09-20 22:11:53 -0700, Andres Freund wrote: > On 2021-09-21 13:42:34 +0900, Michael Paquier wrote: > > 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 n

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Andres Freund
Hi, On 2021-09-21 13:42:34 +0900, Michael Paquier wrote: > 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. Cool! > T

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Michael Paquier
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 u

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Andres Freund
Hi, On September 20, 2021 8:47:24 PM PDT, Michael Paquier wrote: >On Mon, Sep 20, 2021 at 08:20:40PM -0700, Andres Freund wrote: >> So the problem is that -C data_checksums requires permissions to be dropped, >> but the way it's invoked here that's not guaranteed... And I don't think we >> shou

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Michael Paquier
On Mon, Sep 20, 2021 at 08:20:40PM -0700, Andres Freund wrote: > So the problem is that -C data_checksums requires permissions to be dropped, > but the way it's invoked here that's not guaranteed... And I don't think we > should remove that requirement, given that we're actually doing stuff to the

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Andres Freund
Hi, On 2021-09-16 02:05:02 +, Michael Paquier wrote: > Some TAP tests are added to provide some coverage here, using > data_checksums in the tests of pg_checksums. I just rebased my AIO branch ontop of this, and promptly got a CI failure. Which appears to be unrelated to AIO. The CI system th

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-20 Thread Michael Paquier
On Sat, Sep 18, 2021 at 08:18:58AM +0900, Michael Paquier wrote: > And perltidy tells me nothing here. Please note that I am planning to get the fixes in TestLib.pm applied and back-patched to prevent surprises if there is any bug fix that introduces a test where this could be hit. As 14 RC1 has

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-17 Thread Michael Paquier
On Fri, Sep 17, 2021 at 03:18:38PM -0400, Andrew Dunstan wrote: > The fixups for command_checks_all should go before the loops, not inside > them. Right. > I would probably add a single line like this just after the call that > checks the status: > >    foreach ($stderr, $stdout) { s/\r\n/\n/g i

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-17 Thread Andrew Dunstan
On 9/16/21 8:44 PM, Michael Paquier wrote: > On Fri, Sep 17, 2021 at 08:08:44AM +0900, Michael Paquier wrote: >> I am not completely sure what's going on here yet, so I'll just switch >> the test to be skipped when Msys is involved for now. That should be >> enough to bring back those machines t

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-16 Thread Alvaro Herrera
On 2021-Sep-17, Michael Paquier wrote: > On Fri, Sep 17, 2021 at 08:08:44AM +0900, Michael Paquier wrote: > > I am not completely sure what's going on here yet, so I'll just switch > > the test to be skipped when Msys is involved for now. That should be > > enough to bring back those machines to

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-16 Thread Michael Paquier
On Fri, Sep 17, 2021 at 08:08:44AM +0900, Michael Paquier wrote: > I am not completely sure what's going on here yet, so I'll just switch > the test to be skipped when Msys is involved for now. That should be > enough to bring back those machines to green. So, after drinking down a coffee, I have

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-16 Thread Michael Paquier
On Thu, Sep 16, 2021 at 05:56:49PM -0400, Tom Lane wrote: > Test case for this seems to have newline-related issues on Windows. Thanks. I missed it. > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-09-16%2018%3A36%3A14 > > # Failed test 'data_checksums=on is reporte

Re: pgsql: Support "postgres -C" with runtime-computed GUCs

2021-09-16 Thread Tom Lane
Michael Paquier writes: > Support "postgres -C" with runtime-computed GUCs Test case for this seems to have newline-related issues on Windows. https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-09-16%2018%3A36%3A14 # Failed test 'data_checksums=on is reported on an offl