Re: Function to move the position of a replication slot

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Function to move the position of a replication slot
Date: 2017-05-10 20:17:29
Message-ID: CA+q6zcVCO=9MC5VyukG5b=Eh3gi61VUqifZjW7=T7X+6aVV1Vw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 4 May 2017 at 20:05, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
> PFA a patch that adds a new function, pg_move_replication_slot, that
makes it
> possible to move the location of a replication slot without actually
> consuming all the WAL on it.

Just a few questions just a few questions out of curiosity:

* does it make sense to create a few tests for this function in
`contrib/test_decoding` (as shown in attachment)?

* what should happen if the second argument is `NULL`? There is a
verification
`XLogRecPtrIsInvalid(moveto)`, but it's possible to pass `NULL`, and looks
like it leads to result different from boolean:

```
SELECT pg_move_replication_slot('regression_slot_5', NULL);
pg_move_replication_slot
--------------------------

(1 row)
```

Attachment Content-Type Size
pg_move_replication_slot_with_tests.patch text/x-patch 6.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sven R. Kunze 2017-05-10 20:21:42 Re: Adding support for Default partition in partitioning
Previous Message Bossart, Nathan 2017-05-10 20:10:48 [Proposal] Allow users to specify multiple tables in VACUUM commands