enova / pglogical_ticker

Time-based replication delay for pglogical
MIT License
3 stars 4 forks source link

fix 07_handlers test with Postgres 12.2 #10

Closed cpaelzer closed 4 years ago

cpaelzer commented 4 years ago

The FATAL keyword isn't allowed in client_min_messages since postgresql v9. 10 and later have that only on log_min_messages, but no more on client_min_messages 101112.

From the failing test:

   SET client_min_messages TO FATAL;
  +ERROR:  invalid value for parameter "client_min_messages": "fatal"
  +HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log,
   notice, warning, error

Due to that the test fails to hide even simple messages and we get later on these extra test fails:

   DROP TABLE IF EXISTS bad_pid;
  +NOTICE:  table "bad_pid" does not exist, skipping
   ...
   DROP TABLE IF EXISTS bad_pid_2;
  +NOTICE:  table "bad_pid_2" does not exist, skipping

By changing FATAL to the still allowed ERROR level this works again. The level ERROR should be even fine for PG-9 in case one uses the old versions still.

The test fail can be seen in Ubuntu and Debian

jfinzel commented 4 years ago

@cpaelzer thanks for the contribution. I had been working on this as well, but encountered something else unexpected in the mean time, namely, inconsistent behavior with test cases for the background worker when I start it with invalid configurations. I still need to polish this before a new release and at that time, re-verify that this test works. I will keep this up to date.