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 1icrGQ-0008T1-Rd for pgsql-admin@arkaria.postgresql.org; Thu, 05 Dec 2019 13:33:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icrGP-0004Cf-Hl for pgsql-admin@arkaria.postgresql.org; Thu, 05 Dec 2019 13:33:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icrGP-0004CX-4z for pgsql-admin@lists.postgresql.org; Thu, 05 Dec 2019 13:33:49 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1icrGL-0003hW-Jm for pgsql-admin@postgresql.org; Thu, 05 Dec 2019 13:33:47 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id D0200A13F1; Thu, 5 Dec 2019 13:33:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo05-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo05-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lgUSam3UnU30; Thu, 5 Dec 2019 13:33:42 +0000 (UTC) Received: from [192.168.2.16] (unknown [8.39.228.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 89BCEA13E8; Thu, 5 Dec 2019 13:33:38 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: Postgres and Java Microservices Multithreading From: Scott Ribe In-Reply-To: <2A91BEF8171A5349931391E0C721CC53757054D3@CPEMS-KPN501.KPNCNL.LOCAL> Date: Thu, 5 Dec 2019 06:33:37 -0700 Cc: peter@osdev.nl, pgsql-admin@lists.postgresql.org, pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <2CB4B3C9-F43F-49D8-A594-93DBE99EF514@elevated-dev.com> References: <2A91BEF8171A5349931391E0C721CC5375705457@CPEMS-KPN501.KPNCNL.LOCAL> <251962385fdc49da0da54e22588aabd6fbc2e0fa.camel@osdev.nl> <2A91BEF8171A5349931391E0C721CC53757054D3@CPEMS-KPN501.KPNCNL.LOCAL> To: "" X-Mailer: Apple Mail (2.3601.0.10) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "parallel query" refers to parallelism within a single query, not at all = related to the questions you're asking connection pooler is something you might want to investigate, but that = really depends on total number of connections across your microservices, = and how connection pooling within your clients might be handled. If your = clients make persistent connections, and they're not making all that = many (maybe not more than 10-20 each across the 15), you wouldn't need = it. If client connections come and go, or your clients use higher number = of connections, then yes, put pgbouncer between clients & PG. -- Scott Ribe scott_ribe@elevated-dev.com https://www.linkedin.com/in/scottribe/ > On Dec 5, 2019, at 6:22 AM, = wrote: >=20 > Thanks Peter for your response, appreciate much. > =20 > But I think the applications wont behave the same way as with = Oracle.(We have 15+ Microservices running in Oracle with parallel = processing) > =20 > Below I just checked and testing in Test Env. > =20 > https://www.postgresql.org/docs/12/parallel-query.html > = https://dzone.com/articles/postgresql-connection-pooling-part-1-pros-amp-c= ons > =20 > =20 > If anyone have some use cases/real time project executions will be = really helpful. > =20 > Thanks.. > =20 > =20 > =20 > From: Peter M. Groen =20 > Sent: donderdag 5 december 2019 13:30 > To: Bhattacharjee, Soumik ; = pgsql-admin@lists.postgresql.org; pgsql-admin@postgresql.org > Subject: Re: Postgres and Java Microservices Multithreading > =20 > There is no reason why it shouldn't work as long as you use the = database only as a data storage and all the java-stuff is as a separate = layer in your software. > Conversion problems can happen on data-types, constraints and/or = triggers. If you use stored-procedures, those should be converted / = rewritten as well.. > =20 > A bit of a strange question as this is basic datbase knowledge.... ??/ = Esp. if you're working at KPN. > --=20 > Open Systems Development B.V. > Peter M. Groen > Managing Director > Rooseveltstraat 18-P > 2321 BM Leiden > +31 6 12 08 95 62 > email : peter@osdev.nl > skype : peter_m_groen > =20 > On Thu, 2019-12-05 at 12:22 +0000, soumik.bhattacharjee@kpn.com wrote: > Hi Experts, > =20 > Few more details as discussed with application team. > =20 > In parallel processing Application will create multiple threads = towards our PG database to retrieve/ update data. > =20 > =20 > =E2=80=A2 Application will send multiple parallel requests to DB = on same table to SELECT data. > =E2=80=A2 Application will send multiple parallel requests to DB = on same table to UPDATE data > =E2=80=A2 Application will send multiple parallel requests to DB = on same table to INSERT data > =20 > =20 > =20 > Thanks.. > =20 > From: Bhattacharjee, Soumik=20 > Sent: donderdag 5 december 2019 10:48 > To: 'pgsql-admin@lists.postgresql.org' = ; 'pgsql-admin@postgresql.org' = > Subject: RE: Postgres and Java Microservices Multithreading > =20 > Hi Experts, > =20 > Please let me know if you have some use cases or documentations around = this. > =20 > Any response will help me a lot in this context. > =20 > Thanks in advance. > =20 > =20 > From: Bhattacharjee, Soumik=20 > Sent: woensdag 4 december 2019 14:34 > To: 'pgsql-admin@lists.postgresql.org' = ; pgsql-admin@postgresql.org > Subject: Postgres and Java Microservices Multithreading > =20 > Hi Experts, > =20 > To set the context we are operating in Oracle 11g R2 and our = applications are deployed in private cloud and all 15 + Java micro = services are multithreaded. > =20 > And we are doing database migration from Oracle 11gR2 to Postgres 12. > =20 > So if anyone can share your experience or share some = documentations/use cases if we can maintain the same configurations for = Java micro services with multithreading as we are using in Oracle and = same works in Postgres too? =E2=80=93 (We just plan to switch the data = source from Oracle to Postgres- will that work? ) > =20 > =20 > Thanks..