Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Aug 5, 2010 at 2:46 PM, Nacho Mezzadra <nachomezzadra@gmail.com> wrote:
>> PostgreSQL version: 8.3.11
>> Operating system: Red Hat Enterprise 5.3
>> Description: pg_tblspc and pg_twoface directories get deleted when
>> starting up service
> 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).
Well, I have to disclaim credit/blame for this, because Red Hat has
never shipped PG 8.3.anything for RHEL-5. Possibly the OP is running
Devrim's or Command Prompt's RPMs. That said, the initscript Devrim
uses looks just about like mine, and there's no chance whatever that it
would selectively delete portions of what's under $PGDATA. I have to
think that there's a loose cannon somewhere else in the OP's system.
We have for example seen some very unfortunate behavior in the past
when the data directory was located on a slow-to-mount NFS server.
(I have no reason to think that that's exactly what this problem is;
I just cite it to illustrate the kind of thing to be looking for.)
regards, tom lane