Re: Using of --data-checksums

2020-04-07 Thread Michael Paquier
On Tue, Apr 07, 2020 at 08:10:13AM -0700, BGoebel wrote: > initdb --data-checksums "... help to detect corruption by the I/O system" > There is an (negligible?) impact on performance, ok. > > Is there another reason NOT to use this feature ? > Has anyone had good or bad experience with the use o

Announcing "common" YUM repository

2020-04-07 Thread Devrim Gündüz
The community PostgreSQL YUM repository does not just include PostgreSQL packages, but also some extensions which depend on a specific PostgreSQL version (e.g. PostGIS.), packages in the PostgreSQL world which can be used against some (or all) PostgreSQL versions (e.g. pgAdmin4), and the supporti

Re: Performance degradation if query returns no rows and column expression is used after upgrading to 12

2020-04-07 Thread Andrus
Hi! >It is really strange why it is too slow. Can you prepare test case? Looks like >bug (maybe not Postgres's bug) Testcase is below. With jit on it takes 3.3 sec and with jit off 1.5 sec. Andrus. create temp table toode ( toode char(20), ribakood char(20), nimetus

Re: Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread Rob Sargent
On 4/7/20 2:23 PM, Sándor Daku wrote: On Tue, 7 Apr 2020 at 21:52, David Gauthier > wrote: After looking at some of the factors that can affect this, I think it may be important to know that most of the connections will be almost idle (in terms of i

Re: Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread Adrian Klaver
On 4/7/20 12:51 PM, David Gauthier wrote: After looking at some of the factors that can affect this, I think it may be important to know that most of the connections will be almost idle (in terms of interacting with the DB).  The "users" are perl/dbi scripts which connect to the DB and spend th

Re: Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread Tim Cross
David Gauthier writes: > After looking at some of the factors that can affect this, I think it may > be important to know that most of the connections will be almost idle (in > terms of interacting with the DB). The "users" are perl/dbi scripts which > connect to the DB and spend the vast majo

Re: Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread Sándor Daku
On Tue, 7 Apr 2020 at 21:52, David Gauthier wrote: > After looking at some of the factors that can affect this, I think it may > be important to know that most of the connections will be almost idle (in > terms of interacting with the DB). The "users" are perl/dbi scripts which > connect to the

Re: Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread David Gauthier
After looking at some of the factors that can affect this, I think it may be important to know that most of the connections will be almost idle (in terms of interacting with the DB). The "users" are perl/dbi scripts which connect to the DB and spend the vast majority of the time doing things other

Re: Performance degradation if query returns no rows and column expression is used after upgrading to 12

2020-04-07 Thread Pavel Stehule
út 7. 4. 2020 v 19:09 odesílatel Andrus napsal: > Hi! > >on your query there is too slow JIT. Is strange how much. So the best way > is disable JIT probably > >set jit to off; > >or same field in postgresql.conf > > Thank you. > > set jit to off > > makes select fast. > I have encountered this is

Re: Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread Laurenz Albe
On Tue, 2020-04-07 at 12:24 -0400, David Gauthier wrote: > psql (9.6.0, server 11.3) on linux > > We've ramped up usage on a PG server (a VM, I have no choice about this) and > are approaching the > 100 connections limit. We could increase the limit, but I've read that this > can lead to a > de

Re: Performance degradation if query returns no rows and column expression is used after upgrading to 12

2020-04-07 Thread Andrus
Hi! >on your query there is too slow JIT. Is strange how much. So the best way is >disable JIT probably >set jit to off; >or same field in postgresql.conf Thank you. set jit to off makes select fast. I have encountered this issue only in this query in one database There is variation of th

Re: Performance degradation if query returns no rows and column expression is used after upgrading to 12

2020-04-07 Thread Pavel Stehule
út 7. 4. 2020 v 18:47 odesílatel Andrus napsal: > Hi! > > Query returns no rows but its execution time in Postgres 12 depends on the > column expression. > > Query with column expression > > coalesce( (select sum(taitmata) from rid join dok using (dokumnr) > where toode=toode.toode and doktyyp='

Performance degradation if query returns no rows and column expression is used after upgrading to 12

2020-04-07 Thread Andrus
Hi! Query returns no rows but its execution time in Postgres 12 depends on the column expression. Query with column expression coalesce( (select sum(taitmata) from rid join dok using (dokumnr) where toode=toode.toode and doktyyp='T' and not dok.taidetud and dok.kinnitatud and taitmata is not

Re: Mixed Locales and Upgrading

2020-04-07 Thread Don Seiler
On Mon, Mar 30, 2020 at 4:39 PM Don Seiler wrote: > On Mon, Mar 30, 2020 at 4:30 PM Tom Lane wrote: > >> Don Seiler writes: >> > Actually, would I need to re-index on text columns that we know contain >> > UUID strings? UUID characters seem to be pretty basic alphanumeric ASCII >> > characters.

Re: Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread Josef Šimánek
Hello. Have you checked https://wiki.postgresql.org/wiki/Number_Of_Database_Connections? For raw estimations you can also check http://pgconfigurator.cybertec.at/ or https://pgtune.leopard.in.ua/#/. út 7. 4. 2020 v 18:25 odesílatel David Gauthier napsal: > psql (9.6.0, server 11.3) on linux >

Estimated resources for a 500 connections instance (VM)

2020-04-07 Thread David Gauthier
psql (9.6.0, server 11.3) on linux We've ramped up usage on a PG server (a VM, I have no choice about this) and are approaching the 100 connections limit. We could increase the limit, but I've read that this can lead to a degradation in performance. If we bump it up to 500, what kind of compute r

Using of --data-checksums

2020-04-07 Thread BGoebel
initdb --data-checksums "... help to detect corruption by the I/O system" There is an (negligible?) impact on performance, ok. Is there another reason NOT to use this feature ? Has anyone had good or bad experience with the use of --data-checksums? Thanks in advance! Bernhard -- Sent from:

Re: PostgreSQL native multi-master

2020-04-07 Thread Andreas Kretschmer
Am 07.04.20 um 13:39 schrieb Vano Beridze: Hello, What are the plans to support multi-master natively? What solution would you recommend at this point? preferably free. BDR3 works well for our customers, but it isn't free. You can ask us for more information. Regards, Andreas -- 2ndQua

Re: what happens when you issue ALTER SERVER in a hot environment?

2020-04-07 Thread AC Gomez
Thank you for clarifying. Don't you think this is pertinent information that should be in the ALTER SERVER doc page? On Tue, Apr 7, 2020, 2:59 AM Laurenz Albe wrote: > On Tue, 2020-04-07 at 00:53 -0400, Tom Lane wrote: > > "David G. Johnston" writes: > > > On Monday, April 6, 2020, AC Gomez wr

PostgreSQL native multi-master

2020-04-07 Thread Vano Beridze
Hello, What are the plans to support multi-master natively? What solution would you recommend at this point? preferably free. Kind regards, Vano

Re: How to prevent master server crash if hot standby stops

2020-04-07 Thread Laurenz Albe
On Tue, 2020-04-07 at 12:05 +0300, Andrus wrote: > > About your third question, you *never* manually mess with the files in > > pg_wal. > > The server does that. > > Is it OK to stop server, delete all files in pg_wal directory and re-start > server ? No. > Or should default value put back an

Re: EINTR while resizing dsm segment.

2020-04-07 Thread Thomas Munro
On Tue, Apr 7, 2020 at 8:58 PM Nicola Contu wrote: > So that seems to be a bug, correct? > Just to confirm, I am not using NFS, it is directly on disk. > > Other than that, is there a particular option we can set in the postgres.conf > to mitigate the issue? Hi Nicola, Yeah, I think it's a bug.

Re: EINTR while resizing dsm segment.

2020-04-07 Thread Nicola Contu
The only change we made on the disk, is the encryption at OS level. Not sure this can be something related. Il giorno mar 7 apr 2020 alle ore 10:58 Nicola Contu ha scritto: > So that seems to be a bug, correct? > Just to confirm, I am not using NFS, it is directly on disk. > > Other than that, i

Re: How to prevent master server crash if hot standby stops

2020-04-07 Thread Andrus
Hi! About your third question, you *never* manually mess with the files in pg_wal. The server does that. Is it OK to stop server, delete all files in pg_wal directory and re-start server ? Or should default value put back and wait until server frees 1 GB disk space ? Andrus.

Re: EINTR while resizing dsm segment.

2020-04-07 Thread Nicola Contu
So that seems to be a bug, correct? Just to confirm, I am not using NFS, it is directly on disk. Other than that, is there a particular option we can set in the postgres.conf to mitigate the issue? Thanks a lot for your help. Il giorno sab 4 apr 2020 alle ore 02:49 Thomas Munro ha scritto: >

Re: How to prevent master server crash if hot standby stops

2020-04-07 Thread Laurenz Albe
On Tue, 2020-04-07 at 00:50 +0300, Andrus wrote: > > If you prefer replication to fail silently, don't use replication > > slots. Use "wal_keep_segments" instead. > > I desided to give 1 GB to wal. So I added > > wal_keep_segments=60 > > After some time Postgres created 80 files with total size

Re: what happens when you issue ALTER SERVER in a hot environment?

2020-04-07 Thread Laurenz Albe
On Tue, 2020-04-07 at 00:53 -0400, Tom Lane wrote: > "David G. Johnston" writes: > > On Monday, April 6, 2020, AC Gomez wrote: > > > If you issue an ALTER SERVER command and there are active connections > > > with that server in use or new ones are coming in, what happens? Docs on > > > this com