Re: [External] Re: Slot issues - Mailing list pgsql-general

From Vijaykumar Jain
Subject Re: [External] Re: Slot issues
Date
Msg-id CAE7uO5h1FhT9bmqut+secejjXEQsKD74_-R1Nj-QZ7tvzXdgRQ@mail.gmail.com
Whole thread Raw
In response to Re: Slot issues  (Andres Freund <andres@anarazel.de>)
List pgsql-general
Sorry Bhargav.

I tried to simulate the scenarios,
3 node cluster
1primary, 2hot standby

given:
max_replication_slots = 2 on primary, and i try to create 2 hot standby -> runs fine.
max_replication_slots = 1 on primary, and i try to create 2 hot standby -> gives PANIC, increase replication slots. (the standby only cries with replication slot does not exist, not increase number of replication slots)
max_replication_slots = 2 on primary, and max_replication_slots=1 on hot standby, delete recovery.conf and recover from pg_baseback works fine.
max_replication_slots = 2 on primary, on standby i try to use a replication_slot already existing, it gives correct error of slot in use and not increase replication slot error.
my pg_replslot folder is consistent of the replication slots i have on the master.


so i guess, i'll leave it to the experts. 
but i still do not understand why would you get that error on standby, unless you are doing cascading replication.

I'll watch this thread to see how this is resolved.

Thanks,
Vijay


Regards,
Vijay


On Mon, Oct 15, 2018 at 2:41 AM Andres Freund <andres@anarazel.de> wrote:
Hi,

Please try to quote properly.

On 2018-10-15 01:57:53 +0530, bhargav kamineni wrote:
> I got his on standby,  could you please explain in detail about
>  --*but that *on the standby* haven't set max_replication_slots high enough*
> .

What is max_replication_slots set to on the new standby?

If you created the new basebackup using rsync, and didn't exclude
pg_replication_slot, it'll have copied the slots from the primary.  And
thus needs a high enough max_replication_slots to work with them.

- Andres

pgsql-general by date:

Previous
From: bhargav kamineni
Date:
Subject: Re: Slot issues
Next
From: Vijaykumar Jain
Date:
Subject: Re: [External] Re: Slot issues