473,698 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

invalid page header in block 52979 of relation "pg_attribu te"

This morning I got bitten by the "SELECT INTO" / "CREATE TABLE AS"
from tables without OIDs bug in 7.4.1.

Postmaster killed all the backends and restarted - pg was down for 2
seconds.

This happened two times within a few minute period.

Now I am getting 'invalid page header in block 52979 of relation
"pg_attribu te"' errors in the postgresql log file. I cannot reindex
or view the table at all even as user postgres.

I have not tried a manual restart of PG.

Although hardware could be an issue I tend to doubt it. This server
passed an extensive memory test before going into service and I see
no occurrences of this error prior to the crash but several since
then.

This is a 24x7x365 system. I do have a dump from this morning (I do
two per day) but I would prefer to fix the problem with no downtime
or data loss.

What serious problem is this likely to cause/be causing? What are my
options for fixing it?

Naturally, quick replies are appreciated - this is making me very
nervous.

Cheers,
Steve
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
5 8260
Steve Crawford <sc*******@pinp ointresearch.co m> writes:
This morning I got bitten by the "SELECT INTO" / "CREATE TABLE AS"
from tables without OIDs bug in 7.4.1.
On a production server, you really ought to track bug-fix releases a
bit more enthusiasticall y than that :-(. However, I don't see anything
in the CVS history that looks related to your problem.
Now I am getting 'invalid page header in block 52979 of relation
"pg_attribu te"' errors in the postgresql log file.


Could you get a hex dump of that page?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2
On Thursday 11 November 2004 3:14 pm, Tom Lane wrote:
Steve Crawford <sc*******@pinp ointresearch.co m> writes:
This morning I got bitten by the "SELECT INTO" / "CREATE TABLE
AS" from tables without OIDs bug in 7.4.1.


On a production server, you really ought to track bug-fix releases
a bit more enthusiasticall y than that :-(. However, I don't see
anything in the CVS history that looks related to your problem.


True. I hadn't come up with a good time to get past that 7.4.1 ->
7.4.2 initdb requirement. I guess I'll have to go with the manual
method.
Now I am getting 'invalid page header in block 52979 of relation
"pg_attribu te"' errors in the postgresql log file.


Could you get a hex dump of that page?


What is the best method to do this? Also, can I safely drop that table
and recreate it from a dump file?

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #3
Steve Crawford <sc*******@pinp ointresearch.co m> writes:
Could you get a hex dump of that page?
What is the best method to do this?
There's always "od -x" ... however, if you prefer you can use
pg_filedump from http://sources.redhat.com/rhdb/.
Also, can I safely drop that table


Not unless you want to drop the whole database.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4
On Thu, Nov 11, 2004 at 04:29:38PM -0700, Steve Crawford wrote:
True. I hadn't come up with a good time to get past that 7.4.1 ->
7.4.2 initdb requirement. I guess I'll have to go with the manual
method.
IIRC, the initdb is recommended, but not required. It can be done
without an initdb too. Check the release notes for more details. You
may as well jump to the most recent...
What is the best method to do this? Also, can I safely drop that table
and recreate it from a dump file?
Errr, pg_attribute is what holds the information about column names,
types and other such details. Most of your schema really.

It would need a full restore if you dropped it...

--
Martijn van Oosterhout <kl*****@svana. org> http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFBlNyZY5T wig3Ge+YRAgScAJ 9tvf0GeCcZZogIp dIITtON6TPqXgCe NwoX
QLgYM+MaTfKU/XP6pAGVJm4=
=Wgc5
-----END PGP SIGNATURE-----

Nov 23 '05 #5
On Friday 12 November 2004 7:54 am, Martijn van Oosterhout wrote:
On Thu, Nov 11, 2004 at 04:29:38PM -0700, Steve Crawford wrote:
True. I hadn't come up with a good time to get past that 7.4.1 ->
7.4.2 initdb requirement. I guess I'll have to go with the manual
method.


IIRC, the initdb is recommended, but not required. It can be done
without an initdb too. Check the release notes for more details.
You may as well jump to the most recent...


Already downloaded - the upgrade is on the todo list.
What is the best method to do this? Also, can I safely drop that
table and recreate it from a dump file?


Errr, pg_attribute is what holds the information about column
names, types and other such details. Most of your schema really.

It would need a full restore if you dropped it...


I successfully tested then ran a process to dump the db, drop it, then
restore it. All is fine, now. I think the bad block wasn't used by
anything important as the server continued handling all its work
without problem. The only time this error showed up in the log was
when I tried to query the table or when autovacuum tried to analyze
it.

Fortunately this database dump is only ~300MB so I only had to shut
down for 5 minutes to do the dump/drop/create/restore.

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8224
by: Sandro Daehler | last post by:
Hy i have a problem with the following statement: SELECT MAX(id) FROM apconfig; if i send this statement i got the following error: ERROR: column "id" does not exist
0
8673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4365
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.