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

requested WAL segment has already been removed #476

Closed
alesz opened this issue Apr 17, 2018 · 2 comments
Closed

requested WAL segment has already been removed #476

alesz opened this issue Apr 17, 2018 · 2 comments

Comments

@alesz
Copy link

alesz commented Apr 17, 2018

Submission type

  • Bug report

Environment

  • RHEL 7.5
  • PGSQL 10.3

Stolon version

0.10.0

Expected behaviour you didn't see

Slave node synchronizes successfully

Unexpected behaviour you saw

pg_basebackup fails due to WAL segments already missing by the time it is done.

Steps to reproduce the problem

Stolon executes pg_basebackup as:

/usr/pgsql-10/bin/pg_basebackup -R -Xf -D /var/lib/pgsql/10/data/postgres -d application_name=stolon_33a935d2 options=-c\ synchronous_commit=off sslmode=disable user=repluser host=x.x.x.x port=5431

According to docs, WAL segments will rotate even if replication haven't caught up when using -Xf flag.

-Xs flag should fix the issue.

@sgotti
Copy link
Member

sgotti commented Apr 17, 2018

@alesz I think we should switch to wal streaming in pg_basebackup. This will require doubling the number of wal senders to be on the safe side.

If I got the doc correctly in postgres 10 a temporary replication slot will be created if --slot is not provided. We could directly provide --slot to make it work also on older version but a side effect will be that sometimes the initial pg_basebackup will fail if the slot is not yet created on the source instance by the keeper, but a second try will succeed (so user will see a pg_basebackup error but this is better that not using a replication slot).

There is another similar issues #372

@sgotti
Copy link
Member

sgotti commented Apr 17, 2018

Created PR #477

@alesz alesz closed this as completed Apr 19, 2018
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

2 participants