could not open relation No such file or directory after alter table

Started by Chrisabout 21 years ago2 messagesgeneral
Jump to latest
#1Chris
pglist@gmail.com

This is Postgresql 8 RC 1 on freebsd 5.3.

I changed the type of a column from varchar(128) to varchar(256), and
right after that I got the following messages when doing inserts on
the table in question.

<41e0e2c3.fd54>ERROR: SMgrRelation hashtable corrupted
<41e0e2c3.fd54>STATEMENT: commit
<41e0e2c3.fd54>ERROR: SMgrRelation hashtable corrupted
<41e0e2c3.fd54>STATEMENT: begin
<41e0e2c3.fd54>WARNING: StartTransaction while in START state
<41e0e2c3.fd54>WARNING: there is no transaction in progress

These went on for a few queries, then stopped and I then started getting this:

<>ERROR: could not open relation 1663/17231/126958: No such file or directory
<>CONTEXT: writing block 2919 of relation 1663/17231/126958
<>ERROR: could not open relation 1663/17231/126958: No such file or directory
<>CONTEXT: writing block 2919 of relation 1663/17231/126958
<>WARNING: could not write block 2919 of 1663/17231/126958
<>DETAIL: Multiple failures --- write error may be permanent.

I then ran vacuum and got this message, and after that the errors stopped:

WARNING: relation "cart_groups" page 1 is uninitialized --- fixing

Somewhere along the line postgres dumped core once and this is the backtrace:

#0 0x2850005f in kill () from /lib/libc.so.5
#1 0x284f3c96 in raise () from /lib/libc.so.5
#2 0x28573c62 in abort () from /lib/libc.so.5
#3 0x082158cb in errfinish ()
#4 0x0819d228 in mdextend ()
#5 0x0819db22 in RememberFsyncRequest ()
#6 0x0819d3d0 in mdwrite ()
#7 0x0819e53b in smgrwrite ()
#8 0x0818e024 in BufferGetFileNode ()
#9 0x0818db28 in BufferSync ()
#10 0x0818deba in FlushBufferPool ()
#11 0x080a16ef in CreateCheckPoint ()
#12 0x080a139f in ShutdownXLOG ()
#13 0x08177bd6 in BackgroundWriterMain ()
#14 0x080a736e in BootstrapMain ()
#15 0x081776bd in ClosePostmasterPorts ()
#16 0x08175ff3 in ClosePostmasterPorts ()
#17 0xbfbfff94 in ?? ()
#18 0x00000014 in ?? ()
#19 0x00000000 in ?? ()
#20 0xbfbfe7e0 in ?? ()
#21 0x00000002 in ?? ()
#22 0x08175ed0 in ClosePostmasterPorts ()
#23 0x081743b7 in PostmasterMain ()
#24 0x0813f309 in main ()

Chris

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Chris (#1)
Re: could not open relation No such file or directory after alter table

Chris <pglist@gmail.com> writes:

This is Postgresql 8 RC 1 on freebsd 5.3.
I changed the type of a column from varchar(128) to varchar(256), and
right after that I got the following messages when doing inserts on
the table in question.

<41e0e2c3.fd54>ERROR: SMgrRelation hashtable corrupted
<41e0e2c3.fd54>STATEMENT: commit

Hmm. We got another report of that back in September, but AFAICS from
the archives it was never resolved because we couldn't reproduce it.
Can you come up with a reproducible test case?

regards, tom lane