pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dominic Gua�a <organicchemistry_01@yahoo.com.ph>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: How to setup only one connection for the whole event loop?
Date: Thu, 14 Feb 2019 16:06:04 +0000 (UTC)
Message-ID: <1639716788.536278.1550160364895@mail.yahoo.com> (raw)
References: <1639716788.536278.1550160364895.ref@mail.yahoo.com>

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

view thread (3+ messages)  latest in thread

Message-ID: <1639716788.536278.1550160364895@mail.yahoo.com>
Permalink:  ../1639716788.536278.1550160364895@mail.yahoo.com/
Also on:    postgresql.org/message-id/1639716788.536278.1550160364895@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: organicchemistry_01@yahoo.com.ph
  Subject: Re: How to setup only one connection for the whole event loop?
  In-Reply-To: <1639716788.536278.1550160364895@mail.yahoo.com>
  References: <1639716788.536278.1550160364895.ref@mail.yahoo.com> <1639716788.536278.1550160364895@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox