Re: BUG #5603: pg_tblspc and pg_twoface directories get deleted when starting up service - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #5603: pg_tblspc and pg_twoface directories get deleted when starting up service
Date
Msg-id AANLkTinSJ3pShVJBAYAKgpjdPWTHd0omBeJ7mwGRxzQi@mail.gmail.com
Whole thread Raw
In response to BUG #5603: pg_tblspc and pg_twoface directories get deleted when starting up service  ("Nacho Mezzadra" <nachomezzadra@gmail.com>)
Responses Re: BUG #5603: pg_tblspc and pg_twoface directories get deleted when starting up service  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thu, Aug 5, 2010 at 2:46 PM, Nacho Mezzadra <nachomezzadra@gmail.com> wr=
ote:
>
> The following bug has been logged online:
>
> Bug reference: =A0 =A0 =A05603
> Logged by: =A0 =A0 =A0 =A0 =A0Nacho Mezzadra
> Email address: =A0 =A0 =A0nachomezzadra@gmail.com
> PostgreSQL version: 8.3.11
> Operating system: =A0 Red Hat Enterprise 5.3
> Description: =A0 =A0 =A0 =A0pg_tblspc and pg_twoface directories get dele=
ted when
> starting up service
> Details:
>
> This issue happened not very frequently, but it happened to me 3 times, i=
n 3
> different Red Hat servers.
> The thing is that when stopping the Postgresql service with the
> "/sbin/service postgresql-8.3 stop" command, and after that starting it w=
ith
> the "/sbin/service postgresql-8.3 start" command (haven't tried with the
> restart one though), a few times both pg_tblspc and pg_twoface =A0directo=
ries
> (inside data directory) get somehow deleted and hence the start service
> command fails. =A0Looking in the log files I find the following error:
>
> 2010-07-19 16:54:55 ISTFATAL: =A0could not open directory "pg_tblspc": No=
 such
> file or directory
>
> So I manually create the "pg_tblspc" directory, and then try to start aga=
in
> the service unsuccessfully, getting this time a similar error, but saying
> that pg_twoface directory doesn't exist.
>
> After creating the pg_twoface directory, service can be successfully
> started.
>
> Please note that all these always happened running the service command as
> root.
> All 3 linux boxes are running over a VMWare host.

This is pretty scary, but it's a little hard to believe that Red Hat
would ship a script which had even the faintest chance of obliterating
two critical directories.  Especially since the guy who does the
packaging of PostgreSQL over thereabouts is our most knowledgeable,
experienced, and prolific committer.  So I suspect you've a (broken)
custom script, or a cron job that's doing something evil, or some
other weirdness that is specific to your installations, but you
haven't provided enough details to speculate in detail (for example,
perhaps you could reply to the list and post a copy of the script you
think is doing this).

Also, I'm pretty sure that we don't have a directory called
pg_twoface, though it would pretty funny if we did.  It's fairly
obvious what this is meant to say, but it doesn't.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5609: Exclusive Locks & Permission
Next
From: Tom Lane
Date:
Subject: Re: BUG #5608: array_agg() consumes too much memory