Re: Recommendation to run vacuum FULL in parallel

2019-04-10 Thread Perumal Raj
Thanks Kevin for the inputs, In my Case there are 500+ Tables and biggest chunk 30GB ( Table only) + its indexes. So i have created 6 batches and executed in parallel . All my scripts completed in 2 Hours and my DB size came down from 500GB to 300GB. Yes i do see CPU spike, But i did whole

Re: os upgrade 7.3 to 7.5 (postgres version 10.5)

2019-04-10 Thread Prakash Ramakrishnan
Thanks for the information. So we can upgrade the os right thomas On Thu, Apr 11, 2019, 09:39 Thomas Munro wrote: > On Thu, Apr 11, 2019 at 2:47 PM Prakash Ramakrishnan > wrote: > > We are planned to upgrade the os version rhel 7.3 to 7.5 and now > currently postgresql community version in

Re: os upgrade 7.3 to 7.5 (postgres version 10.5)

2019-04-10 Thread Thomas Munro
On Thu, Apr 11, 2019 at 2:47 PM Prakash Ramakrishnan wrote: > We are planned to upgrade the os version rhel 7.3 to 7.5 and now currently > postgresql community version in 10.5 and there is some extensions working in > database need your inputs if we upgrade the os mean it will impact anything

os upgrade 7.3 to 7.5 (postgres version 10.5)

2019-04-10 Thread Prakash Ramakrishnan
Hi Team, We are planned to upgrade the os version rhel 7.3 to 7.5 and now currently postgresql community version in 10.5 and there is some extensions working in database need your inputs if we upgrade the os mean it will impact anything in current settings and extensions please do the

Re: stale WAL files?

2019-04-10 Thread Rob Sargent
On 4/10/19 6:03 PM, Rene Romero Benavides wrote: What's your current max_wal_size parameter? SHOW max_wal_size; If it's 8GB as your configuration's previous value, you would get a constant share of 512 WAL files. If it's a development environment set it to the desired size, the smaller the

Re: stale WAL files?

2019-04-10 Thread Rene Romero Benavides
What's your current max_wal_size parameter? SHOW max_wal_size; If it's 8GB as your configuration's previous value, you would get a constant share of 512 WAL files. If it's a development environment set it to the desired size, the smaller the value, the more frequent the checkpoints, but your

Re: pg_indexes doesn't show indexes for partitioned tables - bug or intended?

2019-04-10 Thread Tom Lane
Thomas Kellerer writes: > David Rowley schrieb am 10.04.2019 um 17:57: >> Overlooked for PG11. You'll see them in PG12 per [1]. It's not really >> possible to backpatch a fix for that since these views are created >> during initdb. > I don't undertand though why it's not back patched - at least

both force order of evaluation and hit index

2019-04-10 Thread Justin Pryzby
I wrote a script to import CSV query logs as described here: https://www.postgresql.org/docs/current/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-CSVLOG I also created indices for searching: |CREATE INDEX ON postgres_log_2019_04_09_2300 ((regexp_replace(message, '^duration: ([.0-9]+)

Re: How to use full-text search URL parser to filter query results by domain name?

2019-04-10 Thread Michel Pelletier
On Wed, Apr 10, 2019 at 1:58 AM Jess Wren wrote: >-> Parallel Seq Scan on links > (cost=0.00..4554.40 rows=75740 width=112) > >-> Function Scan on ts_parse > (cost=0.00..12.50 rows=5 width=32) >

Re: stale WAL files?

2019-04-10 Thread Rob Sargent
As per your configuration : max_wal_size = 50GB this seems to be the cause for the WAL files piling up. this has been declared twice, the last one is taking effect. -- El genio es 1% inspiración y 99% transpiración. Thomas Alva Edison http://pglearn.blogspot.mx/ I've manage to generate

Re: pg_indexes doesn't show indexes for partitioned tables - bug or intended?

2019-04-10 Thread Thomas Kellerer
David Rowley schrieb am 10.04.2019 um 17:57: In Postgres 11.2, indexes defined on partitioned tables do not show up in pg_indexes (the actual indexes for the partitions however do show up). Is leaving out the indexes defined on the partitioned table intended or a bug? Overlooked for PG11.

Re: pg_indexes doesn't show indexes for partitioned tables - bug or intended?

2019-04-10 Thread Alvaro Herrera
On 2019-Apr-11, David Rowley wrote: > On Thu, 11 Apr 2019 at 00:39, Thomas Kellerer wrote: > > > > In Postgres 11.2, indexes defined on partitioned tables do not show up in > > pg_indexes (the actual indexes for the partitions however do show up). > > > Is leaving out the indexes defined on

Re: pg_indexes doesn't show indexes for partitioned tables - bug or intended?

2019-04-10 Thread David Rowley
On Thu, 11 Apr 2019 at 00:39, Thomas Kellerer wrote: > > In Postgres 11.2, indexes defined on partitioned tables do not show up in > pg_indexes (the actual indexes for the partitions however do show up). > Is leaving out the indexes defined on the partitioned table intended or a bug?

Re: Does pg_stat_get_live_tuples() matter?

2019-04-10 Thread Sherrylyn Branchaw
> Hmmm ... what was in reltuples again? Reltuples had the correct number, and the query plans were showing the correct estimates. > it's a bit hard to believe that it could get to be off by 1000X. Have you suppressed autovacuum on this table? No, but here are some things I've observed: 1)

Re: Invoking user of the function with SECURITY DEFINER

2019-04-10 Thread Олег Самойлов
Looked like a bug. > 25 нояб. 2018 г., в 14:50, Madan Kumar написал(а): > > Got it.. > In my case i was getting session_user in declare section and trying to > validate later which always resulted in the function owner. > DECLARE > user text := SESSION_USER; > > So using it within the

Re: New timeline when starting with a restored data dir

2019-04-10 Thread Олег Самойлов
It’s normal behaviour to create a new timeline, when a PostgreSQL slave become a new master. This is for what timelines were designed. > 19 нояб. 2018 г., в 0:50, Yuri Kanivetsky > написал(а): > > Hi, > > I'm trying to set up Barman, and I've noticed that PostgreSQL 10 > creates a new

Re: Performance of ByteA: ascii vs binary

2019-04-10 Thread Олег Самойлов
Just theoretically assumption. PostgreSQL sometimes may optimise internal format of data and can sometimes zip data. ASCII data can be zipped better, then binary random data. Also PostgreSQL sometimes take decision to keep a column in an external file, if the column is still too big after zip.

Re: PK and FK using Hash index

2019-04-10 Thread Олег Самойлов
> 22 марта 2019 г., в 22:38, PegoraroF10 написал(а): > > On version 10 and 11 hash index was redesigned and now seems to be better > than btree. > Their speed, size and memory consuption are better, so ... > Why is not possible to have all PK and FK just using hash indices ? The only > thing

pg_indexes doesn't show indexes for partitioned tables - bug or intended?

2019-04-10 Thread Thomas Kellerer
In Postgres 11.2, indexes defined on partitioned tables do not show up in pg_indexes (the actual indexes for the partitions however do show up). E.g.: CREATE TABLE base_table ( column1 varchar(50) NOT NULL, column2 integer NOT NULL, column3 integer not null,

Re: How to use full-text search URL parser to filter query results by domain name?

2019-04-10 Thread Jess Wren
On 4/8/19 4:50 AM, Arthur Zakirov wrote: > I think it is normal to use ts_parse(). And I suppose you might use > windows functions. > > For example, you have table links: > > =# create table links (score int, link text); > =# insert into links values >   (1, 'http://www.foo.com/bar'), >   (2,