Compare commits

...

3 Commits

Author SHA1 Message Date
Amit Kapila 3e36e48d8e Fix a test in 003_logical_slots.
We allow to upgrade the slot iff there is no pending WAL to be processed.
The test first disables the subscription to avoid unnecessary LOGs on the
subscriber and then stops the publisher node. It is quite possible that
just before the shutdown of the publisher, autovacuum generates some WAL
record that needs to be processed, so just disable the autovacuum for this
test.

Per buildfarm.

Author: Hayato Kuroda
Reviewed-by: Amit Kapila
Discussion: http://postgr.es/m/OS3PR01MB9882FED1F0060468FB01B9DAF583A@OS3PR01MB9882.jpnprd01.prod.outlook.com
2023-11-30 09:31:21 +05:30
Masahiko Sawada 5abff2aaa1 Fix wrong description of BackgroundPsql's timeout.
Backpatch through 16 where this was introduced by 664d757531.

Reviewed-by: Daniel Gustafsson
Backpatch-through: 16
Discussion: http://postgr.es/m/CAD21AoBXMEqDBLoDuAWVWoTLYB4aNsxx4oYNmyJJbhfq_vGQBQ@mail.gmail.com
2023-11-30 11:23:00 +09:00
Masahiko Sawada f99dd98242 Fix BackgroundPsql's set_query_timer_restart() issue without argument.
The set_query_timer_restart() required an argument to define a value
to query_timer_restart, but none of the existing callers passes an
argument to this function.

This changes the function to set a value without an argument.

Backpatch through 16 where the background psql TAP functions were
refactored by 664d757531.

Reviewed-by: Bharath Rupireddy, Tom Lane
Discussion: https://postgr.es/m/CAD21AoA0B6VKe_5A9nZi8i5umwSN-zJJuPVNht9DaOZ9SJumMA@mail.gmail.com
Backpatch-through: 16
2023-11-30 10:14:17 +09:00
3 changed files with 4 additions and 5 deletions

View File

@ -17,6 +17,7 @@ my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy';
# Initialize old cluster
my $oldpub = PostgreSQL::Test::Cluster->new('oldpub');
$oldpub->init(allows_streaming => 'logical');
$oldpub->append_conf('postgresql.conf', 'autovacuum = off');
# Initialize new cluster
my $newpub = PostgreSQL::Test::Cluster->new('newpub');

View File

@ -301,7 +301,7 @@ sub set_query_timer_restart
{
my $self = shift;
$self->{query_timer_restart} = shift if @_;
$self->{query_timer_restart} = 1;
return $self->{query_timer_restart};
}

View File

@ -2028,8 +2028,7 @@ sub psql
Invoke B<psql> on B<$dbname> and return a BackgroundPsql object.
A default timeout of $PostgreSQL::Test::Utils::timeout_default is set up,
which can be modified later.
A timeout of $PostgreSQL::Test::Utils::timeout_default is set up.
psql is invoked in tuples-only unaligned mode with reading of B<.psqlrc>
disabled. That may be overridden by passing extra psql parameters.
@ -2095,8 +2094,7 @@ sub background_psql
Invoke B<psql> on B<$dbname> and return a BackgroundPsql object, which the
caller may use to send interactive input to B<psql>.
A default timeout of $PostgreSQL::Test::Utils::timeout_default is set up,
which can be modified later.
A timeout of $PostgreSQL::Test::Utils::timeout_default is set up.
psql is invoked in tuples-only unaligned mode with reading of B<.psqlrc>
disabled. That may be overridden by passing extra psql parameters.