Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id A39FEE1A92B for ; Sat, 14 Jul 2012 02:21:08 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Spumx-0000Sb-7H for pgsql-bugs@postgresql.org; Sat, 14 Jul 2012 05:21:08 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q6E5Krx3004814; Sat, 14 Jul 2012 01:20:53 -0400 (EDT) From: Tom Lane To: Craig Ringer cc: Petros Tsialiamanis , pgsql-bugs@postgresql.org Subject: Re: BUG #6735: PANIC: 42501: could not open control file "global/pg_control": Permission denied In-reply-to: <5000FC12.90300@ringerc.id.au> References: <50003BAB.8050505@ringerc.id.au> <5000FC12.90300@ringerc.id.au> Comments: In-reply-to Craig Ringer message dated "Sat, 14 Jul 2012 12:56:50 +0800" Date: Sat, 14 Jul 2012 01:20:53 -0400 Message-ID: <4813.1342243253@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/111 X-Sequence-Number: 33587 Craig Ringer writes: > 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