Re: [External] Slot issues

From: bhargav kamineni <bhargavpostgres(at)gmail(dot)com>
To: vjain(at)opentable(dot)com
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: [External] Slot issues
Date: 2018-10-14 20:09:44
Message-ID: CADCf-WO9u93O7sZ7cx2PznzTdOWTs9v4f5wj0aZ+SVZumABWMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

postgres=# select * from pg_replication_slots ;
slot_name | plugin | slot_type | datoid | database
| active | active_pid | xmin | catalog_xmin | restart_lsn
----------------------------------+--------+-----------+--------+----------+--------+------------+------+--------------+---------------
replication_slot | | physical | | | t |
23185 | | | 7642/B07AC830
(1 row)

On Mon, 15 Oct 2018 at 01:34, Vijaykumar Jain <vjain(at)opentable(dot)com> wrote:

> from your master, can you give us the output of
>
> select * from pg_replication_slots;
>
> maybe some stray slot exists that you may not be aware of ?
>
> Regards,
> Vijay
>
>
> On Mon, Oct 15, 2018 at 1:08 AM Vijaykumar Jain <vjain(at)opentable(dot)com>
> wrote:
>
>> ok my bad.
>>
>> i just set one of the 9.6.9 versions to have max_replication_slots =2 and
>> still i had to slots active.
>>
>> ostgres=# table pg_replication_slots;
>> slot_name | plugin | slot_type | datoid | database |
>> active | active_pid | xmin | catalog_xmin | restart_lsn |
>> confirmed_flush_lsn
>>
>> -------------------------+--------+-----------+--------+----------+--------+------------+------+--------------+-------------+---------------------
>> a02 | | physical | | | t | 13719 |
>> | | 2/D30000D0 |
>> a03 | | physical | | | t | 13720 |
>> | | 2/D30000D0 |
>> (2 rows)
>>
>> postgres=# show max_replication_slots;
>> max_replication_slots
>> -----------------------
>> 2
>> (1 row)
>>
>>
>> yep it should work with 2.
>> Regards,
>> Vijay
>>
>>
>> On Mon, Oct 15, 2018 at 1:02 AM Vijaykumar Jain <vjain(at)opentable(dot)com>
>> wrote:
>>
>>> I guess max_replication_slots has to be greater than active replication
>>> slots.
>>> maybe you need to increase max_replication_slots to 3 to have 2 active
>>> slots.
>>>
>>> Regards,
>>> Vijay
>>>
>>>
>>> On Mon, Oct 15, 2018 at 12:54 AM bhargav kamineni <
>>> bhargavpostgres(at)gmail(dot)com> wrote:
>>>
>>>> for 9.x. Default was 0. we have set max_replication_slot =2 , one is
>>>> already being used , postgres should use second slot for another server
>>>> but dono why its throwing error
>>>>
>>>> On Mon, 15 Oct 2018 at 00:32, Vijaykumar Jain <vjain(at)opentable(dot)com>
>>>> wrote:
>>>>
>>>>> I guess max_replication_slots has to > current total slots in use.
>>>>> (and not >= )
>>>>>
>>>>>
>>>>> https://www.postgresql.org/docs/10/static/runtime-config-replication.html
>>>>>
>>>>> https://github.com/postgres/postgres/blob/d6e98ebe375e115c29028f9bd090f0f7e07e2527/src/backend/replication/slot.c#L1506
>>>>>
>>>>> from the doc, it says defaults are 10, any reason why you have set it
>>>>> to 2. You need to set it at a value higher than number of slots active.
>>>>> also, i guess changing this parameter would require a server restart.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Regards,
>>>>> Vijay
>>>>>
>>>>>
>>>>> On Mon, Oct 15, 2018 at 12:16 AM bhargav kamineni <
>>>>> bhargavpostgres(at)gmail(dot)com> wrote:
>>>>>
>>>>>> Hi Team,
>>>>>>
>>>>>> I am getting this ERROR while starting my second slave server
>>>>>>
>>>>>> PANIC: too many replication slots active before shutdown
>>>>>> HINT: Increase max_replication_slots and try again.
>>>>>>
>>>>>> max_replication_slots on my master is 2 and one of them is already
>>>>>> active for another slave,
>>>>>> do i need to increase this parameter for the need of working of
>>>>>> another slave ? if so whats the reason ?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>> Bhargav K
>>>>>>
>>>>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2018-10-14 20:20:42 Re: Slot issues
Previous Message Vijaykumar Jain 2018-10-14 20:04:14 Re: [External] Slot issues