Thread: ERROR: invalid page header in block
Hello,
I have the following error and I'm a bit worried:
SELECT COUNT(*) AS total FROM (SELECT "oid", * FROM "public"."lock") AS sub
-> ERROR: invalid page header in block 0 of relation "lock"
delete from lock where bildschirmnr=16
-> ERROR: invalid page header in block 0 of relation "lock"
Any ideas whats going on?
Thanks for any help
Michaela
I've tried to do this same thing i "psql" client. It was worked properly. I'm not sure, but maybe Your table on disk is corrupted. Does it work simply: select oid from public.lock and select * from public.lock and SELECT "oid", * FROM "public"."lock" ? Your query will be faster makinkg it that way: SELECT COUNT(*) AS total FROM "public"."lock" "lock" is not very fine name for table (for ex. You can do inside transaction: LOCK table public.lock IN SHARE MODE). Greetings Adam MG wrote: > Hello, > > I have the following error and I'm a bit worried: > > SELECT COUNT(*) AS total FROM (SELECT "oid", * FROM "public"."lock") > AS sub > >-> ERROR: invalid page header in block 0 of relation "lock" > >delete from lock where bildschirmnr=16 > >-> ERROR: invalid page header in block 0 of relation "lock" > >Any ideas whats going on? > >Thanks for any help > >Michaela >