Re: POC: enable logical decoding when wal_level = 'replica' without a server restart - Mailing list pgsql-hackers

From shveta malik
Subject Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Date
Msg-id CAJpy0uA_vtur2KAHzDK+EVQWDL2EHbEYJuSYzafW7myunyuWGQ@mail.gmail.com
Whole thread Raw
In response to Re: POC: enable logical decoding when wal_level = 'replica' without a server restart  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
List pgsql-hackers
In an offline discussion with Kuroda-san, we realized that TRUNCATE
may hit Assert(XLogLogicalInfoActive()) in ExecuteTruncateGuts() under
our current implementation, where logical decoding is disabled lazily.

Consider the case where there’s only one logical slot and we attempt
to drop it. The backend issues the drop request, but before the
checkpointer actually disables logical decoding, a TRUNCATE is
executed. Since logical decoding is still marked as active at that
moment, the ExecuteTruncate() appends the OID to relids_logged.
However, by the time control reaches ExecuteTruncateGuts, the
checkpointer has already disabled logical decoding resulting in
Assert.

TRAP: failed Assert("XLogLogicalInfoActive()"), File: "tablecmds.c",
Line: 2298, PID: 16477
[local] TRUNCATE TABLE(ExceptionalCondition+0xbb)[0x5bc368d9c1fa]
[local] TRUNCATE TABLE(ExecuteTruncateGuts+0xc85)[0x5bc368806c5d]

thanks
Shveta



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Suggestion to add --continue-client-on-abort option to pgbench
Next
From: Amit Kapila
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart