Re: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine - Mailing list pgsql-bugs

From Nantha kumar.T.
Subject Re: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
Date
Msg-id CAH9ZH4_Vp4rTbRn4WJktye1r574FHLzGPoavSB1zqbLxvnhHsQ@mail.gmail.com
Whole thread Raw
In response to Re: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine  (Thadeus Anand <thadeus@rmkv.com>)
Responses Re: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
List pgsql-bugs
Hi Thadeus Anand, Recently in our postgres 16.4 version system we have encountered similar kind of pg_repslot folder size growing abnormally. The files in this folders are just spill over Wal files due to long running or complex transactions. There are commands to check the slot's holding transactions count which related to this spill. If required can share the same. So suggesting to monitor the transactions/sub transactions that are executing. Well for our case, one of the past transaction invoked the issue. 

Not sure whether it's bug which have to be addressed in 17.5. 

On Tue, 26 Aug, 2025, 17:51 Thadeus Anand, <thadeus@rmkv.com> wrote:
Hi,

Here is the result of "select * from pg_replication_slots"

slot_namepluginslot_typedatoiddatabasetemporaryactiveactive_pidxmincatalog_xminrestart_lsnconfirmed_flush_lsnwal_statussafe_wal_sizetwo_phaseinactive_sinceconflictinginvalidation_reasonfailoversynced
rmkv_crm_sub_twnpgoutputlogical5postgresFALSETRUE240,409[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_main_sub_twnpgoutputlogical5postgresFALSETRUE240,410[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
standby_slot[NULL]physical[NULL][NULL]FALSETRUE240,458[NULL][NULL]2EA/834D54B8[NULL]reserved21,486,545,736FALSE[NULL][NULL][NULL]FALSEFALSE
rmkv_crm_sub_cbepgoutputlogical5postgresFALSETRUE240,404[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_main_sub_cbepgoutputlogical5postgresFALSETRUE240,406[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_crm_sub_tvlpgoutputlogical5postgresFALSETRUE240,408[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_main_sub_tvlpgoutputlogical5postgresFALSETRUE240,411[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_crm_sub_blrpgoutputlogical5postgresFALSETRUE240,405[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_main_sub_blrpgoutputlogical5postgresFALSETRUE240,407[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_crm_sub_vchpgoutputlogical5postgresFALSETRUE240,403[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_main_sub_vchpgoutputlogical5postgresFALSETRUE240,401[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_crm_sub_vdppgoutputlogical5postgresFALSETRUE240,400[NULL]108613252E9/296801D02EA/834D54B8reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE
rmkv_main_sub_vdppgoutputlogical5postgresFALSETRUE419,107[NULL]108613252E9/296801D02EA/1E788780reserved15,681,629,000FALSE[NULL]FALSE[NULL]FALSEFALSE

Thadeus Anand.



On Tue, Aug 26, 2025 at 5:44 PM Thadeus Anand <thadeus@rmkv.com> wrote:
Hi,

Since this afternoon, the replication slot folders have started to grow in size again. I have attached a couple of screenshots showing the size and some contents of a folder. Hope you find them useful.

I checked the database log at the publisher, and could find nothing suspicious around that time when the spill files started appearing.

Thadeus Anand.


On Tue, Aug 26, 2025 at 4:05 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
On Tue, Aug 26, 2025 at 1:45 PM Thadeus Anand <thadeus@rmkv.com> wrote:
>
> We created the publications and subscriptions again last night after restarting the publisher and all the subscribers.
>
> So far, everything seems to be working fine, and the replication slot folders remain at 4 KB each.
>
> I did not change anything, and didn't do anything differently this time. In any case, I will monitor this closely and let you know if any malfunction.occurs.
>

Thanks for the update.

--
With Regards,
Amit Kapila.

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #19032: In restore_command %f parameter does not support WAL partial files.
Next
From: Thadeus Anand
Date:
Subject: Re: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine