0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-04 10:39:43 +08:00
discourse/spec/fixtures/db
Jake Goldsborough 7c03546b89 FIX: Strip SET transaction_timeout when restoring backups
pg_dump 17 and later adds SET transaction_timeout = 0 to dumps, but
the parameter only exists on PostgreSQL 17+ servers. Restoring such a
dump on PostgreSQL 16 or older fails with:

  psql failed: ERROR: unrecognized configuration parameter "transaction_timeout"

This is easy to hit because postgres client tools are commonly newer
than the server they talk to (the discourse_docker base image ships
the latest client alongside the default version, and pg_dump resolves
to the newest one installed), so backups can quietly become
un-restorable on the server that created them.

Strip the line during restore like the other version-specific SQL in
the unwanted_sql list.
2026-07-16 00:02:53 +00:00
..
migrate
post_migrate
restore FIX: Strip SET transaction_timeout when restoring backups 2026-07-16 00:02:53 +00:00