pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedNeed help with corrupt pg_statistic
3+ messages / 3 participants
[nested] [flat]
* Need help with corrupt pg_statistic
@ 2005-09-30 00:42 Kevin Seghetti <kts@tenetti.org>
2005-10-03 02:01 ` Re: Need help with corrupt pg_statistic Tom Lane <tgl@sss.pgh.pa.us>
2005-10-03 18:57 ` Re: Need help with corrupt pg_statistic Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 2 replies; 3+ messages in thread
From: Kevin Seghetti @ 2005-09-30 00:42 UTC (permalink / raw)
To: pgsql-admin
I am using postgres 7.4.5, and have a corrupt pg_statistic.
Many commands cause the following error:
ERROR: invalid page header in block 10 of relation "pg_statistic"
I want to preserve my data if at all possible, I figured I would just
dump the database and reload it. I tried
pg_dump, but it gives me:
pg_dump: query to obtain list of data types failed: ERROR: invalid page header in block 11 of relation "pg_statistic"
even if I just try to dump a single table.
I tried postgres in single-user mode:
delete from pg_statistic
gives me the same error
drop table pg_statistic
gives me
ERROR: permission denied: "pg_statistic" is a system catalog
Is there any way to nuke pg_statistic (since its contents can be
recalculated anyway?)
Thanks,
--
Kevin Seghetti: E-Mail: kts@tenetti.org, HTTP: www.tenetti.org
GPG public key: http://tenetti.org/cgi-bin/twiki/view.cgi/KevinSeghetti/GPGKey
Check out www.worldfoundry.org for my GPL'ed 3D video game engine
Copyright is a temporary loan from the public domain, not property
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Need help with corrupt pg_statistic
2005-09-30 00:42 Need help with corrupt pg_statistic Kevin Seghetti <kts@tenetti.org>
@ 2005-10-03 02:01 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2005-10-03 02:01 UTC (permalink / raw)
To: Kevin Seghetti <kts@tenetti.org>; +Cc: pgsql-admin
Kevin Seghetti <kts@tenetti.org> writes:
> Is there any way to nuke pg_statistic (since its contents can be
> recalculated anyway?)
You want to do "TRUNCATE pg_statistic"; to avoid the permission check,
you'll need to do that in a standalone backend with -O option.
Do *not* try to drop and recreate it --- its OID is hardwired into
various places.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Need help with corrupt pg_statistic
2005-09-30 00:42 Need help with corrupt pg_statistic Kevin Seghetti <kts@tenetti.org>
@ 2005-10-03 18:57 ` Jim C. Nasby <jnasby@pervasive.com>
1 sibling, 0 replies; 3+ messages in thread
From: Jim C. Nasby @ 2005-10-03 18:57 UTC (permalink / raw)
To: Kevin Seghetti <kts@tenetti.org>; +Cc: pgsql-admin
You should probably be asking yourself why you have corruption in your
database. I suspect whatever hardware that database is on is having
problems that need to be addressed.
On Thu, Sep 29, 2005 at 05:42:16PM -0700, Kevin Seghetti wrote:
> I am using postgres 7.4.5, and have a corrupt pg_statistic.
> Many commands cause the following error:
> ERROR: invalid page header in block 10 of relation "pg_statistic"
>
> I want to preserve my data if at all possible, I figured I would just
> dump the database and reload it. I tried
> pg_dump, but it gives me:
> pg_dump: query to obtain list of data types failed: ERROR: invalid page header in block 11 of relation "pg_statistic"
> even if I just try to dump a single table.
>
> I tried postgres in single-user mode:
> delete from pg_statistic
> gives me the same error
> drop table pg_statistic
> gives me
> ERROR: permission denied: "pg_statistic" is a system catalog
>
> Is there any way to nuke pg_statistic (since its contents can be
> recalculated anyway?)
>
> Thanks,
>
> --
> Kevin Seghetti: E-Mail: kts@tenetti.org, HTTP: www.tenetti.org
> GPG public key: http://tenetti.org/cgi-bin/twiki/view.cgi/KevinSeghetti/GPGKey
> Check out www.worldfoundry.org for my GPL'ed 3D video game engine
> Copyright is a temporary loan from the public domain, not property
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-10-03 18:57 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-09-30 00:42 Need help with corrupt pg_statistic Kevin Seghetti <kts@tenetti.org>
2005-10-03 02:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-10-03 18:57 ` Jim C. Nasby <jnasby@pervasive.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