public inbox for [email protected]
help / color / mirror / Atom feedLow priority batch insert
2+ messages / 2 participants
[nested] [flat]
* Low priority batch insert
@ 2017-10-19 16:10 Jean Baro <[email protected]>
2017-10-19 22:54 ` Re: Low priority batch insert Michael Paquier <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Jean Baro @ 2017-10-19 16:10 UTC (permalink / raw)
To: pgsql-performance
Hi there,
That's my first question in this mailing list! :)
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?
I would like the batch insert to complete as soon as possible, but at the
same time keep individual queries and inserts running on maximum speed.
*SINGLE SELECTS (HIGH PRIORITY)*
*SINGLE INSERTS/UPDATES (HIGH PRIORITY)*
BATCH INSERT (LOW PRIORITY)
BATCH SELECT (LOW PRIORITY)
Is that a good idea? Is this feasible with Node.js + PG?
Thanks
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Low priority batch insert
2017-10-19 16:10 Low priority batch insert Jean Baro <[email protected]>
@ 2017-10-19 22:54 ` Michael Paquier <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Paquier @ 2017-10-19 22:54 UTC (permalink / raw)
To: Jean Baro <[email protected]>; +Cc: pgsql-performance
On Fri, Oct 20, 2017 at 1:10 AM, Jean Baro <[email protected]> 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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-10-19 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 16:10 Low priority batch insert Jean Baro <[email protected]>
2017-10-19 22:54 ` Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox