How to avoid intstantiating multiple JVM instances across different sessions to use FDW?

From: ganggewang(王刚) <ganggewang(at)tencent(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: How to avoid intstantiating multiple JVM instances across different sessions to use FDW?
Date: 2022-11-04 06:46:47
Message-ID: 662D5859-41D5-4AAA-A965-F936AB5D193F@tencent.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there,

I am recently implementing a new FDW, which would internally instantiate a JVM instance to invoke JNI calls, and the JVM instance would be created in a session when a new query that hit the foreign table comes.
I notice for each session, PG would fork a new process. While the JVM instance is available only in the same process. Do you have any suggestion to reuse the same JVM instance across different sessions to reduce memory usage?

Thanks in advance.

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2022-11-04 07:18:59 Re: Unable to use pg_verify_checksums
Previous Message shashidhar Reddy 2022-11-04 06:11:46 Unable to use pg_verify_checksums