Re: Transaction Logs Recycling Problem - Mailing list pgsql-general

From Colin Mangiagalli
Subject Re: Transaction Logs Recycling Problem
Date
Msg-id 200302181332.h1IDW4T08269@mail.wineofthemonth.co.za
Whole thread Raw
In response to Transaction Logs Recycling Problem  ("Colin Mangiagalli" <colin@camara.co.za>)
Responses Re: Transaction Logs Recycling Problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> wrote ..
> "Colin Mangiagalli" <colin@camara.co.za> writes:
> > Sometimes I get an FATAL 2 ERROR because postgresql appears to
> > be trying to write to a log file, that returns a permission denied
> > error.
> > I am starting to think that the problem my not be with the database,
> > but with cygwin and windows 2000
>
> We've seen reports before of permission-denied errors on log file writes
> --- which makes no sense at all, because the ownerships and permissions
> of those files don't change.  At least Postgres doesn't change them.
> Perhaps the problem is that some other process is running around
> altering permissions?  Next time you see it, look to see what exactly
> *is* the ownership and permission of the file being complained of.
>
> I know this has been reported before on Cygwin.  I can't recall that it's
> been reported on any other platform.  It may be a Windows-specific
> problem.
>
>             regards, tom lane

Hi Tom

I went back to the README on how to install postgresql, just to check
I never missed anything. I did.

When it tells you to chmod postgres /usr/share/postgresql/data
there is a note [10] which says this assumes you have set CYGWIN
env. variable to include ntsec.

This explains now (8 months later) why chmod never did anything
and the data folder, sub-folders and files still belong to Administrator.
Anyway...

After setting CYGWIN=ntsec tty and reinstalling cgywin and postgresql,
the data folder can only be accessed by the postgres user and all files
and folders in it belong to postgres.

I had to make the data folder accessible to other users though, because
my software needs to be able to check for and delete the postmaster.pid
file if necessary. All other sub folders are still only accessible to
postgres

Could these permission denied errors have been cause by the fact that
ntsec was off and the permissions weren't set correctly on the
data folder.

The only thing is, why does it work most of the time and only sometimes
I get this error. The problem doesn't seem to happen if I take the machine
off the domain.

Could another machine (eg. domain controller) be accessing that machine
periodically and for some reason accessing those files. I can't see why
though.

Thanks
Colin

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: [HACKERS] Group by, count, order by and limit
Next
From: Bruno Wolff III
Date:
Subject: Re: Aggregate definition : small oversight ?