mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-29 09:33:48 +00:00
`make -C postgres/conformance run-postgres` runs the corpus with the postgres backend. It uses the server at PG_DSN. If PG_DSN is not set, with-postgres.sh starts a throwaway PostgreSQL container with Docker and gives it a role that has CREATEDB and is not a superuser. A new CI job, "Run SQL tests (PostgreSQL)", runs the target. The container keeps its data on tmpfs and runs with fsync, synchronous_commit, full_page_writes, autovacuum and JIT off, and with wal_level=minimal. These settings do not change query results. The target runs two tests per CPU, because a test often waits for the server. With the LATERAL tests of #9468, 848 tests take about 6 s on 4 CPUs, against about 60 s with the default settings. The PostgreSQL version is one line in with-postgres.sh, and POSTGRES_VERSION changes it for one run. The image comes from mirror.gcr.io, because Docker Hub limits the pull rate of anonymous clients. 40 of the 187 tests failed on PostgreSQL 17. They check Turso-specific behavior: the EXPLAIN output, the catalogs that Turso keeps empty, and the error for a write to a catalog table. Three of them fail because Turso has the ACLs of PostgreSQL 16, without the MAINTAIN privilege of PostgreSQL 17. Mark them with @skip-if postgres, with a reason that tells what PostgreSQL does. Tests: make -C postgres/conformance run-postgres, which failed 40 tests before the skips; make -C postgres/conformance run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R3hzXhfjBgyLPUF7vd3PHW