Thread: User access to start and stop postmaster

User access to start and stop postmaster

From
"Andy Marden"
Date:
I'm running a batch load on PostgreSQL 7.1.3 on Linux as a given OS user. As
part of this, I want to restart postmaster with -i access removed and at the
end, restart with -i added on (denying network access during the load
process). Trouble is, it seems that I have to be the postgres user to do
this - I'd hoped that being part of the postgres group would be enough. Has
anyone thoughts on how to achieve this (short of running everything as the
postgres user.

Load scripts are Perl, by the way.

cheers

Andy




Re: User access to start and stop postmaster

From
Doug McNaught
Date:
"Andy Marden" <amarden@usa.net> writes:

> I'm running a batch load on PostgreSQL 7.1.3 on Linux as a given OS user. As
> part of this, I want to restart postmaster with -i access removed and at the
> end, restart with -i added on (denying network access during the load
> process). Trouble is, it seems that I have to be the postgres user to do
> this - I'd hoped that being part of the postgres group would be enough. Has
> anyone thoughts on how to achieve this (short of running everything as the
> postgres user.
>
> Load scripts are Perl, by the way.

Hmmm, instead of shutting off network access, maybe you could just get
an exclusive lock on all your tables in the load script?  You'd have
to do all the loading in one transaction but that's the fastest way to
do it anyhow.

Thought I'd suggest it...

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863