Re: Nextval & Currval - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: Nextval & Currval
Date
Msg-id dcc563d10806100804m59fb326fke114422aff693fbf@mail.gmail.com
Whole thread Raw
In response to Re: Nextval & Currval  ("Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it>)
List pgsql-sql
On Tue, Jun 10, 2008 at 7:14 AM, Shavonne Marietta Wijesinghe
<shavonne.marietta@studioform.it> wrote:
> I managed to make the connection work. I tried inserting records from 2
> computers. It works fine untill 2 computers insert a nextwall one after
> another.
>
> Here is a small example of what i see in my DB
>
> ++++++|+++++++++++++++++|++++++++++
>     N °    |       Session                |   Number
> ++++++|+++++++++++++++++ |++++++++++
>   1        |       DB last record       |   269
>   2        |       PC A (nextval )      |   270
>   3        |       PC A (nextval )      |   271
>   4        |       PC A (currval )       |   271
>   5        |       PC A (nextval )      |   272
>   6        |       PC A (nextval )      |   273
>   7        |       PC B (nextval )      |   274
>   8        |       PC A (currval )       |   274
>   9        |       PC B (nextval )      |   275
>   10      |       PC A (nextval )       |   276

Are you using connection pooling?  Could it be that session PC A on
the client side is switching connections between 6 and 8?  What to you
get from pg_backend_pid() in the two instances of time 6 and 8?


pgsql-sql by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: help in writing query
Next
From: Chris Browne
Date:
Subject: Re: One Text Table or Multiple Text Tables - Design Tradeoffs?