pglogical
pglogical copied to clipboard
Consider capping pglogical.conflict_log_level at LOG
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:
- Pglogical sees a conflict and logs something like
CONFLICT: remote UPDATE on relation foo
- 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
- A new worker will be spawned and will re-attempt to apply the same change, as the earlier transaction didn't commit
- 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