Re: Help needed with PostgreSQL clustering/switching from MySQL - Mailing list pgsql-general

From Craig Ringer
Subject Re: Help needed with PostgreSQL clustering/switching from MySQL
Date
Msg-id 4E01600A.2020504@postnewspapers.com.au
Whole thread Raw
In response to Re: Help needed with PostgreSQL clustering/switching from MySQL  (Greg Smith <greg@2ndQuadrant.com>)
List pgsql-general
On 22/06/11 10:00, Greg Smith wrote:
> On 06/21/2011 10:00 AM, Vick Khera wrote:
>> Postgres has nothing quite like the MySQL cluster mode with NDB. You
>> will have to re-think your solution if you want to use postgres to
>> distribute your queries and data across multiple servers.
>>
>
> The closest thing to a NDB cluster in PostgreSQL is using PL/Proxy to
> split data across multiple nodes.  Both use similar hash-key methods to
> distribute things across more than one system, and you can run queries
> that return a combined set of results bigger than any single node could
> have handled.

Doesn't PL/Proxy, like NDB, offer no referential integrity enforcement
between nodes?

Enforcing referential integrity in a multi-master cluster is one of the
things that adds synchronization overhead and makes multi-master
clustered systems slower. In extremely rough terms, before a node can do
certain operations it has to ask one or more other nodes "can I do
this?" and wait for them to reply (possibly waiting for their disk I/O
or for other tasks to finish). Each node then has to say "I've done
this" when it's ready to commit the change and make it visible across
the cluster, and other nodes have to handle that change. For example, if
you want to delete a tuple that's in a table targeted by a referential
integrity constraint you have to ask all the other nodes whether they
have any tuples that reference yours before you can go ahead and delete
it. As you can imagine, this gets slow.

There are various caching and optimistic execution tricks used to help
with these issues in some clustered RDBMSes, but they're all limited to
various degrees. The more effective tricks come with application-visible
downsides: for example, they can allow transactions to abort at commit
time because a concurrent modification occurred on another cluster node.

--
Craig Ringer

pgsql-general by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: LISTEN filtering
Next
From: Amitabh Kant
Date:
Subject: Re: getting postgres server on freebsd startup?