From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Brandl, Wolfgang <wolfgang.brandl@brz.gv.at>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Background worker process
Date: Tue, 19 Dec 2017 13:41:18 +0100
Message-ID: <1513687278.2428.7.camel@cybertec.at> (raw)
In-Reply-To: <F2EB158D72DC6A4F97877DD0BB6F020E6138D650@CMD0MBX-AB01.cmd0.cna.at>
References: <F2EB158D72DC6A4F97877DD0BB6F020E6138D650@CMD0MBX-AB01.cmd0.cna.at>
Wolfgang Brandl wrote:
> We want to start processes controlled by a prostgres table which acts like crontab.
> So we want to start a background worker process which starts the defined functions.
>
> Is it possible to start from a background worker process a child process with a specific User.
> So this process can only acces the data for his authority.
> Like a SQL Intrusion with this definition nobody can start a process a Postgres superuser.
You normally do things like that on UNIX-like operating systems by
setting the "setuid" bit on the executable that you want to start
and transferring ownership to the desired user.
There is no other way for a non-root user like "postgres" to start
an executable as a different user.
Your setup seems complicated.
Why don't you have a daemon process running as root outside of PostgreSQL
that regularly checks the table and starts scheduled processes?
Yours,
Laurenz Albe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, wolfgang.brandl@brz.gv.at
Subject: Re: Background worker process
In-Reply-To: <1513687278.2428.7.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox