Better documentation for schema changes in logical replication - Mailing list pgsql-general

From Mike Lissner
Subject Better documentation for schema changes in logical replication
Date
Msg-id CAMp9=ExmviziCKr0nPLD+P=6UE79LOq342BX7ppSpZPg8Hq-SQ@mail.gmail.com
Whole thread Raw
List 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:


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

pgsql-general by date:

Previous
From: Chris Charley
Date:
Subject: Re: Should I reinstall over current installation?
Next
From: Doug Roberts
Date:
Subject: Re: Postgres Crashing