Обсуждение: [GENERAL] replication slot to be used in the future

Поиск
Список
Период
Сортировка

[GENERAL] replication slot to be used in the future

От
Tom DalPozzo
Дата:
Hi,
I've got my primary and I make a pg_basebackup -x in order to create a standby.
I can connect my standby only later, in some hours, so I'd like the master to keep new WALs but I don't like to use archiving nor keep-segments option. I thought to do it through a physical replication slot (my standby will have its replication slot name).
So I create a physical replication slot but I see that the master, which has never seen my standby connected to him, doesn't keep WALs.

Any idea?

Regards
Pupillo




Re: [GENERAL] replication slot to be used in the future

От
Adrian Klaver
Дата:
On 01/04/2017 08:44 AM, Tom DalPozzo wrote:
> Hi,

Postgres version?

Because in 9.6:

https://www.postgresql.org/docs/9.6/static/functions-admin.html#FUNCTIONS-REPLICATION

Table 9-82. Replication SQL Functions

pg_create_physical_replication_slot(slot_name name [,
immediately_reserve boolean ])

Creates a new physical replication slot named slot_name. The optional
second parameter, when true, specifies that the LSN for this replication
slot be reserved immediately; otherwise the LSN is reserved on first
connection from a streaming replication client. Streaming changes from a
physical slot is only possible with the streaming-replication protocol —
see Section 51.3. This function corresponds to the replication protocol
command CREATE_REPLICATION_SLOT ... PHYSICAL.

> I've got my primary and I make a pg_basebackup -x in order to create a
> standby.
> I can connect my standby only later, in some hours, so I'd like the
> master to keep new WALs but I don't like to use archiving nor
> keep-segments option. I thought to do it through a physical replication
> slot (my standby will have its replication slot name).
> So I create a physical replication slot but I see that the master, which
> has never seen my standby connected to him, doesn't keep WALs.
>
> Any idea?
>
> Regards
> Pupillo
>
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] replication slot to be used in the future

От
Tom DalPozzo
Дата:
2017-01-04 18:24 GMT+01:00 Adrian Klaver <adrian.klaver@aklaver.com>:
On 01/04/2017 08:44 AM, Tom DalPozzo wrote:
Hi,

Postgres version?

Because in 9.6:

https://www.postgresql.org/docs/9.6/static/functions-admin.html#FUNCTIONS-REPLICATION

Table 9-82. Replication SQL Functions

pg_create_physical_replication_slot(slot_name name [, immediately_reserve boolean ])

Creates a new physical replication slot named slot_name. The optional second parameter, when true, specifies that the LSN for this replication slot be reserved immediately; otherwise the LSN is reserved on first connection from a streaming replication client. Streaming changes from a physical slot is only possible with the streaming-replication protocol — see Section 51.3. This function corresponds to the replication protocol command CREATE_REPLICATION_SLOT ... PHYSICAL.



Hi, it is 9.5.5! 
Thank you very much!

Pupillo