pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Pospisek <tpo2@sourcepole.ch>
To: pgsql-general@lists.postgresql.org
Subject: Re: Detecting schema changes via WAL logs
Date: Mon, 21 Feb 2022 11:20:01 +0100
Message-ID: <adc677db-e866-c1d7-497a-bdf0e0634da0@sourcepole.ch> (raw)
In-Reply-To: <C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com>
References: <C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com>

On 19.02.22 17:42, Cal Mitchell wrote:
> Hello everyone,
> 
> I’m building an open-source data integration tool (SQLpipe) and am now 
> trying to incorporate CDC into the product.
> 
> Is it possible to detect when schema changes happen via the WAL? The WAL 
> doesn’t have to tell me /what/ was changed, it just needs to tell me 
> /when/ something changed.
> 
> For example, anytime I run create table or some other DDL command, there 
> is a begin and commit message in the log, with nothing in between. If 
> there aren’t any other operations that create such “empty” logs, it 
> seems possible to just re-scan the tables that are being synced for 
> schema changes whenever one of these logs is encountered.

I remember having seen a similar question recently here - that is 
detecting schema changes.

Also I think having seen WAL to SQL scripts somewhere.

I might be wrong on both accounts, but maybe you want to review the last 
few months of list archives if you haven't done so already and maybe 
check postgres' Debian package repository if there aren't WAL to SQL 
scripts somewhere.

As I said, this is what my fuzzy in-brain SQL returns so please don't 
SIGKILL me if my query was too fuzzy indeen.
*t





view thread (2+ messages)

Message-ID: <adc677db-e866-c1d7-497a-bdf0e0634da0@sourcepole.ch>
Permalink:  ../adc677db-e866-c1d7-497a-bdf0e0634da0@sourcepole.ch/
Also on:    postgresql.org/message-id/adc677db-e866-c1d7-497a-bdf0e0634da0@sourcepole.ch

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tpo2@sourcepole.ch
  Subject: Re: Detecting schema changes via WAL logs
  In-Reply-To: <adc677db-e866-c1d7-497a-bdf0e0634da0@sourcepole.ch>
  References: <C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com> <adc677db-e866-c1d7-497a-bdf0e0634da0@sourcepole.ch>

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

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