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

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

From
ksharma6@metlife.com
Date:
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.

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

From
Venkata Balaji N
Date:
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
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
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

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

From
"Sharma, Krishna Kumar"
Date:
VGhhbmtzLA0KDQpZZXMgd2UgYWxzbyB0aGluayB0aGUgc2FtZSB0aGF0IGluZGV4IGFyZSBjb3Jy
dXB0Lg0KDQpJcyB0aGVyZSBhIHdheSB0byBmaW5kIGFsbCB0aGUgY29ycnVwdCBpbmRleGVzPw0K
DQpUaGUgaW5mb3JtYXRpb24gY29udGFpbmVkIGluIHRoaXMgbWVzc2FnZSBtYXkgYmUgQ09ORklE
RU5USUFMIGFuZCBpcyBmb3IgdGhlIGludGVuZGVkIGFkZHJlc3NlZSBvbmx5LiAgQW55IHVuYXV0
aG9yaXplZCB1c2UsIGRpc3NlbWluYXRpb24gb2YgdGhlIGluZm9ybWF0aW9uLCBvciBjb3B5aW5n
IG9mIHRoaXMgbWVzc2FnZSBpcyBwcm9oaWJpdGVkLiAgSWYgeW91IGFyZSBub3QgdGhlIGludGVu
ZGVkIGFkZHJlc3NlZSwgcGxlYXNlIG5vdGlmeSB0aGUgc2VuZGVyIGltbWVkaWF0ZWx5IGFuZCBk
ZWxldGUgdGhpcyBtZXNzYWdlLgo=

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

From
"Sharma, Krishna Kumar"
Date:

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> 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

 

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.
Attachment

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

From
Venkata Balaji N
Date:
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

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

From
"Sharma, Krishna Kumar"
Date:
VGhhbmtzLg0KDQpXZSBkaWQgcmUtaW5kZXggYW5kIHRoYXQgZml4ZWQgdGhlIGlzc3VlLg0KDQpZ
b3UgY2FuIGNsb3NlIHRoZSBjYXNlLg0KDQoNCg0KRnJvbTogVmVua2F0YSBCYWxhamkgTiBbbWFp
bHRvOm5hZzEwMTBAZ21haWwuY29tXQ0KU2VudDogU2F0dXJkYXksIE1heSAyM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