Re: Operating of synchronous master when no standby is available

From: MATSUO Takatoshi <matsuo(dot)tak(at)gmail(dot)com>
To: Sergey Cherukhin <sergey(dot)cherukhin(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Operating of synchronous master when no standby is available
Date: 2023-10-03 10:22:24
Message-ID: CAKwUP0_k-SyJPp1cQt7EJFVakafXmi104NaC9CbL=m+JNtQ9zA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It's not normal behavior.

Pgsql RA is developed here.
https://github.com/ClusterLabs/resource-agents/blob/main/heartbeat/pgsql
You may get better advice if you ask on this mailing list.
https://oss.clusterlabs.org/mailman/listinfo/users

2023年10月3日(火) 18:03 Sergey Cherukhin <sergey(dot)cherukhin(at)gmail(dot)com>:

> I already have rep_mode set to "sync", but the primary node switches to
> async mode only if the replica is shutted down correctly. When I shut down
> the replica by powering it off to emulate power unit failure, primary
> remains in sync mode until "pcs resource cleanup" is performed. I think it
> is possible to run resource cleanup in script on cluster alert.
>
> вт, 3 окт. 2023 г. в 05:13, MATSUO Takatoshi <matsuo(dot)tak(at)gmail(dot)com>:
>
>> Pgsql RA has rep_mode=sync parameter.
>> https://wiki.clusterlabs.org/wiki/PgSQL_Replicated_Cluster
>>
>> 2023年10月2日(月) 23:48 Sergey Cherukhin <sergey(dot)cherukhin(at)gmail(dot)com>:
>>
>>> Hello!
>>>
>>> I use Postgresql+Pacemaker+Corosync cluster with 2 Postgresql instances
>>> in synchronous replication mode. When one of the nodes is down, clients
>>> hang on INSERT operations because the primary server waits until standby
>>> confirms that it got the data, but the standby node is down.
>>>
>>> I need clients to feel no difference when they operate with a fully
>>> operational cluster or with a degraded cluster containing primary
>>> node alone.
>>>
>>> Is it possible to configure synchronous replication to operate normally
>>> when primary and replica are online, but primary no waits confirmation from
>>> replica if replica is not connected?
>>>
>>> Best regards,
>>> Sergey Cherukhin
>>>
>>>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-10-03 12:35:09 Re: Peer authentication failed ???
Previous Message Harry Green 2023-10-03 09:59:41 Re: [EXT]Re: Connection not allowed because of an error 'Not in pg_hba.conf'