Re: tracking commit timestamps
| От | Andres Freund |
|---|---|
| Тема | Re: tracking commit timestamps |
| Дата | |
| Msg-id | 20141105224336.GB28295@alap3.anarazel.de обсуждение исходный текст |
| Ответ на | Re: tracking commit timestamps (Steve Singer <steve@ssinger.info>) |
| Ответы |
Re: tracking commit timestamps
|
| Список | 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 по дате отправления: