Re: Bug in point releases 9.3.6 and 9.2.10? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Bug in point releases 9.3.6 and 9.2.10?
Date
Msg-id CAM-w4HMHoB0bSBVfcn6TXQmURfcWE2_+aJB6_Gwkajt-Rfp_=Q@mail.gmail.com
Whole thread Raw
In response to Re: Bug in point releases 9.3.6 and 9.2.10?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Well, when a database is first initdb'd that relation is in fact 0 bytes:

::***# select pg_relation_filenode(oid) from pg_class where relname = 'pg_auth_members';
┌──────────────────────┐
│ pg_relation_filenode │
├──────────────────────┤
│                12610 │
└──────────────────────┘
(1 row)

$ find . -name 12610 -ls
131772    0 -rw-------   1 stark    stark           0 Mar  3 18:52 ./global/12610

So it's not surprising to find a 0-byte file there sometime. The question is how the ALTER ROLE commands failed to extend it or why they're expecting it to be non-zero when it is.

Is it possible the permissions on the file are wrong for some reason? The symptoms would make sense if the directory had permissions that allowed unlinking (for vacuum full) but the file didn't have "r" access for the postgres user or SE rules blocked it from being read or something like that.



--
greg

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Next
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0