From: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
---|---|
To: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
Cc: | Simon Riggs <simon(at)2ndQuadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(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-06 19:45:10 |
Message-ID: | 4C8544C6.3090705@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dimitri Fontaine írta:
> Boszormenyi Zoltan <zb(at)cybertec(dot)at> writes:
>
>> Sorry for answering such an old mail, but what is the purpose of
>> a transaction level synchronous behaviour if async transactions
>> can be held back by a sync transaction?
>>
>
> I don't understand why it would be the case (sync holding back async
> transactions) — it's been proposed that walsender could periodically
> feed back to the master the current WAL position received, synced and
> applied.
>
> So you can register your sync transaction to wait (and block) until
> walsender sees a synced WAL position after your own (including it) and
> another transaction can wait until walsender sees a received WAL
> position after its own, for example. Of course, meanwhile, any async
> transaction would just commit without caring about slaves.
>
The locks held by a transaction are released after
RecordTransactionCommit(), and waiting for the sync ack
happens in this function. Now what happens when a sync
transaction hold a lock that an async one is waiting for?
> Not implementing it nor thinking about how to implement it, it seems
> simple enough :)
>
> Regards,
>
--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
http://www.postgresql.at/
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2010-09-06 20:04:56 | Re: Synchronization levels in SR |
Previous Message | Dave Page | 2010-09-06 19:07:33 | Re: 9.1alpha1 bundled -- please verify |