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

receivePtr is not a valid restart_lsn #26

Open
tvondra opened this issue Sep 7, 2023 · 0 comments
Open

receivePtr is not a valid restart_lsn #26

tvondra opened this issue Sep 7, 2023 · 0 comments

Comments

@tvondra
Copy link

tvondra commented Sep 7, 2023

wait_for_primary_slot_catchup does this, but that's incorrect:

		if (new_slot->restart_lsn > receivePtr)
			new_slot->restart_lsn = receivePtr;

restart_lsn is expected to be a valid decoding position, in particular it needs to meet this assert in XLogDecodeNextRecord:

Assert(XRecOffIsValid(RecPtr))

The flush position can easily be a multiple of WAL page, for example, violating the assert.

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