mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +00:00
DNM debug
This commit is contained in:
@@ -1037,6 +1037,7 @@ impl Timeline {
|
||||
|
||||
/// Write something other than a simple postgres key/value: unlike regular relation page writes, these
|
||||
/// require access to a Timeline in order to do read-modify-write.
|
||||
#[derive(Debug)]
|
||||
enum MetadataOp {
|
||||
// - Insert to DBDIR_KEY if this (spcnode, dbnode) does not already exist
|
||||
// - Insert to rel_dir_to_key(spcnode, dbnode)
|
||||
@@ -1149,6 +1150,7 @@ impl MetadataOp {
|
||||
data_dir_mod: &mut DatadirModification<'a>,
|
||||
ctx: &RequestContext,
|
||||
) -> anyhow::Result<()> {
|
||||
eprintln!("MetadataOp::apply: {self:?}");
|
||||
match self {
|
||||
Self::UpsertRelDirectory { spcnode, dbnode } => {
|
||||
// Add it to the directory (if it doesn't exist already)
|
||||
@@ -1319,6 +1321,7 @@ impl<'a> DatadirModification<'a> {
|
||||
|
||||
/// While applying a metadata op, write a materialized page.
|
||||
fn put_metadata_page(&mut self, lsn: Lsn, key: Key, value: Bytes) {
|
||||
eprintln!("put_metadata_page {key} @ {lsn}");
|
||||
self.put_at_lsn(lsn, key, Value::Image(value.clone()));
|
||||
|
||||
self.metadata_state.put(lsn, key, value);
|
||||
|
||||
@@ -92,6 +92,7 @@ impl WalIngest {
|
||||
decoded: &mut DecodedWALRecord,
|
||||
ctx: &RequestContext,
|
||||
) -> anyhow::Result<bool> {
|
||||
eprintln!("ingest_record @ {lsn}");
|
||||
WAL_INGEST.records_received.inc();
|
||||
let pg_version = modification.tline.pg_version;
|
||||
let prev_len = modification.len();
|
||||
|
||||
Reference in New Issue
Block a user