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

BUG #5492: Query performs slowly and sequence corrupted

From: "Piergiorgio Buongiovanni" <piergiorgio(dot)buongiovanni(at)netspa(dot)it>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5492: Query performs slowly and sequence corrupted
Date: 2010-06-07 16:36:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-general
The following bug has been logged online:

Bug reference:      5492
Logged by:          Piergiorgio Buongiovanni
Email address:      piergiorgio(dot)buongiovanni(at)netspa(dot)it
PostgreSQL version: 8:4.3
Operating system:   x86_64-redhat-linux-gnu
Description:        Query performs slowly and sequence corrupted

Our production platform is based on:

"PostgreSQL 8.4.3 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC)
4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit"

We had a problem with a sequence on the Subject table of the business schema
approx one week ago. Today we have noted that a simple query SELECT * FROM
business.Subject performs very slowly and it needs up to 400000ms to extract
86 rows. We remember we had the same problem when the related sequence was
corrupted one week ago.
So we have noted that the sequence is newly corrupted: the last inserted row
in the Subject table has the value 100 and the sequence has a very high
value. So we used the following command: ALTER SEQUENCE
business.subject_isid_seq RESTART WITH 101 CACHE 10; to fix up the sequence,
but this command hasn't worked as the START value is now 134920.

I reused the previous command to re-set the sequence value to the right one,
but I see that the START value is now 59100. I reused the previous command
another time and the START value is now 30440.

I think this is a bug. I have a lot of problems with this sequence.

Could anybody please suggest me anything to solve this problem?

Kind regards


pgsql-bugs by date

Next:From: Florian WeimerDate: 2010-06-07 16:39:45
Subject: Re: [HACKERS] Invalid YAML output from EXPLAIN
Previous:From: Greg StarkDate: 2010-06-07 16:32:26
Subject: Re: BUG #5490: INSERT doesn't force cast from text to timestamp

pgsql-general by date

Next:From: Glen BarberDate: 2010-06-07 17:14:28
Subject: Misplaced ?
Previous:From: Greg SmithDate: 2010-06-07 16:34:14
Subject: Re: Performance drop after upgrading to 8.4.4?

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