Обсуждение: running two instances of pg

Поиск
Список
Период
Сортировка

running two instances of pg

От
Joao Ferreira gmail
Дата:
Hello all,

we are using PostgreSQL in a situation where I think we could try and
run two separate instances:

- 1 application can grow up to 10 Giga data; needs 'frequent' vaccuming
and re-indexing (lots of insert, updates and deletes, per minute): we
use it for 'near-real-time' applications logs storage; not big problem
if it runs in lower priority;
- 1 very small application with high responsivness requirements (few
updates, very small size on disk); must run in high priority in order to
prevent service failure to the end users;

So we are considereing separating these two, in order to use 2 diferent
pg instances. One of the instances will be reniced down in order to
prevent user access failure during vacuuming and re-indexing operations
(currently, when we perform database maintenance (we are now at 2Giga
and growing), several other user related services become inoperative,
during the maintenance operation, but if we renice the postmaster, the
users dont experience such a severe service outage)

So... my question is: is it a good approach to separate the 2 "worlds"
into 2 diferent databases and 2 diferent postmasters ?

is it good idea to "renice postmaster" ?

what other measures could we take to prevent the postmaster service of
the big database from consuming so much CPU during maintenance
operations ?

thanks a lot on your feedback

Joao



Re: running two instances of pg

От
Tom Lane
Дата:
Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com> writes:
> So we are considereing separating these two, in order to use 2 diferent
> pg instances. One of the instances will be reniced down in order to
> prevent user access failure during vacuuming and re-indexing operations
> (currently, when we perform database maintenance (we are now at 2Giga
> and growing), several other user related services become inoperative,
> during the maintenance operation, but if we renice the postmaster, the
> users dont experience such a severe service outage)

Have you experimented with the vacuum cost delay settings, instead?
"renice" is not a very good tool for controlling I/O demands.

            regards, tom lane