RE: BUG #18789: logical replication slots are deleted after failovers

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Sachin Konde-Deshmukh' <sachinkonde3(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: RE: BUG #18789: logical replication slots are deleted after failovers
Date: 2025-02-04 04:20:38
Message-ID: OS7PR01MB14968E0B6F45F8BCED2D2A6CFF5F42@OS7PR01MB14968.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dear Sachin,

Thanks for the reply!

> Only 2 nodes are in cluster,

Hmm, how did you do failover more than once with only two nodes? Did you run swtichover?
If so, did you update parameters accordingly? Also, where did you execute each query?

> I am using Patroni on these two nodes.
> Below is the configuration in patroni.yml file

Note that we are not familiar with the patroni.yml because this is a PostgreSQL
community.

> slots:
> mysub:
> type: logical
> database: postgres
> plugin: pgoutput
> failover: true
> synced: true

I grepped "failover" and "synced" on the Patroni docs, but could not find.

> parameters:
> ...
> sync_replication_slots: 'on'
> ...
> shared_preload_libraries: 'pg_failover_slots'

This part seems suspicious for me. pg_failover_slots is an external project of our
community and sync_replication_slots is also set.

> -------------------------------------
> /etc/patroni/set_all_logical_slot_status.sh

> PG_HOST="10.3.82.17"

Hmm, the IP address cannot be found in yml.

> # Loop through each slot and update the failover and synced status if necessary

This line is also suspicious. Users shouldn't update the failver/synced status by
themselves.

Overall, I think this issue needs to be broken down more. I think Patroni itself may
have the slot-failover features, so we can't say that this is a bug-candidate of PostgreSQL.
Please try to reproduce without Patronie, i.e., vanilla PostgreSQL. Then we can help you.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2025-02-04 12:43:25 BUG #18793: PLpgSQL Function Returning Type of Table is not match for varchar(n) data type via Return Query
Previous Message Tom Lane 2025-02-03 23:05:56 Re: BUG #18792: Segmentaion Fault error when changing new parameter synchronized_standby_slots