From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Jean Baro <jfbaro(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Low priority batch insert |
Date: | 2017-10-19 22:54:16 |
Message-ID: | CAB7nPqTJD79=tnTQb+MW2Y3ERKCR9WiShTNLgkrs18bJeTxs9A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Fri, Oct 20, 2017 at 1:10 AM, Jean Baro <jfbaro(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Purav Chovatia | 2017-10-23 19:19:20 | postgresql tuning with perf |
Previous Message | Jean Baro | 2017-10-19 16:10:12 | Low priority batch insert |