Re: Sync replication tests

Lists: pgsql-hackers
From: "K, Niranjan (NSN - IN/Bangalore)" <niranjan(dot)k(at)nsn(dot)com>
To: <masao(dot)fujii(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Czichy, Thoralf (NSN - FI/Helsinki)" <thoralf(dot)czichy(at)nsn(dot)com>
Subject: Sync replication tests
Date: 2009-02-24 08:24:47
Message-ID: 985D3C447786074E957A9001D62CDDD00C5C3E@SGSIEXC009.nsn-intra.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

Steps to re-produce the sync replication bug:

- Setup the Primary server and standby server
- Don't execute any transactions on the Primary server
- Initiate a switchover by creating a finish.trigger on the Standby server
- The standby server (the startup process) will terminate with SIGABRT signal and no connection to the Database will be possible after that.

regards,
Niranjan


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: "K, Niranjan (NSN - IN/Bangalore)" <niranjan(dot)k(at)nsn(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, thoralf(dot)czichy(at)nsn(dot)com
Subject: Re: Sync replication tests
Date: 2009-02-24 16:46:24
Message-ID: 3f0b79eb0902240846r2f94ddfah30271435207080d6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

On Tue, Feb 24, 2009 at 5:24 PM, K, Niranjan (NSN - IN/Bangalore)
<niranjan(dot)k(at)nsn(dot)com> wrote:
> Steps to re-produce the sync replication bug:
>
> - Setup the Primary server and standby server
> - Don't execute any transactions on the Primary server
> - Initiate a switchover by creating a finish.trigger on the Standby server
> - The standby server (the startup process) will terminate with SIGABRT signal and no connection to the Database will be possible after that.

Thanks for reporting the problem!

It's strange behavior. IIRC, any troubles didn't happen when I did the
same test.
I will test Synch Rep again and address the problem, but I'm away on business,
so please wait a week.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: niranjan(dot)k(at)nsn(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, thoralf(dot)czichy(at)nsn(dot)com
Subject: Re: Sync replication tests
Date: 2009-03-05 05:27:21
Message-ID: 3f0b79eb0903042127g24f45fcfmedc9078b39cc9cdb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Niranjan,

I'm sorry for this late reply.

On Tue, Feb 24, 2009 at 5:24 PM, K, Niranjan (NSN - IN/Bangalore)
<niranjan(dot)k(at)nsn(dot)com> wrote:
> Steps to re-produce the sync replication bug:
>
> - Setup the Primary server and standby server
> - Don't execute any transactions on the Primary server
> - Initiate a switchover by creating a finish.trigger on the Standby server
> - The standby server (the startup process) will terminate with SIGABRT signal and no connection to the Database will be possible after that.

The attached patch fixed the problem which you reported.
So, please try this updated patch.

The list of updates is:
* Fix the problem which SIGTERM may be unable to shut down the
startup process.
* Fix the problem which the standby server fails when the trigger
file is created just after replication starts. Reported by Niranjan.
* Rename the parameter to specify whether to enable WAL receiving
by the standby from "enable_replication" to "replication".
* Change postmaster to send the SIGHUP signal to also walreceiver.
http://wiki.postgresql.org/wiki/NTT%27s_Development_Projects#Version_History

As above, the parameter "enable_replication" was renamed,
so please change your test script which sets this parameter
before testing.

And, for your convenience, I also uploaded the source code
(HEAD) with this updated patch. If you find something odd
about Synch Rep, please report it.

http://senduit.com/d9a57f

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment Content-Type Size
synch_rep_0305.tgz application/x-gzip 163.3 KB