BUG #13324: Database returing incorrect results on querying slect clause

Started by Sharma, Krishna Kumaralmost 11 years ago8 messagesbugs
Jump to latest
#1Sharma, Krishna Kumar
ksharma6@metlife.com

The following bug has been logged on the website:

Bug reference: 13324
Logged by: Krishna Sharma
Email address: ksharma6@metlife.com
PostgreSQL version: Unsupported/Unknown
Operating system: Windows 2003
Description:

Hi PostgreSQL team, we are suing PostGreSQL 8.2.

When I run a query in database like
select * from dn_case where id= 1234.

it returns 2 rows with different ids.

How is this happening?

it seems the database is corrupt. Please suggest a soluton for this issue.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Venkata B Nagothi
nag1010@gmail.com
In reply to: Sharma, Krishna Kumar (#1)
Re: BUG #13324: Database returing incorrect results on querying slect clause

On Thu, May 21, 2015 at 12:23 PM, <ksharma6@metlife.com> wrote:

The following bug has been logged on the website:

Bug reference: 13324
Logged by: Krishna Sharma
Email address: ksharma6@metlife.com
PostgreSQL version: Unsupported/Unknown
Operating system: Windows 2003
Description:

Hi PostgreSQL team, we are suing PostGreSQL 8.2.

When I run a query in database like
select * from dn_case where id= 1234.

it returns 2 rows with different ids.

How is this happening?

it seems the database is corrupt. Please suggest a soluton for this issue.

It seems to be. Cannot be confirmed without much details. Can you please
share the output ? is this reproducible ?

Also, can you let us know some details on what exactly was happening in the
database.

Regards,
Venkata B N

Fujitsu Australia

#3Sharma, Krishna Kumar
ksharma6@metlife.com
In reply to: Venkata B Nagothi (#2)
Re: BUG #13324: Database returing incorrect results on querying slect clause

Attached is the output.

There were jobs loading data into the db and due to disk space they got abended. The disk space was increased afyer that and since than we started facing this issue.

This clearly shows the DB got corrupted due to that, but now how do we fix this table? And how do we identify that all the other tables are fine.

From: Venkata Balaji N [mailto:nag1010@gmail.com]
Sent: Thursday, May 21, 2015 8:02 PM
To: Sharma, Krishna Kumar
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #13324: Database returing incorrect results on querying slect clause

On Thu, May 21, 2015 at 12:23 PM, <ksharma6@metlife.com<mailto:ksharma6@metlife.com>> wrote:
The following bug has been logged on the website:

Bug reference: 13324
Logged by: Krishna Sharma
Email address: ksharma6@metlife.com<mailto:ksharma6@metlife.com>
PostgreSQL version: Unsupported/Unknown
Operating system: Windows 2003
Description:

Hi PostgreSQL team, we are suing PostGreSQL 8.2.

When I run a query in database like
select * from dn_case where id= 1234.

it returns 2 rows with different ids.

How is this happening?

it seems the database is corrupt. Please suggest a soluton for this issue.

It seems to be. Cannot be confirmed without much details. Can you please share the output ? is this reproducible ?
Also, can you let us know some details on what exactly was happening in the database.
Regards,
Venkata B N
Fujitsu Australia

The information contained in this message may be CONFIDENTIAL and is for the intended addressee only. Any unauthorized use, dissemination of the information, or copying of this message is prohibited. If you are not the intended addressee, please notify the sender immediately and delete this message.

Attachments:

India_Issue.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document; name=India_Issue.docxDownload+1-4
#4Thomas Munro
thomas.munro@gmail.com
In reply to: Sharma, Krishna Kumar (#1)
Re: BUG #13324: Database returing incorrect results on querying slect clause

On Thu, May 21, 2015 at 2:23 PM, <ksharma6@metlife.com> wrote:

The following bug has been logged on the website:

Bug reference: 13324
Logged by: Krishna Sharma
Email address: ksharma6@metlife.com
PostgreSQL version: Unsupported/Unknown
Operating system: Windows 2003
Description:

Hi PostgreSQL team, we are suing PostGreSQL 8.2.

When I run a query in database like
select * from dn_case where id= 1234.

it returns 2 rows with different ids.

How is this happening?

With no other information, my first guess would be that an index has
somehow become corrupted.

it seems the database is corrupt. Please suggest a soluton for this issue.

The solution may be to rebuild the index:

http://www.postgresql.org/docs/8.2/static/sql-reindex.html

(That is a very old PostgreSQL release which is no longer supported
because it reached 'EOL' status in 2011:
http://www.postgresql.org/support/versioning/ ).

--
Thomas Munro
http://www.enterprisedb.com

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#5Sharma, Krishna Kumar
ksharma6@metlife.com
In reply to: Thomas Munro (#4)
Re: BUG #13324: Database returing incorrect results on querying slect clause

Thanks,

Yes we also think the same that index are corrupt.

Is there a way to find all the corrupt indexes?

The information contained in this message may be CONFIDENTIAL and is for the intended addressee only. Any unauthorized use, dissemination of the information, or copying of this message is prohibited. If you are not the intended addressee, please notify the sender immediately and delete this message.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#6Bruce Momjian
bruce@momjian.us
In reply to: Sharma, Krishna Kumar (#1)
Re: BUG #13324: Database returing incorrect results on querying slect clause

On Thu, May 21, 2015 at 3:23 AM, <ksharma6@metlife.com> wrote:

Hi PostgreSQL team, we are suing PostGreSQL 8.2.

The bad news is that Postgres 8.2 is very very old. It's been over
three years since we stopped updating or supporting that version. It's
possible you've hit one of the known bugs fixed in point releases (the
last was 8.2.23) or it's possible you've found a new bug. But it's
unlikely anyone is going to be digging out 8.2 sources to debug it
unless you're interested in hiring someone to do so.

It's possible that running REINDEX will fix your database for now but
I would strongly suggest using pg_dump to dump your database and then
restore it into a Postgres 9.4 database.

--
greg

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#7Venkata B Nagothi
nag1010@gmail.com
In reply to: Sharma, Krishna Kumar (#5)
Re: BUG #13324: Database returing incorrect results on querying slect clause

On Fri, May 22, 2015 at 10:20 AM, Sharma, Krishna Kumar <
ksharma6@metlife.com> wrote:

Thanks,

Yes we also think the same that index are corrupt.

Is there a way to find all the corrupt indexes?

AFAIK there is no straight forward way to identify the corrupted Indexes.

Regards,
Venkata Balaji N

Fujitsu Australia

#8Sharma, Krishna Kumar
ksharma6@metlife.com
In reply to: Venkata B Nagothi (#7)
Re: BUG #13324: Database returing incorrect results on querying slect clause

Thanks.

We did re-index and that fixed the issue.

You can close the case.

From: Venkata Balaji N [mailto:nag1010@gmail.com]
Sent: Saturday, May 23, 2015 5:12 AM
To: Sharma, Krishna Kumar
Cc: Thomas Munro; PostgreSQL Bugs
Subject: Re: [BUGS] BUG #13324: Database returing incorrect results on querying slect clause

On Fri, May 22, 2015 at 10:20 AM, Sharma, Krishna Kumar <ksharma6@metlife.com<mailto:ksharma6@metlife.com>> wrote:
Thanks,

Yes we also think the same that index are corrupt.

Is there a way to find all the corrupt indexes?

AFAIK there is no straight forward way to identify the corrupted Indexes.

Regards,
Venkata Balaji N

Fujitsu Australia

The information contained in this message may be CONFIDENTIAL and is for the intended addressee only. Any unauthorized use, dissemination of the information, or copying of this message is prohibited. If you are not the intended addressee, please notify the sender immediately and delete this message.