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

Do not set hint bits at replica until running-xacts record is received #403

Open
wants to merge 25 commits into
base: REL_16_STABLE_neon
Choose a base branch
from

Conversation

knizhnik
Copy link
Contributor

@knizhnik knizhnik commented Mar 22, 2024

Matthias van de Meent and others added 25 commits February 6, 2024 13:06
This prepares PostgreSQL for compatibility with Neon's storage.
Significant changes compared to the PostgreSQL 15 patchset include:

- Backported changes for users and roles are no longer required
- Use RM_NEON_ID for changes in WAL, instead of modifying core WAL records
* Neon logical replication support for PG16

* Log heap rewrite file after creation.

---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
Co-authored-by: Arseny Sher <[email protected]>
* Update WAL buffers when restoring WAL at compute needed for LR

* Fix copying data in WAL buffers

---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
PG16 adds new function to SMGR: zeroextend
It's implementation in Neon actually wal-log zero pages of extended relation.
This zero page is wal-logged using XLOG_FPI.
As far as page is zero, the hole optimization (excluding from the image everything between pg_upper and pd_lower) doesn't work.

This PR allows to set hole size to BLCKSZ in case of zero page (PageIsNull() returns true).
---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
* Prevent output callbacks from hearing about neon-file messages
* Load SLRU segments on demand

refer #8763

* Fix errors in downloading SLRU segments

* Fix build problems

* Undo occcasional changes

* Remove unintenmded changes

* Fix smgr_read_slru_segment

* Determine SLRU kind in extension

* Use ctl->PagePrecedes for SLRU page comparison in SimpleLruDownloadSegment to address wraparround

---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
…mary is not alive (#363)

* Set wasShutdown=true during hot-standby replica startup only when primary is not alive
* Report fatal error if hot standaby replica is started with oldestAcriveXid=0

Postgres part of neondatabase/neon#6705
---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
…d for oldestActiveXid while replica startup (#387)

Co-authored-by: Konstantin Knizhnik <[email protected]>
This keeps the walproposer processes alive at shutdown, until after
the shutdown checkpoint has been written. That gives the walproposers
a chance to stream it to the safekeepers.
…on' error message (#390)

Co-authored-by: Konstantin Knizhnik <[email protected]>
This is done in other Postgres headers.
Do not set hint bits at replica until running-xacts record is received
@skyzh
Copy link
Member

skyzh commented Mar 25, 2024

linking to neondatabase/neon#7236

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

Successfully merging this pull request may close these issues.

None yet

6 participants