Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present - Mailing list pgsql-hackers

From Arthur Zakirov
Subject Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present
Date
Msg-id d5cb5d6c-1160-0ef0-9d23-ad1eb000ecd4@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present  (Michael Banck <michael.banck@credativ.de>)
Responses Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present  (Michael Banck <michael.banck@credativ.de>)
List pgsql-hackers
Hello,

On 19.03.2017 21:45, Michael Banck wrote:
>
> So the patch I sent earlier creates the slot in ReceiveXlogStream() in
> receivewal.c, as that's where the temp slot gets created as well, but
> now I wonder whether that is maybe not the best place, as pg_receivewal
> also calls that function. The other problem with receivewal.c is that
> `verbose' isn't around in it so I don't how I'd print out a message
> there.
>
> So probably it is better to create the slot in pg_basebackup.c's
> StartLogStreamer(), see the attached first patch, that one also adds
> a verbose message.

I think such too. I suppose it is more clearly. StartLogStreamer() is 
better place for creating permanent and temporary slots.

Also maybe it would be good if pg_basebackup had a way to drop created 
slot. Although "drop slot" is not related with concept of automatically 
created slots, it will good if user will have a way to drop slots.

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] PinBuffer() no longer makes use of strategy
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] [POC] A better way to expand hash indexes.