Regarding canditate_restart_lsn in logical decoding.

From: reddy manjunath <rmanjunath050(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Regarding canditate_restart_lsn in logical decoding.
Date: 2024-09-02 04:55:45
Message-ID: CAC1TuFXRcV16MC6emdQ2M0a803hVD1Mznw553mW-=9-on2=LAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I have created my own output plugin for logical decoding.
I am storing decoded data in Apache kafka via pg_recvlogical utility.
Using pg_recvlogical I am updating confirmed_flush_lsn of slot based on the
value that I'm storing in kafka,this is done for every 10 secs.

In case of walsender shutdown I found that canditate_restart_lsn is not
cleared from shared memory.I also found just after restarting
sometimes canditate_restart_lsn is far more greater than actual restart_lsn
of slot,due to this frequent checkpoints are deleting the required WAL
files.

Can I clear the canditate_restart_lsn in plugin_start callback.Is there
any consequences for this?

Thanks and Regards,
G R MANJUNATH.

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2024-09-02 05:11:36 Re: Track the amount of time waiting due to cost_delay
Previous Message Amit Kapila 2024-09-02 04:42:37 Re: long-standing data loss bug in initial sync of logical replication