User access to start and stop postmaster

Started by Andy Mardenabout 24 years ago2 messagesgeneral
Jump to latest
#1Andy Marden
amarden@usa.net

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

#2Doug McNaught
doug@wireboard.com
In reply to: Andy Marden (#1)
Re: User access to start and stop postmaster

"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