public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fabrice Chapuis <[email protected]>
To: Matthias van de Meent <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_waldump
Date: Tue, 19 Dec 2023 16:11:54 +0100
Message-ID: <CAA5-nLCQKXCiHpNCF23YjtWGYH5FPHCP3rvTOVo2iR_ifcpOEg@mail.gmail.com> (raw)
In-Reply-To: <CAEze2Wgu+4dtNpTy+_7LDTf5F_exdYrrQd1iZ14iYSvmDNmeAg@mail.gmail.com>
References: <CAA5-nLDS5Kk8k=f3K330=+3n2ZD4+=kbdncUz-ay6TrHQ+0LdA@mail.gmail.com>
	<CAEze2Wgu+4dtNpTy+_7LDTf5F_exdYrrQd1iZ14iYSvmDNmeAg@mail.gmail.com>

Ok thanks for all these precisions
Regards
Fabrice

On Tue, Dec 19, 2023 at 2:00 PM Matthias van de Meent <
[email protected]> wrote:

> On Tue, 19 Dec 2023, 12:27 Fabrice Chapuis, <[email protected]>
> wrote:
> >
> > Hi,
> > Is it possible to visualize the DDL with the pg_waldump tool. I created
> a postgres user but I cannot find the creation command in the wals
>
> Not really, no. PostgreSQL does not log DDL or DML as such in WAL.
> Essentially all catalog updates are logged only as changes on a
> certain page in some file: a new user getting inserted would be
> approximately "Insert tuple [user's pg_role row data] on page X in
> file [the file corresponding to the pg_role table]".
>
> You could likely derive most DDL commands from Heap/Insert,
> Heap/Delete, and Heap/Update records (after cross-referencing the
> database's relfilemap), as most DDL is "just" a lot of in-memory
> operations plus some record insertions/updates/deletes in catalog
> tables. You'd also need to keep track of any relfilemap changes while
> processing the WAL, as VACUUM FULL on the catalog tables would change
> the file numbering of catalog tables...
>
> Kind regards,
>
> Matthias van de Meent
> Neon (https://neon.tech)
>


view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: pg_waldump
  In-Reply-To: <CAA5-nLCQKXCiHpNCF23YjtWGYH5FPHCP3rvTOVo2iR_ifcpOEg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox