dbTalk Databases Forums  

Re: [BUGS] BUG #6735: PANIC: 42501: could not open control file "global/pg_control": Permission denied

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #6735: PANIC: 42501: could not open control file "global/pg_control": Permission denied in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #6735: PANIC: 42501: could not open control file "global/pg_control": Permission denied - 07-14-2012 , 12:20 AM






Craig Ringer <ringerc (AT) ringerc (DOT) id.au> writes:
Quote:
PostgreSQL 9.1 isn't compatible with databases from 8.3, so you can't
actually run Pg 9.1 directly against a datadir from 8.3; that's why I
suggested the latest 8.3 point release.

However, your startup should be failing with a message telling you this,
not with a permissions error then (more importantly) a crash.
Well, the reason that's a PANIC is that ReadControlFile is coded that
way:

fd = BasicOpenFile(XLOG_CONTROL_FILE,
O_RDWR | PG_BINARY,
S_IRUSR | S_IWUSR);
if (fd < 0)
ereport(PANIC,
(errcode_for_file_access(),
errmsg("could not open control file \"%s\": %m",
XLOG_CONTROL_FILE)));

Perhaps it should be only FATAL instead, but that seems like a quibble.
If it can't read pg_control, the server ain't starting.

It is curious though that the OP gets this far, because the server
would previously have tried to read PG_VERSION and postgresql.conf,
which if it were a simple wrong-account problem should likewise
have been unreadable. Your thought about AV software may be the
right explanation.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #6735: PANIC: 42501: could not open control file "global/pg_control": Permission denied - 07-14-2012 , 12:20 AM






Craig Ringer <ringerc (AT) ringerc (DOT) id.au> writes:
Quote:
PostgreSQL 9.1 isn't compatible with databases from 8.3, so you can't
actually run Pg 9.1 directly against a datadir from 8.3; that's why I
suggested the latest 8.3 point release.

However, your startup should be failing with a message telling you this,
not with a permissions error then (more importantly) a crash.
Well, the reason that's a PANIC is that ReadControlFile is coded that
way:

fd = BasicOpenFile(XLOG_CONTROL_FILE,
O_RDWR | PG_BINARY,
S_IRUSR | S_IWUSR);
if (fd < 0)
ereport(PANIC,
(errcode_for_file_access(),
errmsg("could not open control file \"%s\": %m",
XLOG_CONTROL_FILE)));

Perhaps it should be only FATAL instead, but that seems like a quibble.
If it can't read pg_control, the server ain't starting.

It is curious though that the OP gets this far, because the server
would previously have tried to read PG_VERSION and postgresql.conf,
which if it were a simple wrong-account problem should likewise
have been unreadable. Your thought about AV software may be the
right explanation.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.