pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jose Orlando Pereira <jop@lsd.di.uminho.pt>
To: pgsql-hackers@postgresql.org
Cc: Christopher Browne <cbbrowne@acm.org>
Subject: Re: standard interfaces for replication providers
Date: Tue, 8 Aug 2006 22:48:01 +0100
Message-ID: <200608082248.01322.jop@lsd.di.uminho.pt> (raw)
In-Reply-To: <87irl3uqgx.fsf@wolfe.cbbrowne.com>
References: <44D30B31.2070403@lsd.di.uminho.pt>
	<44D89EA5.5090703@bluegap.ch>
	<87irl3uqgx.fsf@wolfe.cbbrowne.com>

On Tuesday 08 August 2006 17:44, Christopher Browne wrote:
> Most databases that are interesting to replicate are implemented in C
> or C++, thereby implying that a suitably "deep" API needs to be
> implemented in C.
>
> In the case of PostgresQL, at least, operating in Java means that you
> need to operate at "arms length" from the database, which means the
> replication system is by no means tightly integrated.

Yes, PostgreSQL is the tough one here. Having a single-process multithreaded 
PostgreSQL in which PL/Java would run in one global JVM would sure feel like 
Christmas! ;)

Note however that the problem is not Java, but any package that does not 
expect the current PostgreSQL concurrency model. AFAIK Postgres-R has 
same "arms length" architecture with an external process, probably for 
compatibility with Spread.

We have however tried to minimize the inconvenience, even for PostgreSQL, by 
doing the following:
 
1. Implementation was done in two layers, in which the PostgreSQL-specific one 
is 100% Java-free and feature complete. 

2. High level functionality (i.e. transaction priorities instead of directly 
handling individual lock operations) reduce the number of round-trips to the 
replication process.

3. Event listeners in Java can be registered as non-blocking, thus putting the 
external JVM out of the critical path except in a few critical operations.

Finally, although I concede that most databases that are interesting to 
replicate are written in C or C++, these days, most are also getting tightly 
coupled JVMs fairly high in their feature lists.

-- 
Jose Orlando Pereira



view thread (21+ messages)  latest in thread

Message-ID: <200608082248.01322.jop@lsd.di.uminho.pt>
Permalink:  ../200608082248.01322.jop@lsd.di.uminho.pt/
Also on:    postgresql.org/message-id/200608082248.01322.jop@lsd.di.uminho.pt

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: jop@lsd.di.uminho.pt, cbbrowne@acm.org
  Subject: Re: standard interfaces for replication providers
  In-Reply-To: <200608082248.01322.jop@lsd.di.uminho.pt>

* 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