Re: Synchronization levels in SR - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Synchronization levels in SR
Date
Msg-id AANLkTi=+F3dmiov3aomvPTX77dkCCqsX54OcDemwWjfs@mail.gmail.com
Whole thread Raw
In response to Re: Synchronization levels in SR  (Boszormenyi Zoltan <zb@cybertec.at>)
Responses Re: Synchronization levels in SR  (Boszormenyi Zoltan <zb@cybertec.at>)
List pgsql-hackers
On Fri, Sep 3, 2010 at 6:43 PM, Boszormenyi Zoltan <zb@cybertec.at> wrote:
> In my patch, when the transactions were waiting for ack from
> the standby, they have already released all their locks, the wait
> happened at the latest possible point in CommitTransaction().
>
> In Fujii's patch (I am looking at synch_rep_0722.patch, is there
> a newer one?)

No ;)

We'll have to create the patch based on the result of the recent
discussion held on other thread.

> the wait happens in RecordTransactionCommit()
> so other transactions still see the sync transaction and most
> importantly, the locks held by the sync transaction will make
> the async  transactions waiting for the same lock wait too.

The transaction should be invisible to other transactions until
its replication has been completed. So I put the wait before
CommitTransaction() calls ProcArrayEndTransaction(). Is this unsafe?

Regards,

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


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Streaming a base backup from master
Next
From: Magnus Hagander
Date:
Subject: Re: Streaming a base backup from master