pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Craig Ringer <ringerc@ringerc.id.au>
Cc: Petros Tsialiamanis <tsialiam@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6735: PANIC: 42501: could not open control file "global/pg_control": Permission denied
Date: Sat, 14 Jul 2012 01:20:53 -0400
Message-ID: <4813.1342243253@sss.pgh.pa.us> (raw)
In-Reply-To: <5000FC12.90300@ringerc.id.au>
References: <E1SpfTr-0004sc-RC@wrigleys.postgresql.org>
	<50003BAB.8050505@ringerc.id.au>
	<CAHauTQqPOhyRJwRF8hmvT8jtM=GfHeWtMXeucmfQ-3uvReR3BA@mail.gmail.com>
	<5000FC12.90300@ringerc.id.au>

Craig Ringer <ringerc@ringerc.id.au> 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



view thread (7+ messages)  latest in thread

Message-ID: <4813.1342243253@sss.pgh.pa.us>
Permalink:  ../4813.1342243253@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4813.1342243253@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ringerc@ringerc.id.au, tsialiam@gmail.com
  Subject: Re: BUG #6735: PANIC: 42501: could not open control file "global/pg_control": Permission denied
  In-Reply-To: <4813.1342243253@sss.pgh.pa.us>
  References: <E1SpfTr-0004sc-RC@wrigleys.postgresql.org> <50003BAB.8050505@ringerc.id.au> <CAHauTQqPOhyRJwRF8hmvT8jtM=GfHeWtMXeucmfQ-3uvReR3BA@mail.gmail.com> <5000FC12.90300@ringerc.id.au> <4813.1342243253@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox