Re: Urgent :: Postgresql streaming replication issue - sync mode

From: Shital A <brightuser2019(at)gmail(dot)com>
To: Jason Wang <jasonwang(dot)public(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Urgent :: Postgresql streaming replication issue - sync mode
Date: 2019-10-03 03:00:41
Message-ID: CAMp7vw_0pDWBd+GP1pt-078vkdDZAOuO9juwtP-PRSwCyMJEtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 3 Oct 2019, 03:10 Jason Wang, <jasonwang(dot)public(at)gmail(dot)com> wrote:

> I think when you use kill -9 it wouldn't give any chance for postgres to
> do what it normally does. So in your case, the db was killed with no chance
> to apply to remote then it would be up to the recovery to decide how to
> handle the extra data at the master. I'm not sure what would happen but
> killall in general is a dangerous command.
>
> On Thu, 3 Oct 2019, 7:00 am Shital A, <brightuser2019(at)gmail(dot)com> wrote:
>
>>
>>
>> On Thu, 3 Oct 2019, 00:08 Ravi Krishna, <srkrishna(at)vivaldi(dot)net> wrote:
>>
>>> >
>>> > As the failed primary is having more data, How is it possible that
>>> primary is committing transaction before they were applied on standby with
>>> synchronous_commit=remote_apply?
>>>
>>> If I am not mistaken remote_apply is only from ver 11.
>>>
>>
>> Hi Ravi,
>>
>> Thanks for your reply.
>>
>> This property/feature is available in 9.6.
>> https://www.postgresql.org/docs/9.6/runtime-config-wal.html
>>
>>
>> Thanks!
>>
>
Thanks Jason.

Using killall -9 we are trying to simulate the situation where primary is
stopped unexpectedly/crashed.

So in this case there is data loss because when the broken primary later
comes in sync with new primary it copies data from new primary and the data
records that were extra in old primary are lost. Can this data loss be
prevented in anyway in postgres 9.6 ? Please suggest.

Thanks!

>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pankaj Jangid 2019-10-03 04:58:16 Re: PG11 Parallel Thanks!!
Previous Message Adrian Klaver 2019-10-03 00:47:48 Re: performance of pg_upgrade "Copying user relation files"