Compare commits

...

4 Commits

Author SHA1 Message Date
Konstantin Knizhnik
bb86bd230d Edit revisions.json 2024-08-05 14:57:26 +03:00
Konstantin Knizhnik
0f855757a8 Bump postgres version 2024-08-05 14:55:33 +03:00
Konstantin Knizhnik
33f2a2bc55 Use prefetch for reading DuckDB pages 2024-08-05 14:53:27 +03:00
Konstantin Knizhnik
06b8f013f0 Supprot opaque mode for log_newpages 2024-08-05 14:51:16 +03:00
5 changed files with 8 additions and 5 deletions

View File

@@ -203,8 +203,9 @@ pub const XLR_BLOCK_ID_DATA_LONG: u8 = 254;
pub const XLR_BLOCK_ID_ORIGIN: u8 = 253;
pub const XLR_BLOCK_ID_TOPLEVEL_XID: u8 = 252;
pub const BKPBLOCK_FORK_MASK: u8 = 0x0F;
pub const _BKPBLOCK_FLAG_MASK: u8 = 0xF0;
pub const BKPBLOCK_FORK_MASK: u8 = 0x07;
pub const BKPBLOCK_FLAG_MASK: u8 = 0xF8;
pub const BKPBLOCK_OPAQUE: u8 = 0x08; /* page has no page header */
pub const BKPBLOCK_HAS_IMAGE: u8 = 0x10; /* block data is an XLogRecordBlockImage */
pub const BKPBLOCK_HAS_DATA: u8 = 0x20;
pub const BKPBLOCK_WILL_INIT: u8 = 0x40; /* redo will re-init the page */

View File

@@ -535,7 +535,7 @@ impl WalIngest {
// The page may be uninitialized. If so, we can't set the LSN because
// that would corrupt the page.
//
if !page_is_new(&image) {
if !blk.opaque && !page_is_new(&image) {
page_set_lsn(&mut image, lsn)
}
assert_eq!(image.len(), BLCKSZ as usize);

View File

@@ -129,6 +129,7 @@ pub struct DecodedBkpBlock {
pub apply_image: bool,
/* has image that should be restored */
pub will_init: bool,
pub opaque: bool,
/* record doesn't need previous page version to apply */
//char *bkp_image;
pub hole_offset: u16,
@@ -1000,6 +1001,7 @@ pub fn decode_wal_record(
blk.has_image = (fork_flags & pg_constants::BKPBLOCK_HAS_IMAGE) != 0;
blk.has_data = (fork_flags & pg_constants::BKPBLOCK_HAS_DATA) != 0;
blk.will_init = (fork_flags & pg_constants::BKPBLOCK_WILL_INIT) != 0;
blk.opaque = (fork_flags & pg_constants::BKPBLOCK_OPAQUE) != 0;
blk.data_len = buf.get_u16_le();
/* TODO cross-check that the HAS_DATA flag is set iff data_length > 0 */

View File

@@ -1,5 +1,5 @@
{
"v16": ["16.3", "5377f5ed7290af45b7cb6b0d98d43cbf4a4e77f3"],
"v16": ["16.3", "60fab0e62ca0150276bf03231cc1339b29d3465c"],
"v15": ["15.7", "9eba7dd382606ffca43aca865f337ec21bcdac73"],
"v14": ["14.12", "7bbe834c8c2dc37802eca8484311599bc47341f6"]
}