pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedBackground worker process
3+ messages / 3 participants
[nested] [flat]
* Background worker process
@ 2017-12-19 12:11 Brandl, Wolfgang <wolfgang.brandl@brz.gv.at>
2017-12-19 12:41 ` Re: Background worker process Laurenz Albe <laurenz.albe@cybertec.at>
2017-12-19 15:02 ` Re: Background worker process Fabrízio de Royes Mello <fabrizio@timbira.com.br>
0 siblings, 2 replies; 3+ messages in thread
From: Brandl, Wolfgang @ 2017-12-19 12:11 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-admin
Hello
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.
Any idea?
Regards
Wolfgang
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Background worker process
2017-12-19 12:11 Background worker process Brandl, Wolfgang <wolfgang.brandl@brz.gv.at>
@ 2017-12-19 12:41 ` Laurenz Albe <laurenz.albe@cybertec.at>
1 sibling, 0 replies; 3+ messages in thread
From: Laurenz Albe @ 2017-12-19 12:41 UTC (permalink / raw)
To: Brandl, Wolfgang <wolfgang.brandl@brz.gv.at>; pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Background worker process
2017-12-19 12:11 Background worker process Brandl, Wolfgang <wolfgang.brandl@brz.gv.at>
@ 2017-12-19 15:02 ` Fabrízio de Royes Mello <fabrizio@timbira.com.br>
1 sibling, 0 replies; 3+ messages in thread
From: Fabrízio de Royes Mello @ 2017-12-19 15:02 UTC (permalink / raw)
To: Brandl, Wolfgang <wolfgang.brandl@brz.gv.at>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-admin
Em ter, 19 de dez de 2017 às 10:11, Brandl, Wolfgang <
wolfgang.brandl@brz.gv.at> escreveu:
> Hello
>
> 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.
>
Already exists a "crontab like" background worker project [1].
Regards,
https://github.com/citusdata/pg_cron
--
Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-12-19 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 12:11 Background worker process Brandl, Wolfgang <wolfgang.brandl@brz.gv.at>
2017-12-19 12:41 ` Laurenz Albe <laurenz.albe@cybertec.at>
2017-12-19 15:02 ` Fabrízio de Royes Mello <fabrizio@timbira.com.br>
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