On Sun, Nov 05, 2000 at 03:48:13PM +0200, Hannu Krosing wrote:
> Tom Lane wrote:
> >
> > Philip Warner <pjw@rhyme.com.au> writes:
> > >> * disk space --- letting pg_log grow without bound isn't a pleasant
> > >> prospect either.
> >
> > > Maybe this can be achieved by wrapping XID for the log file only.
> >
> > How's that going to improve matters? pg_log is ground truth for XIDs;
> > if you can't distinguish two XIDs in pg_log, there's no point in
> > distinguishing them elsewhere.
>
> One simple way - start a new pg_log file at each wraparound and encode
> the high 4 bytes in the filename (or in first four bytes of file)
Proposal:
Annotate each log file with the current XID value at the time the file
is created. Before comparing any two XIDs, subtract that value from
each operand, using unsigned arithmetic.
At a sustained rate of 10,000 transactions/second, any pair of 32-bit
XIDs less than 2.5 days apart compare properly.
Nathan Myers
ncm@zembu.com