pglogical icon indicating copy to clipboard operation
pglogical copied to clipboard

Consider capping pglogical.conflict_log_level at LOG

Open tommyzli opened this issue 4 years ago • 0 comments

The postgres log handler will call abort() if it sees a PANIC level log and will call exit() if it sees a FATAL level log. So if pglogical.conflict_log_level is set to one of those values, the first conflict that is logged will induce a crash loop where:

  1. Pglogical sees a conflict and logs something like CONFLICT: remote UPDATE on relation foo
  2. If that log line is configured to be FATAL or higher, the pglogical worker applying that change will be terminated and it’s transaction rolled back
  3. A new worker will be spawned and will re-attempt to apply the same change, as the earlier transaction didn't commit
  4. GOTO 1

I can’t imagine anyone would want this to happen, so it may be worthwhile to add some checks that reject FATAL and PANIC as settings for conflict_log_level

tommyzli avatar Nov 17 '20 22:11 tommyzli