Re: Re: Re: is PG able to handle a >500 GB Database?

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: rob <rob(at)cabrion(dot)com>, Florent Guillaume <efgeor(at)noos(dot)fr>, Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: Re: is PG able to handle a >500 GB Database?
Date: 2001-01-20 16:36:41
Message-ID: Pine.LNX.4.30.0101201135460.28271-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 20 Jan 2001, Tom Lane wrote:

> > currval returns error unless nextval has been called at least once in the
> > session.
>
> > I use <seq>.last_value
>
> > Perhaps I'm fooling myself
>
> Yes, you are, unless you never have more than one client attached to
> your database. last_value will return whatever value was last assigned
> by any backend, therefore you might not get the value that was inserted
> into your tuple, but someone else's.

In that case you would call next_val *before* you insert and use that
value in the INSERT statement.

-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Military intelligence is a contradiction in terms.
-- Groucho Marx

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-01-20 16:42:37 Re: Re: Re: is PG able to handle a >500 GB Database?
Previous Message Tom Lane 2001-01-20 16:24:15 Re: pg_sendmail function compile problem