pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15949: pg_basebackup failed(PG-12-Beta3)
4+ messages / 3 participants
[nested] [flat]
* BUG #15949: pg_basebackup failed(PG-12-Beta3)
@ 2019-08-12 10:31 PG Bug reporting form <noreply@postgresql.org>
2019-08-12 15:11 ` Re: BUG #15949: pg_basebackup failed(PG-12-Beta3) Jeff Janes <jeff.janes@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: PG Bug reporting form @ 2019-08-12 10:31 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: 1726002692@qq.com
The following bug has been logged on the website:
Bug reference: 15949
Logged by: 强 魏
Email address: 1726002692@qq.com
PostgreSQL version: 12beta3
Operating system: CentOS Linux release 7.6.1810 (Core)
Description:
When using pg_basebackup for compressed backup, it always fails. When not
using compressed backup, the backup succeeds.
Here are the configuration parameters:wal_sender_timeout=0
wal_receiver_timeout
[postgres@pg-master pg1203]$ pg_basebackup -D /data/backup/ -F t -R -X
stream -c fast -z -Z 5 -U postgres -d 'host=192.168.200.128 port=5432
password=root dbname=postgres'-P
WARNING: skipping special file "./.s.PGSQL.5432"
pg_basebackup: error: could not receive data from WAL stream: server closed
the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pg_basebackup: error: child process exited with exit code 1
pg_basebackup: removing contents of data directory "/data/backup/"
The error log is as follows:
2019-08-12 18:06:35.481 CST [11436] DEBUG: archived write-ahead log file
"00000001000000080000002A"
2019-08-12 18:06:35.723 CST [11432] LOG: checkpoint complete: wrote 0
buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.027 s,
sync=0.000 s, total=0.252 s; sync files=0, longest=0.000 s, average=0.000 s;
distance=65536 kB, estimate=65536 kB
2019-08-12 18:06:35.734 CST [11444] DEBUG: file "pg_internal.init" excluded
from backup
2019-08-12 18:06:35.736 CST [11446] DEBUG: received replication command:
SHOW data_directory_mode
2019-08-12 18:06:35.740 CST [11446] DEBUG: received replication command:
CREATE_REPLICATION_SLOT "pg_basebackup_11446" TEMPORARY PHYSICAL
RESERVE_WAL
2019-08-12 18:06:35.749 CST [11446] DEBUG: received replication command:
IDENTIFY_SYSTEM
2019-08-12 18:06:35.750 CST [11444] DEBUG: contents of directory
"pg_dynshmem" excluded from backup
2019-08-12 18:06:35.750 CST [11444] DEBUG: contents of directory
"pg_notify" excluded from backup
2019-08-12 18:06:35.750 CST [11444] DEBUG: contents of directory
"pg_serial" excluded from backup
2019-08-12 18:06:35.750 CST [11444] DEBUG: contents of directory
"pg_snapshots" excluded from backup
2019-08-12 18:06:35.750 CST [11444] DEBUG: contents of directory
"pg_subtrans" excluded from backup
2019-08-12 18:06:35.751 CST [11446] DEBUG: received replication command:
START_REPLICATION SLOT "pg_basebackup_11446" 8/AC000000 TIMELINE 1
2019-08-12 18:06:35.751 CST [11446] DEBUG: "pg_basebackup" has now caught
up with upstream server
2019-08-12 18:06:57.246 CST [11448] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:07:27.244 CST [11450] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:07:57.276 CST [11451] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:08:27.261 CST [11479] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:08:57.289 CST [11481] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:09:27.290 CST [11482] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:09:56.149 CST [11444] DEBUG: file "pg_internal.init" excluded
from backup
2019-08-12 18:09:57.315 CST [11483] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:10:27.320 CST [11489] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:10:57.341 CST [11490] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:11:27.352 CST [11491] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:11:57.361 CST [11492] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:12:27.380 CST [11493] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:12:57.363 CST [11495] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:13:27.392 CST [11496] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:13:57.393 CST [11499] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:14:27.406 CST [11500] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:14:57.398 CST [11506] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:15:27.413 CST [11507] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:15:57.406 CST [11508] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:16:27.430 CST [11509] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:16:57.414 CST [11510] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:17:27.440 CST [11521] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:17:57.442 CST [11522] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:18:27.450 CST [11523] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:18:57.476 CST [11527] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:19:27.465 CST [11529] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:19:57.484 CST [11530] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:20:02.551 CST [11444] DEBUG: file "pg_internal.init" excluded
from backup
2019-08-12 18:20:02.551 CST [11444] DEBUG: contents of directory
"pg_replslot" excluded from backup
2019-08-12 18:20:02.551 CST [11444] DEBUG: contents of directory
"pg_stat_tmp" excluded from backup
2019-08-12 18:20:02.551 CST [11444] DEBUG: file "postmaster.opts" excluded
from backup
2019-08-12 18:20:02.552 CST [11444] DEBUG: file "postmaster.pid" excluded
from backup
2019-08-12 18:20:02.552 CST [11444] WARNING: skipping special file
"./.s.PGSQL.5432"
Mon Aug 12 18:20:02 CST 2019
2019-08-12 18:20:02.761 CST [11436] DEBUG: archived write-ahead log file
"00000001000000080000002B"
Mon Aug 12 18:20:02 CST 2019
2019-08-12 18:20:02.779 CST [11436] DEBUG: archived write-ahead log file
"00000001000000080000002B.00000028.backup"
2019-08-12 18:20:03.417 CST [11446] LOG: could not receive data from
client: connect timeout
2019-08-12 18:20:03.417 CST [11446] LOG: unexpected EOF on standby
connection
2019-08-12 18:20:27.488 CST [11539] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:20:57.497 CST [11541] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:21:27.497 CST [11542] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:21:57.527 CST [11543] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:22:27.499 CST [11544] DEBUG: autovacuum: processing database
"postgres"
2019-08-12 18:22:57.557 CST [11545] DEBUG: autovacuum: processing database
"transfer_tb"
2019-08-12 18:23:27.529 CST [11573] DEBUG: autovacuum: processing database
"postgres"
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #15949: pg_basebackup failed(PG-12-Beta3)
2019-08-12 10:31 BUG #15949: pg_basebackup failed(PG-12-Beta3) PG Bug reporting form <noreply@postgresql.org>
@ 2019-08-12 15:11 ` Jeff Janes <jeff.janes@gmail.com>
2019-08-13 02:36 ` Re: 回复: BUG #15949: pg_basebackup failed(PG-12-Beta3) Michael Paquier <michael@paquier.xyz>
2019-08-13 17:48 ` Re: BUG #15949: pg_basebackup failed(PG-12-Beta3) Jeff Janes <jeff.janes@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Janes @ 2019-08-12 15:11 UTC (permalink / raw)
To: 1726002692@qq.com; pgsql-bugs@lists.postgresql.org
On Mon, Aug 12, 2019 at 6:32 AM PG Bug reporting form <
noreply@postgresql.org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 15949
> Logged by: 强 魏
> Email address: 1726002692@qq.com
> PostgreSQL version: 12beta3
>
Did it work in other versions, or is this the only one you tested?
> Here are the configuration parameters:wal_sender_timeout=0
> wal_receiver_timeout
>
The above looks like an incomplete copy and paste.
Cheers,
Jeff
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: 回复: BUG #15949: pg_basebackup failed(PG-12-Beta3)
2019-08-12 10:31 BUG #15949: pg_basebackup failed(PG-12-Beta3) PG Bug reporting form <noreply@postgresql.org>
2019-08-12 15:11 ` Re: BUG #15949: pg_basebackup failed(PG-12-Beta3) Jeff Janes <jeff.janes@gmail.com>
@ 2019-08-13 02:36 ` Michael Paquier <michael@paquier.xyz>
1 sibling, 0 replies; 4+ messages in thread
From: Michael Paquier @ 2019-08-13 02:36 UTC (permalink / raw)
To: 两个孩子的爹 <1726002692@qq.com>; +Cc: Jeff Janes <jeff.janes@gmail.com>; pgsql-bugs <pgsql-bugs@lists.postgresql.org>
On Tue, Aug 13, 2019 at 09:18:36AM +0800, 两个孩子的爹 wrote:
> I only tested PG-12-Beta 3.
> Backup completed normally, but did not seem to end correctly。
> Backup files are generated during the backup process, but nothing is
> left at the end of the backup process.
I have done a couple of tests with a couple of configurations:
- Instance with multiple tablespaces.
- wal_receiver_timeout and wal_sender_timeout set at 0
- Compression enabled with pg_basebackup, same as you at level 5
(worked even at higher levels).
- Tar format used.
Unfortunately I have no traces of failures in my own tests, and the
format of each tablespace tarballs was correct.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #15949: pg_basebackup failed(PG-12-Beta3)
2019-08-12 10:31 BUG #15949: pg_basebackup failed(PG-12-Beta3) PG Bug reporting form <noreply@postgresql.org>
2019-08-12 15:11 ` Re: BUG #15949: pg_basebackup failed(PG-12-Beta3) Jeff Janes <jeff.janes@gmail.com>
@ 2019-08-13 17:48 ` Jeff Janes <jeff.janes@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Janes @ 2019-08-13 17:48 UTC (permalink / raw)
To: 两个孩子的爹 <1726002692@qq.com>; +Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
On Mon, Aug 12, 2019 at 9:18 PM 两个孩子的爹 <1726002692@qq.com> wrote:
> Hi :
> I only tested PG-12-Beta 3.
>
Could you try testing a released version (like 11.5), between the same two
machine? It could help rule some possibilities in or out.
Also, what are all your timeout settings? And your keep alive? And your
unix_socket_directories?
select name,setting from pg_settings where name like '%keep%' or name like
'%timeout%' or name like '%socket_direct%';
I suspect that something in your network (firewall, gateway, etc.) is
interfering with the connection. Turning on compression just slows down
the client (pg_basebackup) enough that it gives this interference time to
happen.
> Backup completed normally, but did not seem to end correctly.
>
In your first email, the server did think something went wrong:
"2019-08-12 18:20:03.417 CST [11446] LOG: could not receive data from
client: connect timeout"
I think the "connection timeout" part of this message is generated by your
OS, and PostgreSQL just passes it along. It doesn't seem to be a timeout
which PostgreSQL is expecting to happen, which makes me think the problem
is in your network rather than in PostgreSQL itself.
In the log in your most recent email, it does look like the server believes
everything completed normally, while only the client senses an error.
Again, it seems to me that something in your network is injecting itself
between the two ends of the connection.
Cheers,
Jeff
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-08-13 17:48 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 10:31 BUG #15949: pg_basebackup failed(PG-12-Beta3) PG Bug reporting form <noreply@postgresql.org>
2019-08-12 15:11 ` Jeff Janes <jeff.janes@gmail.com>
2019-08-13 02:36 ` Re: 回复: BUG #15949: pg_basebackup failed(PG-12-Beta3) Michael Paquier <michael@paquier.xyz>
2019-08-13 17:48 ` Jeff Janes <jeff.janes@gmail.com>
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