From: itinance (@itinance) <noreply+itinance@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #647: Restoring a backup suddenly breaks with CREATE INDEX ... USING hnsw
Date: Mon, 19 Aug 2024 13:53:59 +0000
Message-ID: <gh-pgvector-pgvector-647@github.com> (raw)
After running almost one year successfully in a production-database, we reached a point where we can't restore a backend any more. It happens during the statement CREATE INDEX ... USING hnsw on a partitioned table.
This happens on a Macbook Pro 1, where I usually restore backups of the same database once in a week. Data storage is still available. The docker image I am using is `ankane/pgvector`.
Logfiles don't give much information, that's all I could see. Please tell me if I can provide further information:
```
db-prod-copy-146 | 2024-08-19 13:07:50.338 UTC [64] LOG: checkpoint starting: wal
db-prod-copy-146 | 2024-08-19 13:12:20.088 UTC [64] LOG: checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 67 recycled; write=269.684 s, sync=0.005 s, total=269.751 s; sync files=63, longest=0.001 s, average=0.001 s; distance=1097702 kB, estimate=1097740 kB
db-prod-copy-146 | 2024-08-19 13:44:01.427 UTC [1] LOG: server process (PID 79) was terminated by signal 9: Killed
db-prod-copy-146 | 2024-08-19 13:44:01.427 UTC [1] DETAIL: Failed process was running: CREATE INDEX embeddings_summary_embedding_idx ON vectors.embeddings_summary USING hnsw (embedding public.vector_cosine_ops);
db-prod-copy-146 | 2024-08-19 13:44:01.429 UTC [1] LOG: terminating any other active server processes
db-prod-copy-146 | 2024-08-19 13:44:01.430 UTC [1] LOG: all server processes terminated; reinitializing
db-prod-copy-146 | 2024-08-19 13:44:01.508 UTC [865] LOG: database system was interrupted; last known up at 2024-08-19 13:12:20 UTC
db-prod-copy-146 | 2024-08-19 13:44:01.832 UTC [865] LOG: database system was not properly shut down; automatic recovery in progress
db-prod-copy-146 | 2024-08-19 13:44:01.838 UTC [865] LOG: redo starts at C/4B3FF7C8
db-prod-copy-146 | 2024-08-19 13:44:02.992 UTC [865] LOG: invalid record length at C/641640E0: wanted 24, got 0
db-prod-copy-146 | 2024-08-19 13:44:02.992 UTC [865] LOG: redo done at C/641640A8 system usage: CPU: user: 0.25 s, system: 0.64 s, elapsed: 1.15 s
db-prod-copy-146 | 2024-08-19 13:44:03.002 UTC [866] LOG: checkpoint starting: end-of-recovery immediate wait
db-prod-copy-146 | 2024-08-19 13:44:04.381 UTC [866] LOG: checkpoint complete: wrote 16384 buffers (100.0%); 0 WAL file(s) added, 25 removed, 0 recycled; write=0.127 s, sync=1.144 s, total=1.381 s; sync files=65, longest=0.710 s, average=0.018 s; distance=406930 kB, estimate=406930
```