-
Notifications
You must be signed in to change notification settings - Fork 12
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
Persist pgstat file to preserve statistic between sessions #356
base: REL_16_STABLE_neon
Are you sure you want to change the base?
Conversation
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
Co-authored-by: Konstantin Knizhnik <[email protected]>
* 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]>
Co-authored-by: Konstantin Knizhnik <[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]>
wallog_file_descriptor(char const* path, int fd) | ||
{ | ||
char prefix[MAXPGPATH]; | ||
snprintf(prefix, sizeof(prefix), "neon-file:%s", path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static Code Analysis Risk: CWE 121 -Stack-based Buffer Overflow -Stack based buffer overflow
The software directly writes into a stack buffer. This might lead to a stack-based buffer overflow. Avoid directly writing into stack buffers without proper boundary checks. Replace unsafe functions like strcpy, strcat, wcscpy, and wcscat with their safer counterparts such as strlcpy, strlcat, wcslcpy, and wcslcat, and use functions like strncpy, stpncpy, and their wide-character variants with caution, ensuring manual null-termination and proper buffer size checks.
Severity: High 🚨
Status: Open 🔴
References:
You received this notification because a new code risk has been identified
8ef3c33
to
c271017
Compare
Statistic is saved in local file and so lost on compute restart.
Persist in in page server using the same AUX file mechanism used for replication slots
See more about motivation in https://neondb.slack.com/archives/C04DGM6SMTM/p1703077676522789