Re: Re: Server tries to read a different config file than it is supposed to

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: twoflower <standa(dot)kurik(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: Server tries to read a different config file than it is supposed to
Date: 2015-05-24 20:59:38
Message-ID: 1223.1432501178@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

twoflower <standa(dot)kurik(at)gmail(dot)com> writes:
> I was doing this after I upgraded to 9.4.2, yes. As for the shut down: I
> suspect the server was rebooted without explicitly stopping Postgres. Not
> sure how this plays out in terms of cleanliness. This is everything relevant
> in the log file after I ran the start script:
> 2015-05-23 10:36:39.999 GMT [2102][0]: [1] LOG: database system was
> interrupted; last known up at 2015-05-23 08:59:41 GMT
> 2015-05-23 10:36:40.053 GMT [2102][0]: [2] FATAL: could not open file
> "/storage/postgresql/9.4/data/postgresql.conf": Permission denied
> 2015-05-23 10:36:40.054 GMT [2100][0]: [3] LOG: startup process (PID 2102)
> exited with exit code 1
> 2015-05-23 10:36:40.054 GMT [2100][0]: [4] LOG: aborting startup due to
> startup process failure

Yeah, so this is long after the real config file has been read.

I think that that unwritable postgresql.conf file had probably been
hanging around in your data directory for some time. It was not causing
any particular problem until we decided we ought to fsync everything in
the data directory after a crash. So this is indeed the same case
Christoph was complaining about. But really you should remove that file
not just change its permissions; as is it's just causing confusion.

> I also tried the same situation on two other Ubuntu servers with the same
> version of Postgres (also upgraded to 9.4.2) and the same directory layout -
> made *postgresql.conf* in the data directory unaccessible, even renamed it,
> and everything worked fine. The only difference is that these are
> streaming-replicated standby servers. They also had been restarted without
> explicitly terminating Postgres.

Hm. I wonder why we aren't fsync'ing on crash restart on standby servers
as well.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2015-05-24 21:05:19 Re: How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"
Previous Message Francisco Olarte 2015-05-24 19:08:18 Re: How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"