Re: session IDs - Mailing list pgsql-hackers

From Kris Jurka
Subject Re: session IDs
Date
Msg-id Pine.LNX.4.33.0402030914080.15293-100000@leary.csoft.net
Whole thread Raw
In response to session IDs  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
> >
> > Tom Lane wrote:
> >
> >> Andrew Dunstan <andrew@dunslane.net> writes:
> >>
> >>> I did think about using a cluster-wide sequence, if we can make such
> >>> a thing (might also be useful for system generated UIDs too).
> >>
> >> Not a good idea IMHO.  If you do that, then there will be no such thing
> >> as a purely read-only transaction, because *every* transaction will
> >> include a nextval() call.  That means even read-only transactions cannot
> >> commit till the disk spins.
> >>

A sequence could be used if it was created with a sufficiently large CACHE
value, so a read only transaction would only have to hit the disk if it
happened to be the one to hit an exhausted cache.

Kris Jurka



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pg_restore bug in 7.4.1 ?
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] log session end - again