Re: Synchronization levels in SR

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synchronization levels in SR
Date: 2010-09-03 11:30:04
Message-ID: AANLkTi=+F3dmiov3aomvPTX77dkCCqsX54OcDemwWjfs@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 3, 2010 at 6:43 PM, Boszormenyi Zoltan <zb(at)cybertec(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2010-09-03 11:32:51 Re: Streaming a base backup from master
Previous Message Magnus Hagander 2010-09-03 11:30:02 Re: Streaming a base backup from master