On Thu, Jun 11, 2009 at 1:13 PM, Brett Henderson<brett@xxxxxxxxxx> wrote: > Marko Kreen wrote: > Sorry, I'm not sure what you're suggesting with txid_current(). We're > currently using the |txid_current_snapshot|() method which returns us the > maximum transaction id plus in-flight transactions. We specifically exclude > transactions that are in-flight from the query, then include them on > subsequent queries when they have committed. i think what marko is suggesting is a new column, e.g: alter table X add column txid bigint default current_txid(); the current_txid() function returning an int8 which is the 32-bit txid in the lower word and a 32-bit "epoch" counter in the higher word so that it doesn't wrap-around. >> See pgq.batch_event_sql() function in Skytools [2] for how to >> query txids between snapshots efficiently and without being affected >> by long transactions. > > I'll take a look. it was looking at the skytools stuff which got me thinking about using txids in the first place. someone on the osm-dev list had suggested using PgQ, but we weren't keen on the schema changes that would have been necessary. cheers, matt -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general