Re: Transaction Logs Recycling Problem

From: "Colin Mangiagalli" <colin(at)camara(dot)co(dot)za>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Transaction Logs Recycling Problem
Date: 2003-02-18 13:32:04
Message-ID: 200302181332.h1IDW4T08269@mail.wineofthemonth.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote ..
> "Colin Mangiagalli" <colin(at)camara(dot)co(dot)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-02-18 13:35:12 Re: [HACKERS] Group by, count, order by and limit
Previous Message Shridhar Daithankar<shridhar_daithankar@persistent.co.in> 2003-02-18 13:00:59 Handling users