V
V
Vladimir2020-01-28 17:49:01
PostgreSQL
Vladimir, 2020-01-28 17:49:01

What tools does postgres have to share resources between users?

Good afternoon, there are common installations (one installation and many different databases with projects) postgres with HA (master-slave-slave repmgr)
I would like to know if it is possible to create limits on the use of cluster resources for individual databases / users.
Now for control:
1) by disk: each database has a separate lvm with its own tablespace, so as not to clog the entire instance with one database in case of problems
2) by connections: pgbouncer with transactional pooling. Thus, I limit the user: base memory per base (one user cannot eat more than work_mem per backend) and the number of connections for the entire instance.
The question actually is whether this is a working scheme or are there more sensible solutions for delimiting resources for one installation into many different databases? and most importantly, is it possible with such a scheme to guarantee the bases on the cluster some resources (except for the disk)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2020-01-28
@idskill

None.

whether the main thing is possible at such scheme to guarantee to bases on a cluster any resources (except for a disk)?

You can't even guarantee io that way. Because WAL is written strictly alone.
one user cannot send more than work_mem to the backend

Maybe. Easy. You are reading the documentation incorrectly, it is mentioned there separately.
And maybe #2 - set work_mem to '..'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question