Re: How to setup only one connection for the whole event loop? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to setup only one connection for the whole event loop?
Date
Msg-id 6aaf55f2-145e-a395-b372-41cae0037f06@aklaver.com
Whole thread Raw
In response to How to setup only one connection for the whole event loop?  (Dominic Gua�a <organicchemistry_01@yahoo.com.ph>)
List pgsql-general
On 2/14/19 8:06 AM, Dominic Gua�a wrote:
> Dear all,
> 
> I am new to postgresql and I am creating a c program that can receive 
> request from different users. I want to maximize the performance of 
> postgresql so I intend to just create 1 connection that would service 
> all queries of different users. How do I do this?

Use one of the existing Postgres poolers?:

http://www.pgpool.net/mediawiki/index.php/Main_Page

http://pgbouncer.github.io/

> 
> Do I create a new connection each time there is a new request like how 
> it goes in MySQL or can I just have one connection that is established 
> in my `main` function?
> 
> Sincerely


-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Problems pushing down WHERE-clause to underlying view
Next
From: "Rameshbabu Paulsamy (UST, IND)"
Date:
Subject: RE: PostgreSql Version Compatibility With Apache ActiveMQ