Questions on recovery situations (not urgent) - Mailing list pgsql-admin

From Charles Schultz
Subject Questions on recovery situations (not urgent)
Date
Msg-id CAPZQniX-EiipW_fDeVERReLky3w+kui85qSp-stHrSj_qZOAcg@mail.gmail.com
Whole thread Raw
Responses Re: Questions on recovery situations (not urgent)
List pgsql-admin
Good day!

We have been learning more about postgres recovery, and I have come across a couple questions that google has not satisfactorily answered for me.

1. pg_waldump refuses to dump a WAL saying "fatal: WAL segment size must be a power of two between 1 MB and 1 GB", even though I have successfully used the WALs for PITR. What's the magic trick to get around this fatal error? I tried using a key unwrap function (same as in postgresql.conf) to no avail.

2. As I cannot dump the WALs, how do I determine the LSN or XID of a transaction in the past?

3. When restoring forward, I have found recovery_target_time does not work very well (maybe lack of granularity?), and recovery_target_lsn is better, but pg_current_wal_lsn() only gives me the LSN before a transaction. Is there a way to get the XID of a specific transaction?

4. How would I get the OID of a database and a table when the database is down? I wish to map the filesystem names to database objects after a crash. Is there a tool/app that can parse pg datafiles? I have to assume that if there is not already one, it is not too hard to write such a tool if one has experience with PG file headers and reading the opensource code.


Thanks for your time and attention!


--
Charles Schultz

pgsql-admin by date:

Previous
From: Johannes Truschnigg
Date:
Subject: Re: Postgresql 9.5: Streaming Replication: Secondaries Fail To Start Post WAL Error
Next
From: Laurenz Albe
Date:
Subject: Re: Questions on recovery situations (not urgent)