mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-17 10:22:56 +00:00
Add more traces to PS to understand the reasons of last commits in test_restart_subscriber
This commit is contained in:
@@ -413,6 +413,10 @@ where
|
||||
let mut content = Vec::with_capacity(n_origins * 16 + 8);
|
||||
content.extend_from_slice(&pg_constants::REPLICATION_STATE_MAGIC.to_le_bytes());
|
||||
for (origin_id, origin_lsn) in repl_origins {
|
||||
info!(
|
||||
"Include origin_id={}, origin_lsn={} in basebackup",
|
||||
origin_id, origin_lsn
|
||||
);
|
||||
content.extend_from_slice(&origin_id.to_le_bytes());
|
||||
content.extend_from_slice(&[0u8; 6]); // align to 8 bytes
|
||||
content.extend_from_slice(&origin_lsn.0.to_le_bytes());
|
||||
|
||||
@@ -408,11 +408,16 @@ impl WalIngest {
|
||||
let info = decoded.xl_info & pg_constants::XLR_RMGR_INFO_MASK;
|
||||
if info == pg_constants::XLOG_REPLORIGIN_SET {
|
||||
let xlrec = crate::walrecord::XlReploriginSet::decode(&mut buf);
|
||||
info!(
|
||||
"Set replication origin_id={}, origin_lsn={}",
|
||||
xlrec.node_id, xlrec.remote_lsn
|
||||
);
|
||||
modification
|
||||
.set_replorigin(xlrec.node_id, xlrec.remote_lsn)
|
||||
.await?
|
||||
} else if info == pg_constants::XLOG_REPLORIGIN_DROP {
|
||||
let xlrec = crate::walrecord::XlReploriginDrop::decode(&mut buf);
|
||||
info!("Drop replication origin_id={}", xlrec.node_id);
|
||||
modification.drop_replorigin(xlrec.node_id).await?
|
||||
}
|
||||
}
|
||||
@@ -1286,6 +1291,10 @@ impl WalIngest {
|
||||
}
|
||||
}
|
||||
if origin_id != 0 {
|
||||
info!(
|
||||
"Commit origin_id={}, origin_lsn={}",
|
||||
origin_id, parsed.origin_lsn
|
||||
);
|
||||
modification
|
||||
.set_replorigin(origin_id, parsed.origin_lsn)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user