Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>,
shveta malik <shveta.malik@gmail.com>
Date: 2025-06-04T10:10:38Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix regression test failure when wal_level is set to minimal.
- 0de5f0d869d1 19 (unreleased) landed
-
Toggle logical decoding dynamically based on logical slot presence.
- 67c20979ce72 19 (unreleased) landed
-
Disallow server start with sync_replication_slots = on and wal_level < logical.
- 12da45742cfd 19 (unreleased) cited
On Wed, Jun 4, 2025 at 6:41 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Tue, May 20, 2025 at 9:54 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > Yeah, I find the idea that the presence of a logical slot will allow > > the user to enable logical decoding/replication more appealing than > > this new alternative, leaving aside the challenges of realizing it. +1. This idea appears more user-friendly and easier to understand compared to other approaches, such as having multiple GUCs or using ALTER SYSTEM. > I've drafted this idea. Here are summary for attached two patches: > > 0001 patch allows us to create a logical slot without WAL reservation. > > 0002 patch is the main patch for dynamically enabling/disabling > logical decoding when wal_level is 'replica'. Thank You for the patches. I have done some initial testing, it seems to be working well. I will do more testing and review and will share further feedback. thanks Shveta