Skip site navigation (1) Skip section navigation (2)

Re: Spec discussion: Generalized Data Queue / Modification Trigger

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Greg Sabino Mullane <greg(at)endpoint(dot)com>
Cc: PostgresCluster ML <pgsql-cluster-hackers(at)postgresql(dot)org>
Subject: Re: Spec discussion: Generalized Data Queue / Modification Trigger
Date: 2010-03-03 19:52:52
Message-ID: 4B8EBE14.8020000@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-cluster-hackers
Greg,

>> (1) The ability to send asynchronous (or synchronous?) notifications, on
>> a per-row basis, whenever data is modified *only after commit*.  This
>> has been generally described as "on-commit triggers", but could actually
>> take a variety of forms.
> 
> I'm not sure I like the idea of this. Could be potentially dangerous, as 
> listen/notify is not treated as a "reliable" process. What's wrong with 
> the current method, namely having a row trigger update an internal 
> table, and then a statement level trigger firing off a notify?

Well, the main problem with that is that it doubles the number of writes
you have to do ... or more.  So it's a major efficiency issue.

This isn't as much of a concern for a system like Slony or Londiste
where the replication queue is a table in the database.  But if you
were, say, replicating through ApacheMQ?  Or replicating cached data to
Redis?  Then the whole queue-table, NOTIFY, poll structure is needless
overhead.

>> (3) A method of marking DDL changes in the data modification stream.
> 
> Hmm..can you expand on what you have in mind here? Something more than 
> just treating the DDL as another item in the (txn ordered) queue?

Yeah, that would be one way to handle it.  Alternately, you could have
the ability to mark rows with a DDL "version".

--Josh Berkus


In response to

Responses

pgsql-cluster-hackers by date

Next:From: Hannu KrosingDate: 2010-03-03 21:01:44
Subject: Re: Spec discussion: Generalized Data Queue / Modification Trigger
Previous:From: Greg Sabino MullaneDate: 2010-03-03 19:28:10
Subject: Re: Spec discussion: Generalized Data Queue / Modification Trigger

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group