From: | Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com>, AMatveev(at)bitec(dot)ru |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: One process per session lack of sharing |
Date: | 2016-07-14 06:28:33 |
Message-ID: | CAB=Je-EV0-XgvyPnYVKW5n3npmYuu5QDStPPFeDzAT2Xz56m9A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Craig>That moves work further away from the DB, which has its own costs,
and isn't something you're likely to be happy with if you're looking at
things like optimising PL/PgSQL with a bytecode compiler. But it's the best
we have right now.
What if JVM was started within a background worker?
Then JVM can spawn several threads that serve PL requests on a "thread per
backend" basis.
Craig>You may be able to greatly reduce that cost if you can store your
cached compiled data in a shared memory segment created by your extension.
Craig>This will get a bit easier with the new dynamic shared memory
infrastructure, but it's going to be no fun at all to make that play with
the JVM. You'll probably need a lot of JNI.
There's https://github.com/jnr/jnr-ffi that enables to call C functions
without resorting to writing JNI wrappers.
Vladimir
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2016-07-14 06:29:36 | Re: A Modest Upgrade Proposal |
Previous Message | Craig Ringer | 2016-07-14 06:06:31 | Re: A Modest Upgrade Proposal |