Re: PostgreSQL 9.1 pg_dump setval() sets wrong value - Mailing list pgsql-general

From Adrian Klaver
Subject Re: PostgreSQL 9.1 pg_dump setval() sets wrong value
Date
Msg-id 201112281458.46968.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: PostgreSQL 9.1 pg_dump setval() sets wrong value  (Greg Donald <gdonald@gmail.com>)
Responses Re: PostgreSQL 9.1 pg_dump setval() sets wrong value
List pgsql-general
On Wednesday, December 28, 2011 1:02:39 pm Greg Donald wrote:
> On Wed, Dec 28, 2011 at 1:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Greg Donald <gdonald@gmail.com> writes:
> >>> Are you
> >>> sure that the sequence is being used to insert those values into the
> >>> table?
> >>
> >> When I insert a new row into either of the tables I previously
> >> described, the sequence 'Current value' increments by one.
> >
> > According to what?
>
> PgAdmin3.  I'm assuming 'Current value' means the sequence 'START'
> value, they are just using a different label than the official
> PostgreSQL terminology.. I guess.

Actually it is showing the last_value. The CREATE SEQUENCE command pgAdmin shows
for the sequence uses that value as the START value for replicating the state of
the sequence.

>
> > In any case, it is highly, highly unlikely that pg_dump is the cause of
> > the problem.
>
>
> When I dumped a copy from 8.4 to go live in 9.1 it went in fine, no
> setval() value issues at all.  It is only now that I have the 9.1
> version of pg_dump in place that restore problems are occurring.

What is the pg_dump command, with options, you are using?

>
> > It's just reporting what it finds in the database.
>
> Well, not in my case.  In my database my sequences do not contains
> these incorrect '1' values I see in some of the setval() calls.
>

--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL 9.1 pg_dump setval() sets wrong value
Next
From: Ben Chobot
Date:
Subject: checking for table bloat