sql - Error missing chunk number 0 in postgresql, I already figured out which field was corrupted -


i'm using postgresql 9.1.13 on x86_64-unknown-linux-gnu, compiled gcc (ubuntu 4.8.2-16ubuntu6) 4.8.2, 64-bit

i have faced error many days, , thought found solution creating script check field in database table, update corrupted column in field null.

it works fine while until found this.

i found corrupted field script updated corrupted column null, got this.

# select * comment id = 7228707; >> error:  missing chunk number 0 toast value 149171568 in pg_toast_8070962 

but, in same time can select table columns , got no error.

# select id,comment,and,all,column,in,my,table comment id = 7228707; 

to make sure select table column this

# select string_agg(column_name, ', ') information_schema.columns table_name ='comment' , table_schema='a1'; 

i select column name plus system column, still appear no error @ all. got error when select * table corrupted field.

so, idea why being this?

are there hidden column postgresql more ctid,cmax,xmax,cmin,xmin,tableoid,oid ?

*is there differences between using select * , select all,columns,name,in,the,table (all column name in table)?*

from docs:

postgresql uses fixed page size (commonly 8 kb), , not allow tuples span multiple pages. therefore, not possible store large field values directly. overcome limitation, large field values compressed and/or broken multiple physical rows. happens transparently user, small impact on of backend code. technique affectionately known toast (or "the best thing since sliced bread").

this means have large field stored outside record page, , of field's data corrupted.

the field subset you're selecting in second query not contain corrupted field.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -