Skip to content

Instantly share code, notes, and snippets.

@alex-s9s
Created November 12, 2020 10:23
Show Gist options
  • Save alex-s9s/53517ea8e2aa3f35be5ebda0d0a6f08c to your computer and use it in GitHub Desktop.
Save alex-s9s/53517ea8e2aa3f35be5ebda0d0a6f08c to your computer and use it in GitHub Desktop.
root@c9:/var/lib/postgresql# tail -100 /var/log/postgresql/postgresql-10-main.log
2020-11-11 08:31:25.836 UTC [27701] postgres@postgres DETAIL: Key (id)=(13) already exists.
2020-11-11 08:31:25.836 UTC [27701] postgres@postgres STATEMENT: insert into alex.t4 values (13);
2020-11-11 08:31:41.125 UTC [27701] postgres@postgres ERROR: duplicate key value violates unique constraint "t4_pkey"
2020-11-11 08:31:41.125 UTC [27701] postgres@postgres DETAIL: Key (id)=(10) already exists.
2020-11-11 08:31:41.125 UTC [27701] postgres@postgres STATEMENT: insert into alex.t4 values (10);
2020-11-12 10:10:43.746 UTC [10728] LOG: received fast shutdown request
2020-11-12 10:10:43.748 UTC [10728] LOG: aborting any active transactions
2020-11-12 10:10:43.754 UTC [10728] LOG: worker process: logical replication launcher (PID 10736) exited with exit code 1
2020-11-12 10:10:43.757 UTC [10730] LOG: shutting down
2020-11-12 10:10:43.838 UTC [10728] LOG: database system is shut down
2020-11-12 10:11:01.404 UTC [4563] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-11-12 10:11:01.407 UTC [4563] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-11-12 10:11:01.434 UTC [4565] LOG: database system was interrupted; last known up at 2020-11-11 06:00:04 UTC
cp: cannot stat '/tmp/pg-restore-284401112/wal/00000003.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-284401112/base/00000003.history': No such file or directory
2020-11-12 10:11:05.092 UTC [4565] LOG: starting archive recovery
cp: cannot stat '/tmp/pg-restore-284401112/wal/00000002.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-284401112/base/00000002.history': No such file or directory
2020-11-12 10:11:05.162 UTC [4565] LOG: restored log file "0000000200000029000000AA" from archive
2020-11-12 10:11:05.447 UTC [4565] LOG: redo starts at 29/AA000028
2020-11-12 10:11:05.453 UTC [4565] LOG: consistent recovery state reached at 29/AA000130
2020-11-12 10:11:05.454 UTC [4563] LOG: database system is ready to accept read only connections
2020-11-12 10:11:05.525 UTC [4565] LOG: restored log file "0000000200000029000000AB" from archive
2020-11-12 10:11:05.638 UTC [4565] LOG: restored log file "0000000200000029000000AC" from archive
cp: cannot stat '/tmp/pg-restore-284401112/wal/0000000200000029000000AD': No such file or directory
cp: cannot stat '/tmp/pg-restore-284401112/base/0000000200000029000000AD': No such file or directory
2020-11-12 10:11:05.727 UTC [4565] LOG: invalid record length at 29/AD000098: wanted 24, got 0
2020-11-12 10:11:05.727 UTC [4565] LOG: redo done at 29/AD000028
2020-11-12 10:11:05.727 UTC [4565] LOG: last completed transaction was at log time 2020-11-11 08:31:44.536726+00
cp: cannot stat '/tmp/pg-restore-284401112/wal/0000000200000029000000AD': No such file or directory
cp: cannot stat '/tmp/pg-restore-284401112/base/0000000200000029000000AD': No such file or directory
cp: cannot stat '/tmp/pg-restore-284401112/wal/00000003.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-284401112/base/00000003.history': No such file or directory
2020-11-12 10:11:05.737 UTC [4565] LOG: selected new timeline ID: 3
2020-11-12 10:11:05.810 UTC [4565] LOG: archive recovery complete
cp: cannot stat '/tmp/pg-restore-284401112/wal/00000002.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-284401112/base/00000002.history': No such file or directory
2020-11-12 10:11:06.010 UTC [4594] [unknown]@[unknown] LOG: incomplete startup packet
2020-11-12 10:11:06.209 UTC [4563] LOG: database system is ready to accept connections
2020-11-12 10:11:10.803 UTC [4621] s9s@postgres FATAL: could not open relation mapping file "global/pg_filenode.map": No such file or directory
2020-11-12 10:11:10.805 UTC [4622] s9s@postgres FATAL: could not open relation mapping file "global/pg_filenode.map": No such file or directory
2020-11-12 10:11:20.476 UTC [4595] PANIC: could not create file "pg_wal/xlogtemp.4595": No such file or directory
2020-11-12 10:11:23.591 UTC [4563] LOG: WAL writer process (PID 4595) was terminated by signal 6: Aborted
2020-11-12 10:11:23.591 UTC [4563] LOG: terminating any other active server processes
2020-11-12 10:11:23.591 UTC [4577] LOG: could not open temporary statistics file "pg_stat/global.tmp": No such file or directory
2020-11-12 10:11:23.593 UTC [4596] WARNING: terminating connection because of crash of another server process
2020-11-12 10:11:23.593 UTC [4596] 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.
2020-11-12 10:11:23.593 UTC [4596] HINT: In a moment you should be able to reconnect to the database and repeat your command.
2020-11-12 10:11:23.593 UTC [4563] LOG: archiver process (PID 4597) exited with exit code 1
2020-11-12 10:11:23.594 UTC [4563] LOG: all server processes terminated; reinitializing
2020-11-12 10:11:23.610 UTC [4563] LOG: could not open file "postmaster.pid": No such file or directory
2020-11-12 10:11:23.613 UTC [4563] PANIC: could not open control file "global/pg_control": No such file or directory
2020-11-12 10:12:05.751 UTC [4684] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-11-12 10:12:05.753 UTC [4684] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-11-12 10:12:05.779 UTC [4685] LOG: database system was shut down at 2020-11-12 10:10:43 UTC
2020-11-12 10:12:05.789 UTC [4684] LOG: database system is ready to accept connections
2020-11-12 10:12:06.328 UTC [4693] [unknown]@[unknown] LOG: incomplete startup packet
2020-11-12 10:21:44.745 UTC [4684] LOG: received fast shutdown request
2020-11-12 10:21:44.746 UTC [4684] LOG: aborting any active transactions
2020-11-12 10:21:44.751 UTC [4684] LOG: worker process: logical replication launcher (PID 4692) exited with exit code 1
2020-11-12 10:21:44.753 UTC [4686] LOG: shutting down
2020-11-12 10:21:44.851 UTC [4684] LOG: database system is shut down
2020-11-12 10:22:02.073 UTC [5202] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-11-12 10:22:02.075 UTC [5202] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-11-12 10:22:02.098 UTC [5204] LOG: database system was interrupted; last known up at 2020-11-11 06:00:04 UTC
cp: cannot stat '/tmp/pg-restore-688025431/wal/00000003.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/base/00000003.history': No such file or directory
2020-11-12 10:22:02.202 UTC [5204] LOG: starting archive recovery
cp: cannot stat '/tmp/pg-restore-688025431/wal/00000002.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/base/00000002.history': No such file or directory
2020-11-12 10:22:02.267 UTC [5204] LOG: restored log file "0000000200000029000000AA" from archive
2020-11-12 10:22:02.456 UTC [5204] LOG: redo starts at 29/AA000028
2020-11-12 10:22:02.459 UTC [5204] LOG: consistent recovery state reached at 29/AA000130
2020-11-12 10:22:02.460 UTC [5202] LOG: database system is ready to accept read only connections
2020-11-12 10:22:02.522 UTC [5204] LOG: restored log file "0000000200000029000000AB" from archive
2020-11-12 10:22:02.631 UTC [5204] LOG: restored log file "0000000200000029000000AC" from archive
cp: cannot stat '/tmp/pg-restore-688025431/wal/0000000200000029000000AD': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/base/0000000200000029000000AD': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/wal/0000000200000029000000AE': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/base/0000000200000029000000AE': No such file or directory
2020-11-12 10:22:02.711 UTC [5204] LOG: invalid record length at 29/AE000098: wanted 24, got 0
2020-11-12 10:22:02.711 UTC [5204] LOG: redo done at 29/AE000028
2020-11-12 10:22:02.711 UTC [5204] LOG: last completed transaction was at log time 2020-11-11 08:31:44.536726+00
cp: cannot stat '/tmp/pg-restore-688025431/wal/0000000200000029000000AE': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/base/0000000200000029000000AE': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/wal/00000003.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/base/00000003.history': No such file or directory
2020-11-12 10:22:02.724 UTC [5204] LOG: selected new timeline ID: 3
2020-11-12 10:22:02.827 UTC [5204] LOG: archive recovery complete
cp: cannot stat '/tmp/pg-restore-688025431/wal/00000002.history': No such file or directory
cp: cannot stat '/tmp/pg-restore-688025431/base/00000002.history': No such file or directory
2020-11-12 10:22:03.054 UTC [5237] [unknown]@[unknown] LOG: incomplete startup packet
2020-11-12 10:22:03.225 UTC [5202] LOG: database system is ready to accept connections
2020-11-12 10:22:03.228 UTC [5240] LOG: archive command failed with exit code 1
2020-11-12 10:22:03.228 UTC [5240] DETAIL: The failed archive command was: test ! -f /var/lib/postgresql/walarchive/00000003.history && cp pg_wal/00000003.history /var/lib/postgresql//walarchive/00000003.history
2020-11-12 10:22:04.231 UTC [5240] LOG: archive command failed with exit code 1
2020-11-12 10:22:04.231 UTC [5240] DETAIL: The failed archive command was: test ! -f /var/lib/postgresql/walarchive/00000003.history && cp pg_wal/00000003.history /var/lib/postgresql//walarchive/00000003.history
2020-11-12 10:22:05.234 UTC [5240] LOG: archive command failed with exit code 1
2020-11-12 10:22:05.234 UTC [5240] DETAIL: The failed archive command was: test ! -f /var/lib/postgresql/walarchive/00000003.history && cp pg_wal/00000003.history /var/lib/postgresql//walarchive/00000003.history
2020-11-12 10:22:05.235 UTC [5240] WARNING: archiving write-ahead log file "00000003.history" failed too many times, will try again later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment