docker postgresql容器出现反复重启
日志:
2025-03-06 13:46:15 2025-03-06 13:46:15.129 CST [27] LOG: checkpoint starting: time
2025-03-06 13:46:21 2025-03-06 13:46:21.248 CST [27] LOG: checkpoint complete: wrote 60 buffers (0.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=6.099 s, sync=0.006 s, total=6.120 s; sync files=46, longest=0.001 s, average=0.001 s; distance=289 kB, estimate=606 kB
2025-03-06 13:46:26 2025-03-06 13:46:26.726 CST [82] LOG: unexpected EOF on client connection with an open transaction
2025-03-06 13:51:15 2025-03-06 13:51:15.245 CST [27] LOG: checkpoint starting: time
2025-03-06 13:51:20 2025-03-06 13:51:20.717 CST [27] LOG: checkpoint complete: wrote 55 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=5.463 s, sync=0.005 s, total=5.472 s; sync files=28, longest=0.001 s, average=0.001 s; distance=285 kB, estimate=574 kB
2025-03-06 13:56:15 2025-03-06 13:56:15.793 CST [27] LOG: checkpoint starting: time
2025-03-06 13:56:20 2025-03-06 13:56:20.558 CST [27] LOG: checkpoint complete: wrote 47 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.753 s, sync=0.006 s, total=4.766 s; sync files=45, longest=0.001 s, average=0.001 s; distance=171 kB, estimate=534 kB
2025-03-06 11:49:51
2025-03-06 11:49:51 PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-03-06 11:49:51
2025-03-06 14:06:15 2025-03-06 14:06:15.730 CST [27] LOG: checkpoint starting: time
2025-03-06 14:06:19 2025-03-06 14:06:19.980 CST [27] LOG: checkpoint complete: wrote 42 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.238 s, sync=0.006 s, total=4.251 s; sync files=42, longest=0.001 s, average=0.001 s; distance=145 kB, estimate=495 kB
2025-03-06 14:11:16 2025-03-06 14:11:16.038 CST [27] LOG: checkpoint starting: time
2025-03-06 14:11:21 2025-03-06 14:11:21.545 CST [27] LOG: checkpoint complete: wrote 54 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=5.497 s, sync=0.006 s, total=5.508 s; sync files=42, longest=0.001 s, average=0.001 s; distance=218 kB, estimate=467 kB
2025-03-06 14:21:16 2025-03-06 14:21:16.710 CST [27] LOG: checkpoint starting: time
2025-03-06 14:21:23 2025-03-06 14:21:23.067 CST [27] LOG: checkpoint complete: wrote 63 buffers (0.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=6.347 s, sync=0.006 s, total=6.358 s; sync files=48, longest=0.001 s, average=0.001 s; distance=264 kB, estimate=447 kB
2025-03-06 14:26:16 2025-03-06 14:26:16.121 CST [27] LOG: checkpoint starting: time
2025-03-06 14:26:16 2025-03-06 14:26:16.642 CST [27] LOG: checkpoint complete: wrote 6 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.515 s, sync=0.002 s, total=0.522 s; sync files=5, longest=0.001 s, average=0.001 s; distance=49 kB, estimate=407 kB
2025-03-06 14:31:16 2025-03-06 14:31:16.742 CST [27] LOG: checkpoint starting: time
2025-03-06 14:31:24 2025-03-06 14:31:24.074 CST [27] LOG: checkpoint complete: wrote 72 buffers (0.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=7.322 s, sync=0.006 s, total=7.333 s; sync files=63, longest=0.001 s, average=0.001 s; distance=273 kB, estimate=394 kB
2025-03-06 14:36:16 2025-03-06 14:36:16.168 CST [27] LOG: checkpoint starting: time
2025-03-06 14:36:18 2025-03-06 14:36:18.647 CST [27] LOG: checkpoint complete: wrote 25 buffers (0.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=2.474 s, sync=0.002 s, total=2.480 s; sync files=12, longest=0.001 s, average=0.001 s; distance=119 kB, estimate=366 kB
2025-03-11 15:33:03
2025-03-11 15:33:03 PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-03-11 15:33:03
2025-03-11 15:33:03 2025-03-11 15:33:03.587 CST [1] LOG: starting PostgreSQL 15.10 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
2025-03-11 15:33:03 2025-03-11 15:33:03.587 CST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-03-11 15:33:03 2025-03-11 15:33:03.587 CST [1] LOG: listening on IPv6 address "::", port 5432
2025-03-11 15:33:03 2025-03-11 15:33:03.589 CST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-03-11 15:33:03 2025-03-11 15:33:03.593 CST [28] LOG: database system was shut down at 2025-03-11 15:20:00 CST
2025-03-11 15:33:03 2025-03-11 15:33:03.594 CST [28] LOG: invalid resource manager ID in primary checkpoint record
2025-03-11 15:33:03 2025-03-11 15:33:03.594 CST [28] PANIC: could not locate a valid checkpoint record
2025-03-11 15:33:03 2025-03-11 15:33:03.594 CST [1] LOG: startup process (PID 28) was terminated by signal 6: Aborted
2025-03-11 15:33:03 2025-03-11 15:33:03.594 CST [1] LOG: aborting startup due to startup process failure
2025-03-11 15:33:03 2025-03-11 15:33:03.594 CST [1] LOG: database system is shut down
su postgres
docker run -it -v /Users/txmmy/oneai-projects/rag-api/docker/volumes/db:/var/lib/postgresql/data postgres:15-alpine /bin/bash
pg_resetwal -f /var/lib/postgresql/data/data/pgdata


浙公网安备 33010602011771号