diff --git a/docs/release/postgres-restore-readiness-2026-10-31.json b/docs/release/postgres-restore-readiness-2026-10-31.json new file mode 100644 index 0000000..1d0311d --- /dev/null +++ b/docs/release/postgres-restore-readiness-2026-10-31.json @@ -0,0 +1,39 @@ +{ + "schema": "coulomb.postgres-startup-readiness-observation.v1", + "image": "sha256:ff23cdce56cac62ada6f66013e1a50864c0abbe79d132d40b6e05bd80f378a70", + "observations": [ + { + "unix_socket_ready": false, + "target_database_tcp_ready": false + }, + { + "unix_socket_ready": false, + "target_database_tcp_ready": false + }, + { + "unix_socket_ready": false, + "target_database_tcp_ready": false + }, + { + "unix_socket_ready": false, + "target_database_tcp_ready": false + }, + { + "unix_socket_ready": false, + "target_database_tcp_ready": false + }, + { + "unix_socket_ready": true, + "target_database_tcp_ready": false + }, + { + "unix_socket_ready": false, + "target_database_tcp_ready": true + } + ], + "early_unix_ready_observed": true, + "final_target_database_tcp_ready": true, + "network": "none", + "published_ports": 0, + "production_data_used": false +} diff --git a/scripts/restore-paired-snapshot.py b/scripts/restore-paired-snapshot.py index 699aedb..98b6a77 100644 --- a/scripts/restore-paired-snapshot.py +++ b/scripts/restore-paired-snapshot.py @@ -116,7 +116,12 @@ def main() -> int: '-e', 'POSTGRES_DB=coulomb_social_restore', image]) created = True for _ in range(45): - p = subprocess.run(['docker', 'exec', name, 'pg_isready', '-U', 'postgres'], + # The image's temporary initialization server accepts Unix-socket + # connections before creating the target DB and restarting. Require + # a query against the final TCP server before starting pg_restore. + p = subprocess.run(['docker', 'exec', name, 'psql', '-h', '127.0.0.1', + '-U', 'postgres', '-d', 'coulomb_social_restore', + '-tAc', 'SELECT 1'], capture_output=True) if p.returncode == 0: break