pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Cal Mitchell <cmitch29@sqlpipe.com>
To: pgsql-general@lists.postgresql.org
Subject: Detecting schema changes via WAL logs
Date: Sat, 19 Feb 2022 16:42:51 +0000
Message-ID: <C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com> (raw)

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.=

view thread (2+ messages)  latest in thread

Message-ID: <C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com>
Permalink:  ../C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com/
Also on:    postgresql.org/message-id/C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com

 · 

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: cmitch29@sqlpipe.com
  Subject: Re: Detecting schema changes via WAL logs
  In-Reply-To: <C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com>
  References: <C90BBBF0-F41A-43D0-8988-E4964B31D75F@sqlpipe.com>

* 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