pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgres crash. HELP
5+ messages / 3 participants
[nested] [flat]

* postgres crash. HELP
@ 2000-05-06 06:54  Oscar Serrano <oserra@fondos.net>
  0 siblings, 2 replies; 5+ messages in thread

From: Oscar Serrano @ 2000-05-06 06:54 UTC (permalink / raw)
  To: pgsql-interfaces

Hi:
I don't know how, but Postgres has made a very odd thing.
Suddenly in the directory where I have all the tables, now there is about
1000 files with names like this:

pg_class_oid_index.165               pg_class_oid_index.2835
pg_class_oid_index.1650              pg_class_oid_index.2836
pg_class_oid_index.1651              pg_class_oid_index.2837
pg_class_oid_index.1652              pg_class_oid_index.2838
pg_class_oid_index.1653              pg_class_oid_index.2839
pg_class_oid_index.1654              pg_class_oid_index.284
pg_class_oid_index.1655              pg_class_oid_index.2840
pg_class_oid_index.1656              pg_class_oid_index.2841
pg_class_oid_index.1657              pg_class_oid_index.2842
pg_class_oid_index.1658              pg_class_oid_index.2843
pg_class_oid_index.1659              pg_class_oid_index.2844
pg_class_oid_index.166               pg_class_oid_index.2845
pg_class_oid_index.1660              pg_class_oid_index.2846
pg_class_oid_index.1661              pg_class_oid_index.2847
pg_class_oid_index.1662              pg_class_oid_index.2848
pg_class_oid_index.1663              pg_class_oid_index.2849


And one of my biggest tables, is now like this:

+----------------------------------+----------------------------------+-----
--+
|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-----
--+
| fecha                            | datetime                         |
8 |
| fecha                            | datetime                         |
8 |
| cc                               | int4                             |
4 |
| cc                               | int4                             |
4 |
| isin                             | varchar()                        |
12 |
| isin                             | varchar()                        |
12 |
| valor                            | float8                           |
8 |
| valor                            | float8                           |
8 |
| patrimonio                       | float8                           |
8 |
| patrimonio                       | float8                           |
8 |
| participes                       | int4                             |
4 |
| participes                       | int4                             |
4 |
| pre_max                          | float8                           |
8 |
| pre_max                          | float8                           |
8 |
+----------------------------------+----------------------------------+-----
--+
Index:    if_bbsacu


I mean, all the fiels has been duplicated :-???
And the index, the same:

Table    = if_bbsacu
+----------------------------------+----------------------------------+-----
--+
|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-----
--+
| cc                               | int4                             |
4 |
| cc                               | int4                             |
4 |
+----------------------------------+----------------------------------+-----
--+


And now, when I restart postgres, I get this message:
Stopping postgresql service:                      [  OK  ]
Starting postgresql service: FindExec: found "/home/pgsql/bin/postgres"
using argv[0]
binding ShmemCreate(key=56a3b1, size=3896320)
postmaster [16106]


And each time I access for whatever to the table with the duplicate fields,
postgres crashes and I have to restart it.

And when trying to vacuum the table....
[f@svr1 pgsql]$ vacuumdb --analyze --verbose -t tf_bbsacu aii
NOTICE:  --Relation tf_bbsacu--
NOTICE:  Pages 0: Changed 0, Reapped 0, Empty 0, New 0; Tup 0: Vac 0,
Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 0, MaxLen 0; Re-using: Free/Avail.
Space 0/0; EndEmpty/Avail. Pages 0/0. Elapsed 0/0 sec.
ERROR:  cannot find attribute 2 of relation if_bbsacu
vacuumdb: database vacuum failed on aii.

Does anybody know how to fix it?

Thank you very much.




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: postgres crash. HELP
@ 2000-05-07 16:17  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Oscar Serrano <oserra@fondos.net>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2000-05-07 16:17 UTC (permalink / raw)
  To: Oscar Serrano <oserra@fondos.net>; +Cc: pgsql-interfaces

"Oscar Serrano" <oserra@fondos.net> writes:
> Suddenly in the directory where I have all the tables, now there is about
> 1000 files with names like this:
> [ and a bunch of apparently-duplicated entries in system catalogs ]

