Re: Sync Rep v17 - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: Sync Rep v17
Date
Msg-id AANLkTin3CWe_58s8Fb+MKj82Xe7oY+S3DKa+b1ey7cae@mail.gmail.com
Whole thread Raw
In response to Re: Sync Rep v17  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Mon, Feb 21, 2011 at 4:06 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>
> PREPARE TRANSACTION and ROLLBACK PREPARED should wait for
> replication as well as COMMIT PREPARED?
>

maybe ROLLBACK PREPARED but i'm not sure... i'm pretty sure we don't
need to wait for PREPARE TRANSACTION, but i could be wrong

> What if fast shutdown is requested while RecordTransactionCommit
> is waiting in SyncRepWaitForLSN? ISTM fast shutdown cannot complete
> until replication has been successfully done (i.e., until at least one
> synchronous standby has connected to the master especially if
> allow_standalone_primary is disabled). Is this OK?
>

i guess that is debatable, IMHO if there is a synch standby then wait
(because the user request durability of the data),
if there isn't a synch rep wait until the timeout (even if
allow_standalone_primary is disabled) because probably this is
a miss configuration or an special case i'm trying to handle (network
broke, data center of standbies explode, etc).

> We should emit WARNING when the synchronous standby with
> wal_receiver_status_interval = 0 connects to the master. Because,
> in that case, a transaction unexpectedly would wait for replication
> infinitely.
>

actually i think we should reject such standby as a synch standby, and
look for another one in the synchronous_standby_names list

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL


pgsql-hackers by date:

Previous
From: Daniel Farina
Date:
Subject: Re: Sync Rep v17
Next
From: Bruce Momjian
Date:
Subject: Re: WIP: cross column correlation ...