{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7", "published": "2026-10-21T03:56:23Z", "publisher": "PostgresAI", "article": {"title": "When Patroni Silently Deletes Your Replication Slots", "url": "https://stormatics.tech/blogs/when-patroni-silently-deletes-your-replication-slots", "date_published": "2026-06-12T13:46:55Z", "author": "Semab Tariq", "publisher": "Stormatics"}, "grade": "A-", "axes": [{"axis": "Factual", "summary": "A \u00b7 0 wrong of 7 checked \u00b7 0 caveats"}, {"axis": "Applicable", "summary": "B+ \u00b7 1 wrong of 6 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 7 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "A \u00b7 0 wrong of 5 checked \u00b7 0 caveats"}, {"axis": "Safe", "summary": "0 wrong \u00b7 0 caveats \u00b7 2 checked"}], "findings": [{"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7#F8", "claim": "\u2026bootstrap: dcs: ignore_slots: type: logical\u2026", "title": "Editing bootstrap.dcs does not protect slots in an existing cluster", "explanation": "Editing bootstrap.dcs does not update an existing cluster. Patroni 4.1.3 documents this in docs/yaml_configuration.rst:66\u201368. Use patronictl edit-config or the REST API. Following the displayed configuration scope leaves the migration slots without the intended protection.", "verdict": "Misleading", "sources": [{"url": "https://github.com/patroni/patroni/blob/d35409952f970d7f33d36d8f868eb20fc1e2a7f7/patroni/postgresql/slots.py#L368-L371", "label": "patroni@v4.1.3 \u00b7 patroni/postgresql/slots.py:368-371"}, {"url": "https://github.com/patroni/patroni/blob/d35409952f970d7f33d36d8f868eb20fc1e2a7f7/docs/yaml_configuration.rst#L66-L68", "label": "patroni@v4.1.3 \u00b7 docs/yaml_configuration.rst:66-68"}, {"url": "https://github.com/patroni/patroni/blob/d35409952f970d7f33d36d8f868eb20fc1e2a7f7/docs/faq.rst#L126-L126", "label": "patroni@v4.1.3 \u00b7 docs/faq.rst:126-126"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7#F4", "claim": "Patroni supports a configuration option called ignore_slots\u2026", "title": "ignore_slots matches externally managed replication slots", "explanation": "Patroni v4.1.3 implements ignore_slots matching in patroni/postgresql/slots.py:307-315. Matchers can constrain name, database, plugin, and type. The unknown-slot cleanup branch skips matching slots at lines 368-371.", "verdict": "Accurate", "sources": [{"url": "https://github.com/patroni/patroni/blob/d35409952f970d7f33d36d8f868eb20fc1e2a7f7/patroni/postgresql/slots.py#L368-L371", "label": "patroni@v4.1.3 \u00b7 patroni/postgresql/slots.py:368-371"}, {"url": "https://github.com/patroni/patroni/blob/d35409952f970d7f33d36d8f868eb20fc1e2a7f7/docs/dynamic_configuration.rst#L69-L69", "label": "patroni@v4.1.3 \u00b7 docs/dynamic_configuration.rst:69-69"}, {"url": "https://github.com/patroni/patroni/blob/d35409952f970d7f33d36d8f868eb20fc1e2a7f7/patroni/postgresql/slots.py#L307-L315", "label": "patroni@v4.1.3 \u00b7 patroni/postgresql/slots.py:307-315"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7#F5", "claim": "\u2026they can block WAL cleanup\u2026", "title": "Unused replication slots can retain WAL and exhaust storage", "explanation": "Replication slots retain required WAL without a connected consumer. REL_18_4 documents this in doc/src/sgml/logicaldecoding.sgml:351-355. doc/src/sgml/high-availability.sgml:953-955 warns that retained WAL can exhaust pg_wal storage.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/logicaldecoding.sgml#L351-L355", "label": "REL_18_4 \u00b7 doc/src/sgml/logicaldecoding.sgml:351-355"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/high-availability.sgml#L953-L955", "label": "REL_18_4 \u00b7 doc/src/sgml/high-availability.sgml:953-955"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7#F6", "claim": "\u2026permanent slots are supposed to survive restarts\u2026", "title": "Persistent replication slots survive server restarts", "explanation": "Persistent replication slots outlive their connections and survive crashes. REL_18_4 states this in doc/src/sgml/logicaldecoding.sgml:285-287. A restart alone does not explain removal of an established persistent slot.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/logicaldecoding.sgml#L285-L287", "label": "REL_18_4 \u00b7 doc/src/sgml/logicaldecoding.sgml:285-287"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/backend/replication/slot.c#L19-L19", "label": "REL_18_4 \u00b7 src/backend/replication/slot.c:19-19"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7#F7", "claim": "Temporary slots are expected to disappear after a session ends\u2026", "title": "Temporary replication slots disappear when their session finishes", "explanation": "Temporary replication slots are not saved to disk. PostgreSQL drops them on error or session completion. REL_18_4 documents both conditions in doc/src/sgml/protocol.sgml:2261-2263.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/protocol.sgml#L2261-L2263", "label": "REL_18_4 \u00b7 doc/src/sgml/protocol.sgml:2261-2263"}, {"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/src/include/replication/slot.h#L28-L29", "label": "REL_18_4 \u00b7 src/include/replication/slot.h:28-29"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7#F9", "claim": "\u2026cause disk to fill up\u2026", "title": "Replication slots can exhaust WAL storage", "explanation": "Replication slots can retain enough WAL to exhaust its allocated storage. REL_18_4 doc/src/sgml/high-availability.sgml:953 warns about this risk.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/f5cc81719e6da4cbdb1f797c48b693e91018153a/doc/src/sgml/high-availability.sgml#L953-L955", "label": "REL_18_4 \u00b7 doc/src/sgml/high-availability.sgml:953-955"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/571f87b8-0152-4347-a6d4-2434a0c4dbd7#F10", "claim": "\u2026this is actually a known behavior\u2026", "title": "Patroni implements unknown-slot cleanup", "explanation": "Patroni can delete unknown replication slots. Version v4.1.3 patroni/postgresql/slots.py:368 checks unknown slots against pause state and ignore rules before attempting deletion.", "verdict": "Accurate", "sources": [{"url": "https://github.com/patroni/patroni/blob/d35409952f970d7f33d36d8f868eb20fc1e2a7f7/patroni/postgresql/slots.py#L368-L371", "label": "patroni@v4.1.3 \u00b7 patroni/postgresql/slots.py:368-371"}]}]}