From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |
Date: | 2025-09-25 19:15:27 |
Message-ID: | CAD21AoC8PSjTpSMBTs8ORGb6=_wSDJZSbMwuQH39KwfTWAYEpA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 25, 2025 at 4:57 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Tue, Sep 23, 2025 at 3:28 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> >
> > I've attached the updated patch. It incorporates all comments I got so
> > far and implements to lazily disable logical decoding. It's used only
> > when the process tries to disable logical decoding during process
> > exit.
> >
>
> I am resuming the review now. I agree with the discussion of lazily
> disabling logical decoding on ERROR or process-exit for temp-slot.
>
> Few initial comments:
Thank you for the comments!
>
> 1)
> I see that on standby too, during proc-exit, we set 'pending_disable'.
> But it never resets it, as DisableLogicalDecodingIfNecessary is no-op
> on standby. And thus the checkpoint keeps on attempting to reset it
> everytime. Do we even need to set it on standby?
>
> Logfile has repeated: 'start completing pending logical decoding
> disable request'
Ugh, I missed that part. I think that standbys should not delegate the
deactivation to the checkpointer uless the deactivation is actually
required.
> 2)
> + ereport(LOG,
> + (errmsg("skip disabling logical decoding as during process exit")));
>
> 'as' not needed.
I've fixed the above two points and attached the new version patch.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v15-0001-Enable-logical-decoding-dynamically-based-on-log.patch | application/octet-stream | 99.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2025-09-25 19:19:55 | Re: [PATCH] Fix pg_rewind false positives caused by shutdown-only WAL |
Previous Message | Masahiko Sawada | 2025-09-25 19:14:04 | Re: Add memory_limit_hits to pg_stat_replication_slots |