Skip site navigation (1) Skip section navigation (2)

Re: Nextval & Currval

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Shavonne Marietta Wijesinghe" <shavonne(dot)marietta(at)studioform(dot)it>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Nextval & Currval
Date: 2008-06-10 15:04:57
Message-ID: dcc563d10806100804m59fb326fke114422aff693fbf@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Tue, Jun 10, 2008 at 7:14 AM, Shavonne Marietta Wijesinghe
<shavonne(dot)marietta(at)studioform(dot)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?

In response to

pgsql-sql by date

Next:From: maria sDate: 2008-06-10 15:19:07
Subject: Re: help in writing query
Previous:From: Pavel StehuleDate: 2008-06-10 15:03:25
Subject: Re: help in writing query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group