Re: [PERFORM] Low priority batch insert

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PERFORM] Low priority batch insert
Дата
Msg-id CAB7nPqTJD79=tnTQb+MW2Y3ERKCR9WiShTNLgkrs18bJeTxs9A@mail.gmail.com
обсуждение исходный текст
Ответ на [PERFORM] Low priority batch insert  (Jean Baro <jfbaro@gmail.com>)
Список pgsql-performance
On Fri, Oct 20, 2017 at 1:10 AM, Jean Baro <jfbaro@gmail.com> wrote:
> That's my first question in this mailing list! :)

Welcome!

> Is it possible (node.js connecting to PG 9.6 on RDS) to set a lower priority
> to a connection so that that particular process (BATCH INSERT) would have a
> low impact on other running processes on PG, like live queries and single
> inserts/updates?
>
> Is that a good idea? Is this feasible with Node.js + PG?

The server could be changed so as backend processes use setpriority
and getpriority using a GUC parameter, and you could leverage priority
of processes using that. The good news is that this can be done as a
module, see an example from Fujii Masao's pg_cheat_funcs that caught
my attention actually yesterday:
https://github.com/MasaoFujii/pg_cheat_funcs/commit/a39ec1549e2af72bf101da5075c4e12d079f7c5b
The bad news is that you are on RDS, so vendor locking is preventing
you from loading any custom modules.
-- 
Michael


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

В списке pgsql-performance по дате отправления:

Предыдущее
От: Jean Baro
Дата:
Сообщение: [PERFORM] Low priority batch insert
Следующее
От: Purav Chovatia
Дата:
Сообщение: [PERFORM] postgresql tuning with perf