Looks pretty messy :-(.  What version are you running?

I hope you have a fairly recent pg_dumpall backup, because otherwise
you are likely to be in trouble.  If the backup is new enough that you
can just restore from it without losing much, then I'd recommend just
initdb and restore.  If you have newer data than what is in the backup,
but the schema is still the same, you could probably use pg_upgrade to
recover the system tables from the backup and then move your current
user data into the database.  (It looks like the trouble is just in the
system tables, so your user tables are most likely OK.)

If you want to try the pg_upgrade method, make sure you have the latest
pg_upgrade script (from 7.0RC5, current nightly snapshot, or direct from
CVS server) --- previous versions are known to have problems in
multi-user databases.  Then, follow the man page's directions for
pg_upgrade, except don't bother trying to make a "pg_dumpall -s" dump
from your corrupted database; instead use your last good backup file
as the input script for pg_upgrade.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: postgres crash. HELP
@ 2000-05-07 18:48  Ken J. Wright <ken@ori-ind.com>
  parent: Oscar Serrano <oserra@fondos.net>
  1 sibling, 0 replies; 5+ messages in thread

From: Ken J. Wright @ 2000-05-07 18:48 UTC (permalink / raw)
  To: Oscar Serrano <oserra@fondos.net>; pgsql-interfaces

On Fri, 05 May 2000, Oscar Serrano wrote:
> Hi:
> I don't know how, but Postgres has made a very odd thing.
> Suddenly in the directory where I have all the tables, now there is about
> 1000 files with names like this:
> 
> pg_class_oid_index.165               pg_class_oid_index.2835
> pg_class_oid_index.1650              pg_class_oid_index.2836

I had the same problem at a site with 6.5.0. Although postgres did not crash, it
did suck up a lot of disk space. After upgrading to 6.5.3 and doing
initdb with a good backup the problem appears to have been fixed.

Ken



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: postgres crash. HELP
@ 2000-05-08 09:11  Oscar Serrano <oserra@fondos.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Oscar Serrano @ 2000-05-08 09:11 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces



> -----Mensaje original-----
> De: pgsql-interfaces-owner@hub.org
> [mailto:pgsql-interfaces-owner@hub.org]En nombre de Tom Lane
> Enviado el: domingo, 07 de mayo de 2000 18:18
> Para: Oscar Serrano
> CC: pgsql-interfaces@postgresql.org
> Asunto: Re: [INTERFACES] postgres crash. HELP
>
>
> "Oscar Serrano" <oserra@fondos.net> writes:
> > Suddenly in the directory where I have all the tables, now
> there is about
> > 1000 files with names like this:
> > [ and a bunch of apparently-duplicated entries in system catalogs ]
>
> Looks pretty messy :-(.  What version are you running?
>
> I hope you have a fairly recent pg_dumpall backup, because otherwise
> you are likely to be in trouble.  If the backup is new enough that you
> can just restore from it without losing much, then I'd recommend just
> initdb and restore.  If you have newer data than what is in the backup,
> but the schema is still the same, you could probably use pg_upgrade to
> recover the system tables from the backup and then move your current
> user data into the database.  (It looks like the trouble is just in the
> system tables, so your user tables are most likely OK.)

I had a backup fortunately. I first had to make some pg_dump of some tables
that were not corrupted and restore them later.
I have postgres 6.5.3.
I didn't know about pg_upgrade. I will have to read about it.
Actually I have my dabatases open to every IP address, so anybody that
enters our web page, and visits some of our applets, the connect via JDBC to
our database. I think that during one of this connection, the postgres
crashed. I'm going to stop using JDBC.
Is there any known problem with the ODBC of the postgres?



> If you want to try the pg_upgrade method, make sure you have the latest
> pg_upgrade script (from 7.0RC5, current nightly snapshot, or direct from
> CVS server) --- previous versions are known to have problems in
> multi-user databases.  Then, follow the man page's directions for
> pg_upgrade, except don't bother trying to make a "pg_dumpall -s" dump
> from your corrupted database; instead use your last good backup file
> as the input script for pg_upgrade.
>
> 			regards, tom lane


The problem was that I could not access the corrupted database for nothing.
Neither could I do a SELECT nor a pg_dump. The fields of the index were also
duplicated and that was generating more errors. I really think the data was
there but the system databases where corrupted.
Our schema don't change everyday so I'm going to do a backup of the system
tables every day.

Thank you very much.




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: postgres crash. HELP
@ 2000-05-08 14:08  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Oscar Serrano <oserra@fondos.net>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2000-05-08 14:08 UTC (permalink / raw)
  To: Oscar Serrano <oserra@fondos.net>; +Cc: pgsql-interfaces

"Oscar Serrano" <oserra@fondos.net> writes:
> I had a backup fortunately. I first had to make some pg_dump of some tables
> that were not corrupted and restore them later.
> I have postgres 6.5.3.
> I didn't know about pg_upgrade. I will have to read about it.
> Actually I have my dabatases open to every IP address, so anybody that
> enters our web page, and visits some of our applets, the connect via JDBC to
> our database. I think that during one of this connection, the postgres
> crashed. I'm going to stop using JDBC.
> Is there any known problem with the ODBC of the postgres?

I don't think you can fairly blame JDBC for this problem; it's an
internal-to-the-backend bug of some sort.  I would suggest upgrading
to 7.0 as a more reasonable response... we've fixed an awful lot of
bugs since 6.5.*.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2000-05-08 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-06 06:54 postgres crash. HELP Oscar Serrano <oserra@fondos.net>
2000-05-07 16:17 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-05-08 09:11   ` Oscar Serrano <oserra@fondos.net>
2000-05-08 14:08     ` Tom Lane <tgl@sss.pgh.pa.us>
2000-05-07 18:48 ` Ken J. Wright <ken@ori-ind.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox