pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Support "postgres -C" with runtime-computed GUCs
21+ messages / 5 participants
[nested] [flat]
* pgsql: Support "postgres -C" with runtime-computed GUCs
@ 2021-09-16 02:05 Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
0 siblings, 2 replies; 21+ messages in thread
From: Michael Paquier @ 2021-09-16 02:05 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Support "postgres -C" with runtime-computed GUCs
Until now, the -C option of postgres was handled before a small subset
of GUCs computed at runtime are initialized, leading to incorrect
results as GUC machinery would fall back to default values for such
parameters.
For example, data_checksums could report "off" for a cluster as the
control file is not loaded yet. Or wal_segment_size would show a
segment size at 16MB even if initdb --wal-segsize used something else.
Worse, the command would fail to properly report the recently-introduced
shared_memory, that requires to load shared_preload_libraries as these
could ask for a chunk of shared memory.
Support for runtime GUCs comes with a limitation, as the operation is
now allowed on a running server. One notable reason for this is that
_PG_init() functions of loadable libraries are called before all
runtime-computed GUCs are initialized, and this is not guaranteed to be
safe to do on running servers. For the case of shared_memory_size,
where we want to know how much memory would be used without allocating
it, this limitation is fine. Another case where this will help is for
huge pages, with the introduction of a different GUC to evaluate the
amount of huge pages required for a server before starting it, without
having to allocate large chunks of memory.
This feature is controlled with a new GUC flag, and four parameters are
classified as runtime-computed as of this change:
- data_checksums
- shared_memory_size
- data_directory_mode
- wal_segment_size
Some TAP tests are added to provide some coverage here, using
data_checksums in the tests of pg_checksums.
Per discussion with Andres Freund, Justin Pryzby, Magnus Hagander and
more.
Author: Nathan Bossart
Discussion: https://postgr.es/m/F2772387-CE0F-46BF-B5F1-CC55516EB885@amazon.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0c39c292077ef3ba987ced0dc6ea1c8f4f1e1f4b
Modified Files
--------------
doc/src/sgml/ref/postgres-ref.sgml | 11 ++++++--
src/backend/postmaster/postmaster.c | 50 ++++++++++++++++++++++++++++++-----
src/backend/utils/misc/guc.c | 8 +++---
src/bin/pg_checksums/t/002_actions.pl | 22 ++++++++++++++-
src/include/utils/guc.h | 6 +++++
5 files changed, 83 insertions(+), 14 deletions(-)
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-16 21:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
1 sibling, 1 reply; 21+ messages in thread
From: Tom Lane @ 2021-09-16 21:56 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
Michael Paquier <michael@paquier.xyz> 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 offline cluster stdout /(?^:^on$)/'
# at t/002_actions.pl line 184.
# 'on
# '
# doesn't match '(?^:^on$)'
regards, tom lane
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-09-16 23:08 ` Michael Paquier <michael@paquier.xyz>
2021-09-17 00:44 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 21+ messages in thread
From: Michael Paquier @ 2021-09-16 23:08 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org, Andrew Dunstan <andrew@dunslane.net>
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 reported on an offline cluster stdout /(?^:^on$)/'
> # at t/002_actions.pl line 184.
> # 'on
> # '
> # doesn't match '(?^:^on$)'
The regex should match AFAIK, and that worked in my own WIN32,
non-Msys, environment.
I see the business in PostgresNode::command_like_safe to work around
such a case like that in pg_ctl (efd7f8e), very similar to what I am
doing here so an extra chomp() should address this issue. Shouldn't
we try in the long-term to make the command_checks_* routines use
temporary files rather than the raw outputs if these are not reliable,
by the way? Adding Andrew in CC about that.
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.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-17 00:44 ` Michael Paquier <michael@paquier.xyz>
2021-09-17 01:03 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-09-17 19:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andrew Dunstan <andrew@dunslane.net>
0 siblings, 2 replies; 21+ messages in thread
From: Michael Paquier @ 2021-09-17 00:44 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org, Andrew Dunstan <andrew@dunslane.net>
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 remembered the difference
between the Msys and native perls when it comes to IPC::Run:
- Msys perl generates \r\n.
- Native perl generates \n.
We have already a couple of places where we filter that out, like
PostgresNode::psql or slurp_file. But we are missing some spots
before calling like() for outputs generated by IPC::Run. I have
tracked all those places with the attached, and I think that this
should take care of the failure seen here while preventing future
problems.
Any thoughts?
--
Michael
diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl
index 97492caab4..2cc8b68c75 100644
--- a/src/bin/pg_checksums/t/002_actions.pl
+++ b/src/bin/pg_checksums/t/002_actions.pl
@@ -6,7 +6,6 @@
use strict;
use warnings;
-use Config;
use PostgresNode;
use TestLib;
@@ -182,18 +181,13 @@ command_fails(
# 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.
-SKIP:
-{
- skip "unstable output generated with Msys", 3
- if ($Config{osname} eq 'msys');
- command_checks_all(
- [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
- 0,
- [qr/^on$/],
- # LOG entry when unlinking lock file.
- [qr/database system is shut down/],
- 'data_checksums=on is reported on an offline cluster');
-}
+command_checks_all(
+ [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
+ 0,
+ [qr/^on$/],
+ # LOG entry when unlinking lock file.
+ [qr/database system is shut down/],
+ 'data_checksums=on is reported on an offline cluster');
# Checks cannot happen with an online cluster
$node->start;
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index cbab1587cc..bde429e476 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -434,6 +434,8 @@ sub run_command
my ($cmd) = @_;
my ($stdout, $stderr);
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
chomp($stdout);
chomp($stderr);
return ($stdout, $stderr);
@@ -878,6 +880,7 @@ sub command_like
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok($result, "$test_name: exit code 0");
is($stderr, '', "$test_name: no stderr");
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $expected_stdout, "$test_name: matches");
return;
}
@@ -909,6 +912,7 @@ sub command_like_safe
$stderr = slurp_file($stderrfile);
ok($result, "$test_name: exit code 0");
is($stderr, '', "$test_name: no stderr");
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $expected_stdout, "$test_name: matches");
return;
}
@@ -930,6 +934,7 @@ sub command_fails_like
print("# Running: " . join(" ", @{$cmd}) . "\n");
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok(!$result, "$test_name: exit code not 0");
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stderr, $expected_stderr, "$test_name: matches");
return;
}
@@ -981,12 +986,14 @@ sub command_checks_all
# check stdout
for my $re (@$out)
{
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $re, "$test_name stdout /$re/");
}
# check stderr
for my $re (@$err)
{
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stderr, $re, "$test_name stderr /$re/");
}
Attachments:
fix-tap-msys-crlf.patch (text/plain, 2.9K) download
diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl
index 97492caab4..2cc8b68c75 100644
--- a/src/bin/pg_checksums/t/002_actions.pl
+++ b/src/bin/pg_checksums/t/002_actions.pl
@@ -6,7 +6,6 @@
use strict;
use warnings;
-use Config;
use PostgresNode;
use TestLib;
@@ -182,18 +181,13 @@ command_fails(
# 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.
-SKIP:
-{
- skip "unstable output generated with Msys", 3
- if ($Config{osname} eq 'msys');
- command_checks_all(
- [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
- 0,
- [qr/^on$/],
- # LOG entry when unlinking lock file.
- [qr/database system is shut down/],
- 'data_checksums=on is reported on an offline cluster');
-}
+command_checks_all(
+ [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
+ 0,
+ [qr/^on$/],
+ # LOG entry when unlinking lock file.
+ [qr/database system is shut down/],
+ 'data_checksums=on is reported on an offline cluster');
# Checks cannot happen with an online cluster
$node->start;
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index cbab1587cc..bde429e476 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -434,6 +434,8 @@ sub run_command
my ($cmd) = @_;
my ($stdout, $stderr);
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
chomp($stdout);
chomp($stderr);
return ($stdout, $stderr);
@@ -878,6 +880,7 @@ sub command_like
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok($result, "$test_name: exit code 0");
is($stderr, '', "$test_name: no stderr");
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $expected_stdout, "$test_name: matches");
return;
}
@@ -909,6 +912,7 @@ sub command_like_safe
$stderr = slurp_file($stderrfile);
ok($result, "$test_name: exit code 0");
is($stderr, '', "$test_name: no stderr");
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $expected_stdout, "$test_name: matches");
return;
}
@@ -930,6 +934,7 @@ sub command_fails_like
print("# Running: " . join(" ", @{$cmd}) . "\n");
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok(!$result, "$test_name: exit code not 0");
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stderr, $expected_stderr, "$test_name: matches");
return;
}
@@ -981,12 +986,14 @@ sub command_checks_all
# check stdout
for my $re (@$out)
{
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $re, "$test_name stdout /$re/");
}
# check stderr
for my $re (@$err)
{
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stderr, $re, "$test_name stderr /$re/");
}
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 00:44 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-17 01:03 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
1 sibling, 0 replies; 21+ messages in thread
From: Alvaro Herrera @ 2021-09-17 01:03 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org, Andrew Dunstan <andrew@dunslane.net>
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 green.
>
> So, after drinking down a coffee, I have remembered the difference
> between the Msys and native perls when it comes to IPC::Run:
> - Msys perl generates \r\n.
> - Native perl generates \n.
Yeah, we've been here before -- see 015061690c65 and the commits
referenced there.
> We have already a couple of places where we filter that out, like
> PostgresNode::psql or slurp_file. But we are missing some spots
> before calling like() for outputs generated by IPC::Run. I have
> tracked all those places with the attached, and I think that this
> should take care of the failure seen here while preventing future
> problems.
Looks reasonable to me.
--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/
"¿Cómo puedes confiar en algo que pagas y que no ves,
y no confiar en algo que te dan y te lo muestran?" (Germán Poo)
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 00:44 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-17 19:18 ` Andrew Dunstan <andrew@dunslane.net>
2021-09-17 23:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
1 sibling, 1 reply; 21+ messages in thread
From: Andrew Dunstan @ 2021-09-17 19:18 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
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 to green.
> So, after drinking down a coffee, I have remembered the difference
> between the Msys and native perls when it comes to IPC::Run:
> - Msys perl generates \r\n.
> - Native perl generates \n.
>
> We have already a couple of places where we filter that out, like
> PostgresNode::psql or slurp_file. But we are missing some spots
> before calling like() for outputs generated by IPC::Run. I have
> tracked all those places with the attached, and I think that this
> should take care of the failure seen here while preventing future
> problems.
>
> Any thoughts?
The fixups for command_checks_all should go before the loops, not inside
them.
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 if $Config{osname} eq 'msys'; }
although maybe perltidy would reformat that.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 00:44 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 19:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andrew Dunstan <andrew@dunslane.net>
@ 2021-09-17 23:18 ` Michael Paquier <michael@paquier.xyz>
2021-09-20 23:30 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 21+ messages in thread
From: Michael Paquier @ 2021-09-17 23:18 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org
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 if $Config{osname} eq 'msys'; }
Yes, that works. Fine by me to use this grammar.
> although maybe perltidy would reformat that.
And perltidy tells me nothing here.
--
Michael
diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl
index 97492caab4..2cc8b68c75 100644
--- a/src/bin/pg_checksums/t/002_actions.pl
+++ b/src/bin/pg_checksums/t/002_actions.pl
@@ -6,7 +6,6 @@
use strict;
use warnings;
-use Config;
use PostgresNode;
use TestLib;
@@ -182,18 +181,13 @@ command_fails(
# 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.
-SKIP:
-{
- skip "unstable output generated with Msys", 3
- if ($Config{osname} eq 'msys');
- command_checks_all(
- [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
- 0,
- [qr/^on$/],
- # LOG entry when unlinking lock file.
- [qr/database system is shut down/],
- 'data_checksums=on is reported on an offline cluster');
-}
+command_checks_all(
+ [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
+ 0,
+ [qr/^on$/],
+ # LOG entry when unlinking lock file.
+ [qr/database system is shut down/],
+ 'data_checksums=on is reported on an offline cluster');
# Checks cannot happen with an online cluster
$node->start;
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index cbab1587cc..15f4e6f56e 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -434,6 +434,7 @@ sub run_command
my ($cmd) = @_;
my ($stdout, $stderr);
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
+ foreach ($stderr, $stdout) { s/\r\n/\n/g if $Config{osname} eq 'msys'; }
chomp($stdout);
chomp($stderr);
return ($stdout, $stderr);
@@ -878,6 +879,7 @@ sub command_like
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok($result, "$test_name: exit code 0");
is($stderr, '', "$test_name: no stderr");
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $expected_stdout, "$test_name: matches");
return;
}
@@ -930,6 +932,7 @@ sub command_fails_like
print("# Running: " . join(" ", @{$cmd}) . "\n");
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok(!$result, "$test_name: exit code not 0");
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stderr, $expected_stderr, "$test_name: matches");
return;
}
@@ -974,6 +977,8 @@ sub command_checks_all
if $ret & 127;
$ret = $ret >> 8;
+ foreach ($stderr, $stdout) { s/\r\n/\n/g if $Config{osname} eq 'msys'; }
+
# check status
ok($ret == $expected_ret,
"$test_name status (got $ret vs expected $expected_ret)");
Attachments:
fix-tap-msys-crlf-2.patch (text/plain, 2.5K) download
diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl
index 97492caab4..2cc8b68c75 100644
--- a/src/bin/pg_checksums/t/002_actions.pl
+++ b/src/bin/pg_checksums/t/002_actions.pl
@@ -6,7 +6,6 @@
use strict;
use warnings;
-use Config;
use PostgresNode;
use TestLib;
@@ -182,18 +181,13 @@ command_fails(
# 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.
-SKIP:
-{
- skip "unstable output generated with Msys", 3
- if ($Config{osname} eq 'msys');
- command_checks_all(
- [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
- 0,
- [qr/^on$/],
- # LOG entry when unlinking lock file.
- [qr/database system is shut down/],
- 'data_checksums=on is reported on an offline cluster');
-}
+command_checks_all(
+ [ 'postgres', '-D', $pgdata, '-C', 'data_checksums' ],
+ 0,
+ [qr/^on$/],
+ # LOG entry when unlinking lock file.
+ [qr/database system is shut down/],
+ 'data_checksums=on is reported on an offline cluster');
# Checks cannot happen with an online cluster
$node->start;
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index cbab1587cc..15f4e6f56e 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -434,6 +434,7 @@ sub run_command
my ($cmd) = @_;
my ($stdout, $stderr);
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
+ foreach ($stderr, $stdout) { s/\r\n/\n/g if $Config{osname} eq 'msys'; }
chomp($stdout);
chomp($stderr);
return ($stdout, $stderr);
@@ -878,6 +879,7 @@ sub command_like
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok($result, "$test_name: exit code 0");
is($stderr, '', "$test_name: no stderr");
+ $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $expected_stdout, "$test_name: matches");
return;
}
@@ -930,6 +932,7 @@ sub command_fails_like
print("# Running: " . join(" ", @{$cmd}) . "\n");
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok(!$result, "$test_name: exit code not 0");
+ $stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stderr, $expected_stderr, "$test_name: matches");
return;
}
@@ -974,6 +977,8 @@ sub command_checks_all
if $ret & 127;
$ret = $ret >> 8;
+ foreach ($stderr, $stdout) { s/\r\n/\n/g if $Config{osname} eq 'msys'; }
+
# check status
ok($ret == $expected_ret,
"$test_name status (got $ret vs expected $expected_ret)");
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 00:44 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 19:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andrew Dunstan <andrew@dunslane.net>
2021-09-17 23:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-20 23:30 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 23:46 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 21+ messages in thread
From: Michael Paquier @ 2021-09-20 23:30 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org
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 just been
stamped, this will have to wait a bit more.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 00:44 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-17 19:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andrew Dunstan <andrew@dunslane.net>
2021-09-17 23:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-20 23:30 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-21 23:46 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 21+ messages in thread
From: Michael Paquier @ 2021-09-21 23:46 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org
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 have to wait a bit more.
Done as of 0d91c52 & co.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-21 03:20 ` Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
1 sibling, 1 reply; 21+ messages in thread
From: Andres Freund @ 2021-09-21 03:20 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
Hi,
On 2021-09-16 02:05:02 +0000, 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 that we use
runs the scripts in a privileged account. Which normally is fine, because
pg_ctl drops permissions. However, the new test here doesn't.
See e.g. here https://cirrus-ci.com/task/6455395922214912?logs=bincheck#L27
# Running: postgres -D c:/cirrus/src/bin/pg_checksums/tmp_check/t_002_actions_node_checksum_data/pgdata -C data_checksums
not ok 22 - data_checksums=on is reported on an offline cluster status (got 1 vs expected 0)
# Failed test 'data_checksums=on is reported on an offline cluster status (got 1 vs expected 0)'
# at t/002_actions.pl line 189.
not ok 23 - data_checksums=on is reported on an offline cluster stdout /(?^:^on$)/
# Failed test 'data_checksums=on is reported on an offline cluster stdout /(?^:^on$)/'
# at t/002_actions.pl line 189.
# ''
# doesn't match '(?^:^on$)'
not ok 24 - data_checksums=on is reported on an offline cluster stderr /(?^:database system is shut down)/
# Failed test 'data_checksums=on is reported on an offline cluster stderr /(?^:database system is shut down)/'
# at t/002_actions.pl line 189.
# 'Execution of PostgreSQL by a user with administrative permissions is not
# permitted.
# The server must be started under an unprivileged user ID to prevent
# possible system security compromises. See the documentation for
# more information on how to properly start the server.
# '
# doesn't match '(?^:database system is shut down)'
### Starting node "node_checksum"
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
lock file...
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
@ 2021-09-21 03:47 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 04:32 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
0 siblings, 2 replies; 21+ messages in thread
From: Michael Paquier @ 2021-09-21 03:47 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers@lists.postgresql.org
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
> lock file...
Hmm. One way I can think of to keep the test would be something like
that to avoid problems with pg_ctl redirecting the server's stderr to
stdout (hence the tweak for log_min_messages):
pg_ctl start -s -o '-C data_checksums -c log_min_messages=fatal'
This would print the parameter, while getting to stderr mostly a
"could not start server". Would that work for you?
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-21 04:32 ` Andres Freund <andres@anarazel.de>
1 sibling, 0 replies; 21+ messages in thread
From: Andres Freund @ 2021-09-21 04:32 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org, Michael Paquier <michael@paquier.xyz>
Hi,
On September 20, 2021 8:47:24 PM PDT, Michael Paquier <michael@paquier.xyz> 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
>> should remove that requirement, given that we're actually doing stuff to the
>> lock file...
>
>Hmm. One way I can think of to keep the test would be something like
>that to avoid problems with pg_ctl redirecting the server's stderr to
>stdout (hence the tweak for log_min_messages):
>pg_ctl start -s -o '-C data_checksums -c log_min_messages=fatal'
Yes, that should work. Although error should suffice.
FWIW, I think it'd be good to hide that message in the -C case.
>This would print the parameter, while getting to stderr mostly a
>"could not start server". Would that work for you?
Yes, I think so.
Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-21 04:42 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
1 sibling, 1 reply; 21+ messages in thread
From: Michael Paquier @ 2021-09-21 04:42 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers@lists.postgresql.org
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
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;
use Fcntl qw(:seek);
-use Test::More tests => 69;
+use Test::More tests => 66;
# Utility routine to create and check a table with corrupted checksums
@@ -181,17 +181,22 @@ command_fails(
# 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=fatal to remove this noise. This test uses a startup
+# wrapped with pg_ctl to allow the case of a CI running under an unprivileged
+# 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=fatal'
+ ],
+ 1,
[qr/^on$/],
- # LOG entry when unlinking lock file.
- [qr/database system is shut down/],
+ [qr/could not start server/],
'data_checksums=on is reported on an offline cluster');
}
@@ -200,15 +205,6 @@ $node->start;
command_fails([ 'pg_checksums', '--check', '-D', $pgdata ],
"fails with online cluster");
-# 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');
Attachments:
checksum-tap-fix.patch (text/plain, 1.9K) download
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;
use Fcntl qw(:seek);
-use Test::More tests => 69;
+use Test::More tests => 66;
# Utility routine to create and check a table with corrupted checksums
@@ -181,17 +181,22 @@ command_fails(
# 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=fatal to remove this noise. This test uses a startup
+# wrapped with pg_ctl to allow the case of a CI running under an unprivileged
+# 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=fatal'
+ ],
+ 1,
[qr/^on$/],
- # LOG entry when unlinking lock file.
- [qr/database system is shut down/],
+ [qr/could not start server/],
'data_checksums=on is reported on an offline cluster');
}
@@ -200,15 +205,6 @@ $node->start;
command_fails([ 'pg_checksums', '--check', '-D', $pgdata ],
"fails with online cluster");
-# 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');
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-21 05:11 ` Andres Freund <andres@anarazel.de>
2021-09-21 05:33 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 05:37 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
0 siblings, 2 replies; 21+ messages in thread
From: Andres Freund @ 2021-09-21 05:11 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
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!
> 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
*privileged* CI account causing trouble...
> 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.
It's running now: https://cirrus-ci.com/build/5927040688848896
If interesting I can also come up with the necessary steps to activate
it in your repo...
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
@ 2021-09-21 05:33 ` Andres Freund <andres@anarazel.de>
2021-09-21 06:12 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
1 sibling, 1 reply; 21+ messages in thread
From: Andres Freund @ 2021-09-21 05:33 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
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 not worth breaking your case
> > either.
>
> It's running now: https://cirrus-ci.com/build/5927040688848896
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 secs ( 0.08 usr + 0.00 sys = 0.08 CPU)
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 05:33 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
@ 2021-09-21 06:12 ` Michael Paquier <michael@paquier.xyz>
2021-09-22 02:01 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 21+ messages in thread
From: Michael Paquier @ 2021-09-21 06:12 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers@lists.postgresql.org
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 secs ( 0.08 usr + 0.00 sys = 0.08 CPU)
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.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 05:33 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 06:12 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-22 02:01 ` Michael Paquier <michael@paquier.xyz>
2021-09-22 07:31 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-22 08:18 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
0 siblings, 2 replies; 21+ messages in thread
From: Michael Paquier @ 2021-09-22 02:01 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers@lists.postgresql.org
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. Thanks for the
report.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 05:33 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 06:12 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-22 02:01 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-22 07:31 ` Michael Paquier <michael@paquier.xyz>
1 sibling, 0 replies; 21+ messages in thread
From: Michael Paquier @ 2021-09-22 07:31 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers@lists.postgresql.org
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
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 05:33 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 06:12 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-22 02:01 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-22 08:18 ` Andres Freund <andres@anarazel.de>
1 sibling, 0 replies; 21+ messages in thread
From: Andres Freund @ 2021-09-22 08:18 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
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.pm first.
>
> 1a9d8028 should have taken care of the problem. Thanks for the
> report.
Thanks.
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
@ 2021-09-21 05:37 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 06:08 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
1 sibling, 1 reply; 21+ messages in thread
From: Michael Paquier @ 2021-09-21 05:37 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers@lists.postgresql.org
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
> *privileged* CI account causing trouble...
Er, yes. That should have been "privileged".
>> 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.
>
> It's running now: https://cirrus-ci.com/build/5927040688848896
This one has passed.
> 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.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: pgsql: Support "postgres -C" with runtime-computed GUCs
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 04:42 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Andres Freund <andres@anarazel.de>
2021-09-21 05:37 ` Re: pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
@ 2021-09-21 06:08 ` Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 21+ messages in thread
From: Andres Freund @ 2021-09-21 06:08 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
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 be included in the repo. Especially things like having automated
backtraces on all platforms is just a huge win during development.
You basically just need to configure the Cirrus extension in github, see
https://cirrus-ci.org/guide/quick-start/
Then include the changes at the top of
https://github.com/anarazel/postgres/tree/pg_checksum_ci_fail in your
tree, and it'll be built and tested (check-world) on
linux/windows/freebsd/osx.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 21+ messages in thread
end of thread, other threads:[~2021-09-22 08:18 UTC | newest]
Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 02:05 pgsql: Support "postgres -C" with runtime-computed GUCs Michael Paquier <michael@paquier.xyz>
2021-09-16 21:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 23:08 ` Michael Paquier <michael@paquier.xyz>
2021-09-17 00:44 ` Michael Paquier <michael@paquier.xyz>
2021-09-17 01:03 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-09-17 19:18 ` Andrew Dunstan <andrew@dunslane.net>
2021-09-17 23:18 ` Michael Paquier <michael@paquier.xyz>
2021-09-20 23:30 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 23:46 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 03:20 ` Andres Freund <andres@anarazel.de>
2021-09-21 03:47 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 04:32 ` Andres Freund <andres@anarazel.de>
2021-09-21 04:42 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 05:11 ` Andres Freund <andres@anarazel.de>
2021-09-21 05:33 ` Andres Freund <andres@anarazel.de>
2021-09-21 06:12 ` Michael Paquier <michael@paquier.xyz>
2021-09-22 02:01 ` Michael Paquier <michael@paquier.xyz>
2021-09-22 07:31 ` Michael Paquier <michael@paquier.xyz>
2021-09-22 08:18 ` Andres Freund <andres@anarazel.de>
2021-09-21 05:37 ` Michael Paquier <michael@paquier.xyz>
2021-09-21 06:08 ` Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox