Postgresql + containerization possible use case

2021-12-10 Thread Achilleas Mantzios
Hi we are running some 140 remote servers (in the 7 seas via satellite connections), and in each one of them we run: - jboss - postgresql - uucp (not as a daemon) - gpsd - samba - and possibly some other services Hardware and software upgrades are very hard since there is no physical access to

What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Marc Mamin
What is the best way to redefine a trigger? (lock issue) Hello, I have deployment/migration scripts that require to be idempotent. When (re)defining or deleting triggers, I've lately observed locked statements that seemed never to release (waited for a few hours). affected version: PG 10 (and

Re: What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Achilleas Mantzios
On 10/12/21 11:27 π.μ., Marc Mamin wrote: What is the best way to redefine a trigger? (lock issue) Hello, I have deployment/migration scripts that require to be idempotent. When (re)defining or deleting triggers, I've lately observed locked statements that seemed never to release (waited for

RE: What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Marc Mamin
>> Hello, >> I have deployment/migration scripts that require to be idempotent. >> >> When (re)defining or deleting triggers, I've lately observed locked statements that seemed never to release (waited for a few hours). >> affected version: PG 10 (and probably PG 12 ?) >> >

Re: What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Achilleas Mantzios
On 10/12/21 12:20 μ.μ., Marc Mamin wrote: >> Hello, >> I have deployment/migration scripts that require to be idempotent. >> >> When (re)defining or deleting triggers, I've lately observed locked statements that seemed never to release (waited for a few hours). >> affected

RE: What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Marc Mamin
> >-Original Message- >From: Achilleas Mantzios >Sent: Freitag, 10. Dezember 2021 11:36 >To: pgsql-general@lists.postgresql.org >Subject: Re: What is the best way to redefine a trigger? (lock issue) > >On 10/12/21 12:20 μ.μ., Marc Mamin wrote: >> >> >> H

Re: What is the best way to redefine a trigger? (lock issue)

2021-12-10 Thread Achilleas Mantzios
On 10/12/21 12:56 μ.μ., Marc Mamin wrote: > >-Original Message- >From: Achilleas Mantzios >Sent: Freitag, 10. Dezember 2021 11:36 >To: pgsql-general@lists.postgresql.org >Subject: Re: What is the best way to redefine a trigger? (lock issue) > >On 10/12/21

Re: Postgresql + containerization possible use case

2021-12-10 Thread o1bigtenor
On Fri, Dec 10, 2021 at 3:24 AM Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > Hi > we are running some 140 remote servers (in the 7 seas via satellite > connections), and in each one of them we run: > - jboss > - postgresql > - uucp (not as a daemon) > - gpsd > - samba > - and possib

Re: Postgresql + containerization possible use case

2021-12-10 Thread Achilleas Mantzios
On 10/12/21 1:24 μ.μ., o1bigtenor wrote: On Fri, Dec 10, 2021 at 3:24 AM Achilleas Mantzios mailto:ach...@matrix.gatewaynet.com>> wrote: Hi we are running some 140 remote servers (in the 7 seas via satellite connections), and in each one of them we run: - jboss - postgresql

request to support "conflict on(col1 or col2) do update xxx" feature

2021-12-10 Thread sai
I think this feature is a very common requirement. For example. I created a table, which username and email columns are unique separately CREATE TABLE test ( usernameVARCHAR(255) NOT NULL UNIQUE, email VARCHAR(255) NOT NULL UNIQUE, status VARCHAR(127) ); I want to do

Re: Postgresql + containerization possible use case

2021-12-10 Thread o1bigtenor
On Fri, Dec 10, 2021 at 6:02 AM Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > On 10/12/21 1:24 μ.μ., o1bigtenor wrote: > > > > On Fri, Dec 10, 2021 at 3:24 AM Achilleas Mantzios < > ach...@matrix.gatewaynet.com> wrote: > >> Hi >> we are running some 140 remote servers (in the 7 seas

Re: Postgresql + containerization possible use case

2021-12-10 Thread Adrian Klaver
On 12/10/21 01:24, Achilleas Mantzios wrote: Hi The idea for future upgrades is to containerize certain aspects of the software. The questions are (I am not skilled in docker, only minimal contact with lxd) : - is this a valid use case for containerization? - are there any gotchas around p

RE: [EXTERNAL] Re: performance expectations for table(s) with 2B recs

2021-12-10 Thread Godfrin, Philippe E
On 2021-12-08 14:44:47 -0500, David Gauthier wrote: > So far, the tables I have in my DB have relatively low numbers of records > (most > are < 10K, all are < 10M). Things have been running great in terms of > performance. But a project is being brainstormed which may require some > tables > t

Re: Postgresql + containerization possible use case

2021-12-10 Thread Michael Lewis
On Fri, Dec 10, 2021, 2:24 AM Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > Hi > we are running some 140 remote servers (in the 7 seas via satellite > connections) How are they used? What is in Postgres? Should that all have the exact same read only data at all times? >

Re: Postgresql + containerization possible use case

2021-12-10 Thread Adrian Klaver
On 12/10/21 12:06, Michael Lewis wrote: On Fri, Dec 10, 2021, 2:24 AM Achilleas Mantzios mailto:ach...@matrix.gatewaynet.com>> wrote: Hi we are running some 140 remote servers (in the 7 seas via satellite connections) How are they used? What is in Postgres? Should that all have th

Re: [EXTERNAL] Re: performance expectations for table(s) with 2B recs

2021-12-10 Thread Peter J. Holzer
On 2021-12-10 18:04:07 +, Godfrin, Philippe E wrote: > >But in my experience the biggest problem with large tables are unstable > >execution plans - for most of the parameters the optimizer will choose > >to use an index, but for some it will erroneously think that a full > >table scan is faste

Re: CTE Materialization

2021-12-10 Thread Richard Michael
On Thu, 9 Dec 2021 at 10:29, Paul van der Linden wrote: > This one quite nicely explains it: > https://stackoverflow.com/questions/14897816/how-can-i-prevent-postgres-from-inlining-a-subquery > Given indexes applicable to multiple expressions in a WHERE condition, how does postgres decide which

Difference in execution plans pg12 vs pg14

2021-12-10 Thread Дмитрий Иванов
Afternoon. I was able to make the necessary changes to my base needed to migrate win_pg12 to debian pg14. But there is a new problem, which was not there at the initial stage so I checked: win_pg12: -> Index Scan using index_class_tree_full on class c (cost=0.28..2.50 rows=1 width=235) (actual t

Re: Difference in execution plans pg12 vs pg14

2021-12-10 Thread Adrian Klaver
On 12/10/21 17:00, Дмитрий Иванов wrote: Afternoon. I was able to make the necessary changes to my base needed to migrate win_pg12 to debian pg14. But there is a new problem, which was not there at the initial stage so I checked: win_pg12: ->  Index Scan using index_class_tree_full on class c

Re: Difference in execution plans pg12 vs pg14

2021-12-10 Thread Дмитрий Иванов
Yes, I did. I reset table statistics, did (VACUUM) ANALYZE, recreated index. Nothing changes. I've deleted the database many times, dozens of times. Maybe something is broken? -- Regards, Dmitry! сб, 11 дек. 2021 г. в 06:13, Adrian Klaver : > On 12/10/21 17:00, Дмитрий Иванов wrote: > > Afternoo

Re: Difference in execution plans pg12 vs pg14

2021-12-10 Thread Adrian Klaver
On 12/10/21 17:51, Дмитрий Иванов wrote: Yes, I did. I reset table statistics, did (VACUUM) ANALYZE, recreated index. Nothing changes. I've deleted the database many times, dozens of times. Maybe something is broken? How did you do the upgrade? -- Regards, Dmitry! сб, 11 дек. 2021 г. в 06

PostgreSQL 14 Slaves setup - Question about WAL Files recovery

2021-12-10 Thread Lucas
Hi guys. I’m in the process of migrating a PG 9.2 cluster to PG 14. There are a lot of differences on the configuration files between PG 9.2 and PG 14, and I have a question that hopefully you’ll be able to help me out. My servers are deployed in AWS on EC2 instances and I use /pgsql to store PG

Re: Difference in execution plans pg12 vs pg14

2021-12-10 Thread Дмитрий Иванов
Yes, I did. Step1 sudo /usr/lib/postgresql/14/bin/pg_dump --file "/home/dismay/uchet/Uchet.backup" --host "server" --port "5999" --username "back" --no-password --verbose --format=c --quote-all-identifiers --blobs --disable-triggers --encoding="UTF8" "Uchet" Step2 Manual DROP/CREATE BASE from tem

Re: Difference in execution plans pg12 vs pg14

2021-12-10 Thread Imre Samu
Hi Dmitry, pg12: > Execution Time: 44.123 ms pg14: > JIT: > Functions: 167 > Options: Inlining true, Optimization true, Expressions true, Deforming true > Timing: Generation 9.468 ms, Inlining 55.237 ms, Optimization 507.548 ms, Emission 347.932 ms, Total 920.185 ms > Execution Time: 963.25