Re: Postgres 10, slave not catching up with master

2018-10-22 Thread Boris Sagadin
Yes, turning wal_compression off improves things. Slave that was mentioned unfortunately lagged too much before this setting was applied and was turned off. However the remaining slave lags less now, although still occasionally up to a few minutes. I think single threadedness of recovery is a big

Re: Are indices used for creating check constraints?

2018-10-22 Thread Tom Lane
Dinko Papak writes: > Here are 3 interesting (to me) numbers: > 1. creating index on expression (func(timestamp)) takes 5 seconds > 2. creating check constraint on the same expression takes 10 seconds > 3. adding partition table based on the same expression without check > expression takes 20

Are indices used for creating check constraints?

2018-10-22 Thread Dinko Papak
Here are 3 interesting (to me) numbers: 1. creating index on expression (func(timestamp)) takes 5 seconds 2. creating check constraint on the same expression takes 10 seconds 3. adding partition table based on the same expression without check expression takes 20 seconds (this has been

Re: Replication question

2018-10-22 Thread Andres Freund
Hi, On 2018-10-22 13:53:40 +, Scot Kreienkamp wrote: > We just moved to PG9.6 from 9.1 (yeah, not my choice to wait this long). In > 9.1 I had to make the archive location (NFS in my case) available to all the > mirrors running PG so that they could catch up whenever they fell behind. I

RE: Replication question

2018-10-22 Thread Scot Kreienkamp
I remember thinking it was pulling from archive with the restore command if necessary to augment what it had on disk. If that was the case I wanted to configure it. I don’t care for the replication slots due to the possible disk space issue as we don’t run shifts around the clock. So I’ll

Re: Replication question

2018-10-22 Thread Jeff Janes
On Mon, Oct 22, 2018, 9:54 AM Scot Kreienkamp wrote: > Hi everyone, > > > > We just moved to PG9.6 from 9.1 (yeah, not my choice to wait this long). > In 9.1 I had to make the archive location (NFS in my case) available to all > the mirrors running PG so that they could catch up whenever they

RE: Replication question

2018-10-22 Thread Scot Kreienkamp
Dang, I thought that sounded too good to be true. Oh well. Thanks for setting me straight. Scot Kreienkamp |Senior Systems Engineer | La-Z-Boy Corporate One La-Z-Boy Drive| Monroe, Michigan 48162 | Office: 734-384-6403 | | Mobile: 7349151444 | Email: scot.kreienk...@la-z-boy.com From: Don

Re: Replication question

2018-10-22 Thread Andreas Kretschmer
Am 22.10.2018 um 15:53 schrieb Scot Kreienkamp: I thought I read somewhere that in 9.6, as long as the WAL log is available on disk or in the archive the replication server will provide that to the replication client, and my archive NFS mount didn’t have to be available to all replication

Re: How to declare PG version for compiling extensions.

2018-10-22 Thread Tom Lane
GPT writes: > Both PG versions 10.5 and 11 are installed. > I have been trying to compile extensions for PG11 by using: > PATH=/.../11/bin:PATH make USE_... > but unfortunately PG10 is always being used (the `make` output always > shows PG10 and refers to `pg_config`). > 1) Does it have to do

Re: How to declare PG version for compiling extensions.

2018-10-22 Thread Adrian Klaver
On 10/22/18 6:53 AM, GPT wrote: Unfortunately, I had not installed the following package: "postgresql-server-dev-11" By the way, shouldn't a warning message appear while trying to run: `PATH=/usr/lib/postgresql/11/bin:$PATH make USE_PGXS=1` warning the user that some files are missing.

Re: Replication question

2018-10-22 Thread Don Seiler
> > I thought I read somewhere that in 9.6, as long as the WAL log is > available on disk or in the archive the replication server will provide > that to the replication client, and my archive NFS mount didn’t have to be > available to all replication clients. > Streaming replication will only

Replication question

2018-10-22 Thread Scot Kreienkamp
Hi everyone, We just moved to PG9.6 from 9.1 (yeah, not my choice to wait this long). In 9.1 I had to make the archive location (NFS in my case) available to all the mirrors running PG so that they could catch up whenever they fell behind. I thought I read somewhere that in 9.6, as long as

Re: How to declare PG version for compiling extensions.

2018-10-22 Thread GPT
Unfortunately, I had not installed the following package: "postgresql-server-dev-11" By the way, shouldn't a warning message appear while trying to run: `PATH=/usr/lib/postgresql/11/bin:$PATH make USE_PGXS=1` warning the user that some files are missing. Tia On 10/22/18, GPT wrote: > Hi, >

How to declare PG version for compiling extensions.

2018-10-22 Thread GPT
Hi, Both PG versions 10.5 and 11 are installed. I have been trying to compile extensions for PG11 by using: PATH=/.../11/bin:PATH make USE_... but unfortunately PG10 is always being used (the `make` output always shows PG10 and refers to `pg_config`). 1) Does it have to do with pg_config? 2)

Re: Optimizing Postgresql ILIKE while query

2018-10-22 Thread Alban Hertroys
> On 22 Oct 2018, at 7:56, aman gupta wrote: > > Issue: > > We have the base table which contains 22M records and we created a view on > top of it while querying the view with ILIKE clause it took 44 seconds and > with LIKE Clause 20 Seconds > > Query: > > fm_db_custom_db=# EXPLAIN

Re: Optimizing Postgresql ILIKE while query

2018-10-22 Thread Pavel Stehule
Hi po 22. 10. 2018 v 7:57 odesílatel aman gupta napsal: > Hi Team, > > Greetings for the day!! > > Platform: > > PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 > 20150623 (Red Hat 4.8.5-11), 64-bit > > > Issue: > > > We have the base table which contains 22M records and we