On Thu, Jul 29, 2021 at 01:26:22PM -0400, Andrew Dunstan wrote: > It gets stuck in a loop like this: > > ok 19 - one partial WAL segment was created > 0/2001968 > # Running: pg_receivewal -D > H:/prog/bf/root/HEAD/pgsql.build/src/bin/pg_basebackup/tmp_check/t_020_pg_receivewal_primary_data/archive_wal > --verbose --endpos 0/3000028 --compress 1 > pg_receivewal: starting log streaming at 0/2000000 (timeline 1) > pg_receivewal: error: could not write 131072 bytes to WAL file > "000000010000000000000002": Permission denied > pg_receivewal: error: could not close file "000000010000000000000002": > Permission denied > pg_receivewal: disconnected; waiting 5 seconds to try again
Hmm. This error is strange. Still, it is an oversight of ffc9ddae to not use --no-loop here for the two new commands of pg_receivewal --endpos. Please see the attached. -- Michael
diff --git a/src/bin/pg_basebackup/t/020_pg_receivewal.pl b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
index 65076d6632..463dddbca8 100644
--- a/src/bin/pg_basebackup/t/020_pg_receivewal.pl
+++ b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
@@ -93,7 +93,8 @@ SKIP:
$primary->command_ok(
[
'pg_receivewal', '-D', $stream_dir, '--verbose',
- '--endpos', $nextlsn, '--compress', '1 '
+ '--endpos', $nextlsn, '--compress', '1 ',
+ '--no-loop'
],
"streaming some WAL using ZLIB compression");
@@ -138,7 +139,10 @@ chomp($nextlsn);
$primary->psql('postgres',
'INSERT INTO test_table VALUES (generate_series(200,300));');
$primary->command_ok(
- [ 'pg_receivewal', '-D', $stream_dir, '--verbose', '--endpos', $nextlsn ],
+ [
+ 'pg_receivewal', '-D', $stream_dir, '--verbose',
+ '--endpos', $nextlsn, '--no-loop'
+ ],
"streaming some WAL");
$partial_wals[0] =~ s/(\.gz)?.partial//;
signature.asc
Description: PGP signature
