Skip to content

null offset LSN, contrecords and WAL parsing #115

Closed
@gsmolk

Description

@gsmolk

Another insane postgres behavior to handle.
It is known that replica may return null-offset (0/3000000) or normal but not actually existing lsn as STOP_LSN. Currently we handle this problem by looking for previous record, which EndRecPtr is equal or greater than returned lsn. Turns out this approach is unsound for write-busy systems with a lot of contrecords in WAL.
I think that instead of look-behind we should try the look-forward first, and if that fails, fallback to look-behind.

reported by Alexander Nikitin

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions