Re: Copy function for logical replication slots

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Copy function for logical replication slots
Date: 2018-07-09 01:06:00
Message-ID: CAD21AoA9XGPRdScoi448GPpQZ+BK5=6ntZu4J_ywNn5xdn0T1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 6, 2018 at 9:21 AM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Thu, Jul 05, 2018 at 05:24:48PM +0900, Masahiko Sawada wrote:
>> Yes, you're right. To guarantee that restart LSN of copied slot is
>> available, it seems to me that it's better to copy new slot while
>> holding the origin slot as you mentioned before. Since the replication
>> slot creation code assumes that a process creating a new slot doesn't
>> have any slots we should save origin slot temporary and create new
>> one, and then restore it.
>
> This will require some refactoring first I think as most of the slot
> routines assume that the process owning it is the one doing the calls,
> so this has a string smell of a patch set being splitted.
>
>> It might be a bit tricky but would work fine.
>
> Sawada-san, will you be able to rewrite this patch soon or should it be
> moved to the next commit fest? I would suggest to do the latter as this
> is no small work, and this needs careful thoughts.

I think that this patch might be splitted but I will be able to send
an updated patch in the next week. As you suggestion this patch needs
more careful thoughts. I'll move this patch to the next commit fest if
I will not be able to sent it. Is that okay?

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-07-09 01:15:52 Re: Failure assertion in GROUPS mode of window function in current HEAD
Previous Message Sean Chittenden 2018-07-09 00:26:59 Re: WAL prefetch