Re: 32/64-bit transaction IDs?

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 32/64-bit transaction IDs?
Date: 2003-03-22 06:12:12
Message-ID: 200303212312.12242.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday March 21 2003 10:07, Tom Lane wrote:
> >
> > Well, I'm trying to capture a 64-bit psuedo-transaction ID, just like
> > the WAL record number, but to do it within a C trigger so I can queue
> > it into another table and have all-or-none semantics. Am I correct in
> > assuming the XLogInsert() call is made after the transaction is
> > guaranteed to completed? If so, wouldn't this be beyond the triggered
> > function's reach?
>
> It's certainly out of reach of anything executed within the transaction,
> since by definition the commit record is only written after the
> transaction is done. It seems to me to be a contradiction in terms to
> expect within-transaction actions to have any information about commit
> order of their transaction.

I see your point. Maybe it's not possible to get perfect ordering from any
information available within a transaction?

Using the transaction ID for ordering seems problematic given the
variability of transaction lifetimes, not to mention the 32-bit issue. I
wonder if it'd be advisable to make WAL data available in a (system?)
table, maybe mapping the transaction ID to the WAL record number? Just
looking for some way to make the true commit order visible to a SQL query
in order to leverage existing replication code ...

Ed

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-03-22 06:37:52 Re: does vacuum still lock the table?
Previous Message Tom Lane 2003-03-22 05:07:13 Re: 32/64-bit transaction IDs?