jfischoff / tmp-postgres

Create temporary postgres instances
BSD 3-Clause "New" or "Revised" License
53 stars 17 forks source link

PostgreSQL 12 and above no longer use `recovery.conf`. #283

Open noteed opened 6 months ago

noteed commented 6 months ago

While running the tests, the one called "can support backup and restore" fails with

  test/Main.hs:751:3: 
  1) can support backup and restore
       uncaught exception: StartError
       StartPostgresFailed (ExitFailure 1)

(Or similar, as I have edited the file.)

It was hard to diagnose, but starting postgres manually gave me

2024-03-09 01:20:02.991 GMT [1573] LOG:  starting PostgreSQL 14.9 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.2.0, 64-bit
2024-03-09 01:20:02.991 GMT [1573] LOG:  listening on IPv4 address "127.0.0.1", port 36081
2024-03-09 01:20:02.992 GMT [1573] LOG:  listening on IPv6 address "::1", port 36081
2024-03-09 01:20:02.994 GMT [1573] LOG:  listening on Unix socket "/tmp/tmp-postgres-socket-0a2f8e10b1a74a66/.s.PGSQL.36081"
2024-03-09 01:20:03.002 GMT [1574] LOG:  database system was interrupted; last known up at 2024-03-09 01:20:02 GMT
2024-03-09 01:20:03.112 GMT [1574] FATAL:  using recovery command file "recovery.conf" is not supported
2024-03-09 01:20:03.113 GMT [1573] LOG:  startup process (PID 1574) exited with exit code 1
2024-03-09 01:20:03.113 GMT [1573] LOG:  aborting startup due to startup process failure
2024-03-09 01:20:03.114 GMT [1573] LOG:  database system is shut down

From this documentation https://www.postgresql.org/docs/current/recovery-config.html, it appears that the recovery.conf file is no longer used, but instead the normal postgresql.conf is used.