[PATCH] TAP test showing that pg_replication_slot_advance() works on standby

Started by Craig Ringerabout 6 years ago2 messageshackers
Jump to latest
#1Craig Ringer
craig.ringer@enterprisedb.com

Hi all

The attached patch adds a test to the TAP logical decoding suite to show
that pg_replication_slot_advance() works on a server in standby mode.

I didn't add a full demonstration of how to do failover with logical slots
because we're still missing a way to "sync" a logical slot from a primary
to a standby, or a way to directly create such a slot safely on a standby
in a way that enforces a safe catalog_xmin etc.

You can't replay from the slot unless the server is promoted, so I don't
test that.

I'm not sure if anyone's going to find it worth committing, but it's here
so searchers can find it at least.

Attachments:

0001-Extend-TAP-test-for-pg_replication_slot_advance-to-c_patch.txttext/plain; charset=US-ASCII; name=0001-Extend-TAP-test-for-pg_replication_slot_advance-to-c_patch.txtDownload+26-12
#2Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Craig Ringer (#1)
Re: [PATCH] TAP test showing that pg_replication_slot_advance() works on standby

Hi Craig,

On Tue, Nov 10, 2020 at 2:32 PM Craig Ringer
<craig.ringer@enterprisedb.com> wrote:

Hi all

The attached patch adds a test to the TAP logical decoding suite to show that pg_replication_slot_advance() works on a server in standby mode.

I didn't add a full demonstration of how to do failover with logical slots because we're still missing a way to "sync" a logical slot from a primary to a standby, or a way to directly create such a slot safely on a standby in a way that enforces a safe catalog_xmin etc.

You can't replay from the slot unless the server is promoted, so I don't test that.

I'm not sure if anyone's going to find it worth committing, but it's here so searchers can find it at least.

You sent in your patch,
0001-Extend-TAP-test-for-pg_replication_slot_advance-to-c_patch.txt to
pgsql-hackers on Nov10, but you did not post it to the next
CommitFest[1]https://commitfest.postgresql.org/31/. If this was intentional, then you need to take no
action. However, if you want your patch to be reviewed as part of the
upcoming CommitFest, then you need to add it yourself before
2021-01-01 AOE[2]https://en.wikipedia.org/wiki/Anywhere_on_Earth. Thanks for your contributions.

Regards,

[1]: https://commitfest.postgresql.org/31/
[2]: https://en.wikipedia.org/wiki/Anywhere_on_Earth

--
Masahiko Sawada
EnterpriseDB: https://www.enterprisedb.com/