From: Ron Johnson <ron.l.johnson@cox.net>
To: PgSQL General ML <pgsql-general@postgresql.org>
Subject: Re: Replication Ideas
Date: Wed, 27 Aug 2003 03:12:31 -0500
Message-ID: <1061971951.18060.357.camel@haggis> (raw)
In-Reply-To: <6358.1061955430@sss.pgh.pa.us>
References: <200308270325.h7R3PfI24921@candle.pha.pa.us>
<6358.1061955430@sss.pgh.pa.us>
On Tue, 2003-08-26 at 22:37, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > If you can detect if outside transactions conflict with your
> > transaction, you should be able to determine if the outside transactions
> > conflict with each other.
>
> Uh ... not necessarily. That amounts to assuming that every xact has
> complete knowledge of the actions of every other, which is an assumption
> I'd rather not make. Detecting that what you've done conflicts with
> someone else is one thing, detecting that party B has conflicted with
> party C is another league entirely.
Maybe some sort of Lock Manager? A process running on each node
keeps a tree structure of all locks, requested locks, what is
(requested to be) locked, and the type of lock. If you are running
multi-master replication, each LM keeps in sync with each other,
thus creating a Distributed Lock Manager. (This would also be the
key to implementing database clusters. Of course, the interface
to the DLM would have to be pretty deep within Postgres itself...)
Using a DLM, the postmaster on node_a would know that the postmaster
on node_b has just locked a certain set of tuples and index keys,
and
(1) will queue up it's request to lock that data into that node's
LM,
(2) which will propagate it to the other nodes,
(3) then when the node_a postmaster executes the COMMIT WORK, the
node_b postmaster can obtain it's desired locks.
(4) If the postmaster on node_[ac-z] needs to lock the that same
data, it will then similarly queue up to wait until the node_b
postmaster executes it's COMMIT WORK.
Notes:
a) this is, of course, not *sufficient* for multi-master
b) yes, you need a fast, low latency network for the DLM chatter.
This is a tried and true method of synchronization. DEC Rdb/VMS
has been using it for 19 years as the underpinnings of it's cluster
technology, and Oracle licensed it from them (well, really Compaq)
for it's 9i RAC.
--
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA
"The UN couldn't break up a cookie fight in a Brownie meeting."
Larry Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: ron.l.johnson@cox.net, pgsql-general@postgresql.org
Subject: Re: Replication Ideas
In-Reply-To: <1061971951.18060.357.camel@haggis>
References: <200308270325.h7R3PfI24921@candle.pha.pa.us> <6358.1061955430@sss.pgh.pa.us> <1061971951.18060.357.camel@haggis>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox