Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 pods postgres replication issue after master's fail #183

Open
amegz opened this issue Mar 27, 2024 · 0 comments
Open

3 pods postgres replication issue after master's fail #183

amegz opened this issue Mar 27, 2024 · 0 comments

Comments

@amegz
Copy link

amegz commented Mar 27, 2024

I have setuped 3 pod postgres in test cluster.
when i kill a pod with a matser, one of the replicas becomes the new master, kubernetes creates a new pod and it connects to the master, replication is restored.
However, the third pod connects to the new master and can't find the wal files there:

2024-03-27 08:41:40.004 GMT [3473] FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 000000040000000000000013 has already been removed
2024-03-27 08:41:40.004 GMT [28] LOG: waiting for WAL to become available at 0/13000630
2024-03-27 08:41:45.006 GMT [3482] LOG: started streaming WAL from primary at 0/13000000 on timeline 4
2024-03-27 08:41:45.006 GMT [3482] FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 000000040000000000000013 has already been removed
2024-03-27 08:41:45.007 GMT [28] LOG: waiting for WAL to become available at 0/13000630
2024-03-27 08:41:50.008 GMT [3483] LOG: started streaming WAL from primary at 0/13000000 on timeline 4
2024-03-27 08:41:50.008 GMT [3483] FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 000000040000000000000013 has already been removed
2024-03-27 08:41:50.009 GMT [28] LOG: waiting for WAL to become available at 0/13000630

I'm not sure if this is a bug or not, what is the best way to change this behavior so that after the master crashes the replica is restored to its previous state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant