Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guebT-00031b-Vt for pgsql-general@arkaria.postgresql.org; Fri, 15 Feb 2019 14:36:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gueaS-0007fL-VH for pgsql-general@arkaria.postgresql.org; Fri, 15 Feb 2019 14:35:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guJWn-0007fS-3E for pgsql-general@lists.postgresql.org; Thu, 14 Feb 2019 16:06:21 +0000 Received: from sonic314-19.consmr.mail.sg3.yahoo.com ([106.10.240.143]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guJWj-00078H-43 for pgsql-general@lists.postgresql.org; Thu, 14 Feb 2019 16:06:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.ph; s=s2048; t=1550160365; bh=kHR9EfghIoJA8cfYJgfDRCnHhragolO2IMrbroSzm3U=; h=Date:From:To:Subject:References:From:Subject; b=HNctyWvwKR2xMn2MuizNDvEJsIkCJTaFgGT7vcvRKVX6Bj8gq9tZmkyVBqQDGJE1bUHTtJ6tVTChqMrX34Ic0H3TsjftR02Rj/JkSV+nE+1n3ZH9g3eC3TRUsO3aYRUrvSms1XNsahvj9tUa00X8d5o2+zxPpeaQg6JAYcAikwndbO8b5YC27FqjZcb5ffkuMs5TmtJkkiSdDwYBgNFTYXxfSJ2pGKVAKAzbDxCaVm4KO+5qTmTzH2qENkOPMdWdhuY0jYGz+jOdJSbA1OjD8PHtx/zf5D5YIu3c8kYf+AbeqKSI5GWF5Snl14RVB1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hwAno7cvx9ofO_ WB7HPa.iOiM7pg9CgvxT.jptT Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.sg3.yahoo.com with HTTP; Thu, 14 Feb 2019 16:06:05 +0000 Date: Thu, 14 Feb 2019 16:06:04 +0000 (UTC) From: =?UTF-8?Q?Dominic_Gua=EF=BF=BDa?= To: "pgsql-general@lists.postgresql.org" Message-ID: <1639716788.536278.1550160364895@mail.yahoo.com> Subject: How to setup only one connection for the whole event loop? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_536277_76139338.1550160364894" References: <1639716788.536278.1550160364895.ref@mail.yahoo.com> X-Mailer: WebService/1.1.13041 YMailNorrin Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Content-Length: 1375 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_536277_76139338.1550160364894 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 ------=_Part_536277_76139338.1550160364894 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
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
------=_Part_536277_76139338.1550160364894--