Better documentation for schema changes in logical replication

From: Mike Lissner <mlissner(at)michaeljaylissner(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Better documentation for schema changes in logical replication
Date: 2020-02-04 20:22:30
Message-ID: CAMp9=ExmviziCKr0nPLD+P=6UE79LOq342BX7ppSpZPg8Hq-SQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I've been using logical replication for about a year now, and I wonder if
there's any sense that it needs better documentation of schema changes. My
experience is that there's almost no documentation and that there are lots
of opportunities to really screw things up.

It seems like starting somewhere would be good. I'd propose an outline
something like the following:

1. General rules of replication schema changes (do we ALTER the
SUBSCRIPTION to DISABLE it first?) What types of best practices do we have?

2. How to do basic things like add/remove a column/table, etc

3. Particular things that cause issues like making a field NULLable. I'm
sure there are a handful of these I haven't run into yet.

My current practice is to set up logical replication across two docker
images and test things out before doing it in production, but every time I
do so I learn something new, despite having carefully read the
documentation. Here's an example of me trying to figure out how to DROP
COLUMNs:

https://github.com/freelawproject/courtlistener/issues/1164

Is this something others think should be improved? I'm not sure I'm
qualified, though I'm keeping a lot of notes about my tests, as above.

Mike

Browse pgsql-general by date

  From Date Subject
Next Message Doug Roberts 2020-02-04 21:21:53 Re: Postgres Crashing
Previous Message Chris Charley 2020-02-04 20:18:57 Re: Should I reinstall over current installation?