[BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Mikael Kjellström
Hi, First some info about the machine and the postgres version: os: Debian 6.0.5 (64-bit) postgres version: PostgreSQL 9.0.9 on x86_64-unknown-linux-gnu, compiled by GCC gcc (Debian 4.4.5-8) 4.4.5, 64-bit The problem: I first noticed pg_dump giving the following error message when trying to

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Tom Lane
=?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: > # drop view communitytaxiexceptions ; > ERROR: invalid attribute number 0 for communitytaxiexceptions That's pretty odd --- it implies something nasty has happened to the contents of pg_attribute. It would be interesting to have a look at s

[BUGS] BUG #7574: CASE in WHERE condition change result set

2012-09-28 Thread urvancevav
The following bug has been logged on the website: Bug reference: 7574 Logged by: Andrei Email address: urvance...@gmail.com PostgreSQL version: 9.2.1 Operating system: 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 Description: in query like this: select departu

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Mikael Kjellström
On 2012-09-28 16:35, Tom Lane wrote: =?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: # drop view communitytaxiexceptions ; ERROR: invalid attribute number 0 for communitytaxiexceptions That's pretty odd --- it implies something nasty has happened to the contents of pg_attribute. It would be

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Tom Lane
=?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: > On 2012-09-28 16:35, Tom Lane wrote: >> That's pretty odd --- it implies something nasty has happened to the >> contents of pg_attribute. It would be interesting to have a look at >> select * from pg_attribute where attrelid = >> 'communitytaxiexcep

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Mikael Kjellström
On 2012-09-28 19:01, Tom Lane wrote: Looks like you had some data corruption from the spike. If you're lucky, it's just this one block of pg_attribute and you can reconstruct things. If not, there may be more problems ... Looks like there are more problems unfortunally. See below. Any po

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Tom Lane
=?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: > I tried the reindex and then the manual delete of the view from > pg_class. That took care of the rows in pg_attribute but when I tried > to run pg_dump I now get this: > pg_dump: failed sanity check, parent table OID 16547 of pg_rewrite entry >

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Mikael Kjellström
On 2012-09-28 19:26, Tom Lane wrote: =?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: I tried the reindex and then the manual delete of the view from pg_class. That took care of the rows in pg_attribute but when I tried to run pg_dump I now get this: pg_dump: failed sanity check, parent table

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Tom Lane
=?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: > Your recomendation is to restore the backup to a new database and drop > the old one, right? Right. If you've got more than one active database in this installation, it might be prudent to dump and restore the whole thing --- but in any case, you d

Re: [BUGS] Corrupt view in PostgreSQL 9.0.9

2012-09-28 Thread Mikael Kjellström
On 2012-09-28 19:39, Tom Lane wrote: =?ISO-8859-1?Q?Mikael_Kjellstr=F6m?= writes: Your recomendation is to restore the backup to a new database and drop the old one, right? Right. If you've got more than one active database in this installation, it might be prudent to dump and restore the wh