RE: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Thadeus Anand' <thadeus(at)rmkv(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Nantha kumar(dot)T(dot) <nanthad(at)gmail(dot)com>
Subject: RE: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
Date: 2025-08-27 07:21:04
Message-ID: OSCPR01MB14966BC4A92741FA20F44D161F538A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dear Thadeus, Nantha,

> Can these spill files in the pg_replslot folder be deleted safely, if all the subscribers have
> caught up?

Do not remove them manually. Spill files exist because the logical replication
system considers they are needed. I cannot know your system well, but in your
first example, there is a possibility that transaction 10861356 is not committed
yet thus walsender keep decoding and spilling. Actually it looks for me that
subscribers have not been caught up.
Removing them may cause unexpected behavior.

> (I noticed last night when I restarted my publisher, the spill files were removed
> automatically)

When postmaster restarts, it checks all directory under pg_replslot and removes
all .spill files. This is harmless because spilled changes would be decoded again.

> Can I use ALTER SUBSCRIPTION to set streaming on, with my existing subscriptions?

Yes, you can. More detail, after you run ALTER SUBSCRIPTION command, the apply
worker on the subscriber restarts and establishes the connection again with the
different streaming parameter.

Note that pg_stat_activity (with the pid) is still needed to understand the issue correctly.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thadeus Anand 2025-08-27 07:37:23 Re: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: [CAUTION: SUSPECT SENDER] RE: BUG #19029: Replication Slot size keeps increasing while logical subscription works fine
Previous Message PG Bug reporting form 2025-08-27 07:01:27 BUG #19033: Inconsistency between prepared statement and normal statement when cast bit to integer