I am running a WAL log shipping standby/backup server configuration, and I have been using
pg_basebackup and to create a full backup of a PostgreSQL database without issues for awhile. But as of this week, I had to use it again, and is failing with error below. I have tried increasing
max_wal_senders to 20 and
wal_sender_timeout to 600s but it is giving the same error. This error usually happens at the very end of the backup but sometimes it also happens in the middle. The title is the part of the error that appears most relevant.
WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. HINT: In a moment you should be able to reconnect to the database and repeat your command. pg_basebackup: error: could not receive data from WAL stream: SSL SYSCALL error: EOF detected pg_basebackup: error: could not read COPY data: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. pg_basebackup: removing data directory "/var/lib/postgresql/12/main"
This is from what I can tell the relevant part of the log file from the last time it crashed when I tried this. The rest of the logs from this time are about terminating connections because of a server process crash just like the WARNING from the original error.
2022-12-30 04:40:51.058 CST  nathan@ISO PANIC: could not fdatasync file "000000040000038100000036": Input/output error 2022-12-30 04:40:51.058 CST  nathan@ISO STATEMENT: COMMIT 2022-12-30 04:40:51.239 CST  LOG: server process (PID 18121) was terminated by signal 6: Aborted
I am using PostgreSQL 12 on Ubuntu 18.04.