Comments (6)
Correct. We should generally drop any HA replication slot on a standby node if it has xmin
or catalog_xmin
set.
from cloudnative-pg.
This is an interesting issue. The main on a standby slot should not have been initialized, so it happened when node 3 was primary. AFAIK the only way to clear the xmin
field is to delete the replication slot. I think the operator should do it automatically in this case.
from cloudnative-pg.
I confirm the bug. If hot_standby_feedback
is on, the xmin
remains set for the slots on the previous primary, which stops the vacuum. We need to drop the slot and recreate it.
from cloudnative-pg.
great!
so the workaround in my case is
select pg_drop_replication_slot('_cnpg_keycloak_5');
on keycloak-3?
from cloudnative-pg.
I tested on a demo cluster and it worked
postgres=# select * from pg_replication_slots ;
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size | two_phase | conflicting
------------------+--------+-----------+--------+----------+-----------+--------+------------+----------+--------------+--------------+---------------------+------------+---------------+-----------+-------------
_cnpg_keycloak_5 | | physical | | | f | f | | 58198033 | | 824/5A000000 | | reserved | 9048875335680 | f |
(1 row)
postgres=# select pg_drop_replica
postgres=# select pg_drop_replication_slot('_cnpg_keycloak_5');
pg_drop_replication_slot
--------------------------
(1 row)
postgres=# select * from pg_replication_slots ;
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size | two_phase | conflicting
------------------+--------+-----------+--------+----------+-----------+--------+------------+------+--------------+--------------+---------------------+------------+---------------+-----------+-------------
_cnpg_keycloak_5 | | physical | | | f | f | | | | 824/5A000000 | | reserved | 9048875335680 | f |
from cloudnative-pg.
Workaround works!
from cloudnative-pg.
Related Issues (20)
- [Feature]: Add new options to ginkgo
- Introduce release candidate process
- Backport failure for pull request 4765
- [E2E]: Add pgaudit tests HOT 1
- [Feature]: Use Ciclops thermometer when sending E2E alerts
- [Bug]: Pooler login failing after migrating to Postgres 16 HOT 5
- [Bug]: PostgreSQL switch over endless loop with WAL errors like servers diverged at WAL location
- [Docs]: Release notes for 1.23.2, 1.22.4, and 1.21.6 (EOL)
- Backport failure for pull request 4811 HOT 1
- [Bug]: pgbouncer missing metrics error with podMonitor enabled
- [Feature]: add .spec.timeZone to ScheduledBackup
- [CI] Avoid using GITHUB_TOKEN when opening a PR or updating a label
- Backport failure for pull request 4775 HOT 3
- [Docs]: Cluster-Wide Permissions and Operator Deployment
- [Bug]: Replica cluster monitoring fails if source cluster database is non-default and replica clusters bootstrap stanza does not specify custom database name
- [Bug]: OperatorHub.io release must only happen on the latest release branch
- [Bug]: plugin command status fails getting PDB HOT 1
- [Feature]: add support for Barman 3.10.1 HOT 1
- Reassests the operator permissions looking to reduce as much as possible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudnative-pg.