Re: Exposing the Xact commit order to the user - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Exposing the Xact commit order to the user
Date
Msg-id 1274803405.6203.2008.camel@ebony
Whole thread Raw
In response to Exposing the Xact commit order to the user  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Exposing the Xact commit order to the user
List pgsql-hackers
On Sun, 2010-05-23 at 16:21 -0400, Jan Wieck wrote:

> In some systems (data warehousing, replication), the order of commits is
> important, since that is the order in which changes have become visible.
> This information could theoretically be extracted from the WAL, but
> scanning the entire WAL just to extract this tidbit of information would
> be excruciatingly painful.

I think it would be quite simple to read WAL. WALSender reads the WAL
file after its been flushed, so it would be simple for it to read a blob
of WAL and then extract the commit order from it.

Overall though, it would be easier and more efficient to *add* info to
WAL and then do all this processing *after* WAL has been transported
elsewhere. Extracting info with DDL triggers, normal triggers, commit
order and everything else seems like too much work to me. Every other
RDBMS has moved away from trigger-based replication and we should give
that serious consideration also.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Mike Fowler
Date:
Subject: Re: [PATCH] Add XMLEXISTS function from the SQL/XML standard
Next
From: Simon Riggs
Date:
Subject: Re: Synchronization levels in SR