Re: tracking commit timestamps - Mailing list pgsql-hackers

From Andres Freund
Subject Re: tracking commit timestamps
Date
Msg-id 20141105224336.GB28295@alap3.anarazel.de
Whole thread Raw
In response to Re: tracking commit timestamps  (Steve Singer <steve@ssinger.info>)
Responses Re: tracking commit timestamps  (Steve Singer <steve@ssinger.info>)
List pgsql-hackers
On 2014-11-05 17:17:05 -0500, Steve Singer wrote:
> It isn't just 'replication' systems that have a need for getting the commit
> order of transactions on a single system.  I have a application (not slony)
> where we want to query a table but order the output based on the transaction
> commit order of when the insert into the table was done (think of a queue).
> I'm not replicating the output but passing the data to other applications
> for further processing.  If I just had the commit timestamp I would need to
> put in some other condition to break ties in a consistent way.  I think
> being able to get an ordering by commit LSN is what I really want in this
> case not the timestamp.
> 
> Logical decoding is one solution to this (that I was considering) but being
> able to do something like
> select * FROM event_log order by commit_id would be a lot simpler.

Imo that's essentially a different feature. What you essentially would
need here is a 'commit sequence number' - but no timestamps. And
probably to be useful that number has to be 8 bytes in itself.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Sequence Access Method WIP
Next
From: Jeff Janes
Date:
Subject: Re: BRIN indexes - TRAP: BadArgument