Re: Server Crashes if try to provide slot_name='none' at the time of creating subscription.

From: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Server Crashes if try to provide slot_name='none' at the time of creating subscription.
Date: 2017-05-16 09:35:25
Message-ID: CAGz5QCLea+woGYBTwLYMVEvYwbLKSL=x51VQyk6ZdfE5S9Eayw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Added to open item lists.

On Tue, May 16, 2017 at 6:35 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> On Mon, May 15, 2017 at 8:09 PM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>> On Mon, May 15, 2017 at 8:06 PM, Kuntal Ghosh
>> <kuntalghosh(dot)2007(at)gmail(dot)com> wrote:
>>> On Mon, May 15, 2017 at 4:00 PM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>>> On Mon, May 15, 2017 at 6:41 PM, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> wrote:
>>>>> Hi,
>>>>>
>>>>> Server Crashes if we try to provide slot_name='none' at the time of creating
>>>>> subscription -
>>>>>
>>>>> postgres=# create subscription sub2 connection 'dbname=postgres port=5000
>>>>> user=centos password=f' publication abc with (slot_name='none');
>>>>> NOTICE: synchronized table states
>>>>> server closed the connection unexpectedly
>>>>> This probably means the server terminated abnormally
>>>>> before or while processing the request.
>>>>> The connection to the server was lost. Attempting reset: Failed.
>>>>> !>
>>>>>
>>>>
>>>> Thank you for reporting.
>>>> I think create_slot and enabled should be set to false forcibly when
>>>> slot_name = 'none'. Attached patch fixes it, more test and regression
>>>> test case are needed though.
>>>>
>>> I think the patch doesn't solve the problem completely. For example,
>>> postgres=# create subscription sub3 connection 'dbname=postgres
>>> port=5432 user=edb password=edb' publication abc with
>>> (slot_name='none',create_slot=true);
>>> ERROR: slot_name = NONE and create slot are mutually exclusive options
>>> postgres=# create subscription sub3 connection 'dbname=postgres
>>> port=5432 user=edb password=edb' publication abc with
>>> (create_slot=true,slot_name='none');
>>> ERROR: could not connect to the publisher: could not connect to
>>> server: Connection refused
>>> Is the server running locally and accepting
>>> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>>>
>>> Changing the order of subscription parameter changes the output. I
>>> think the modifications should be done at the end of the function.
>>> Attached a patch for the same.
>>>
>>
>> Yes, you're patch fixes it correctly.
>>
>
> I've updated Kuntal's patch, added regression test for option
> combination and updated documentation.
>
> Regards,
>
> --
> Masahiko Sawada
> NIPPON TELEGRAPH AND TELEPHONE CORPORATION
> NTT Open Source Software Center

--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2017-05-16 09:51:27 Re: Bug in ExecModifyTable function and trigger issues for foreign tables
Previous Message Ashutosh Bapat 2017-05-16 08:44:39 Re: Increasing parallel workers at runtime