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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to