How to setup only one connection for the whole event loop?

From: Dominic Gua�a <organicchemistry_01(at)yahoo(dot)com(dot)ph>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: How to setup only one connection for the whole event loop?
Date: 2019-02-14 16:06:04
Message-ID: 1639716788.536278.1550160364895@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lu, Dan 2019-02-14 17:01:16 Version 11.2 for SLES 12?
Previous Message github kran 2019-02-14 15:47:47 Re: Postgresql RDS DB Latency Chossing Hash join Plan