Function's execute overhead reducing

2019-11-16 Thread Игорь Выскорко
Hi all! The best way to describe my question is to show the code as first: create table tst( id int primary key, j1 jsonb, j2 jsonb ); insert into tst select ser, jsonb_build_object( floor(random() * 10 + 1), floor(random() * 1000 + 1), floor(random() * 10 + 1), floor(random()

Re: REINDEX VERBOSE unknown option

2019-11-16 Thread Pavel Stehule
so 16. 11. 2019 v 18:43 odesílatel Josef Šimánek napsal: > Ahh, I just tried to do the same with reindexdb cli tool and the > actual syntax is REINDEX (VERBOSE) TABLE sales; Sorry for unnecessary > question. Anyway maybe we can add this to documentation as a example. I can > prepare patch for thi

Re: pg12 rc1 on CentOS8 depend python2

2019-11-16 Thread Devrim Gündüz
Hi, On Fri, 2019-09-27 at 09:38 -0400, Tom Lane wrote: > Another idea might be to bundle them into the plpython package > instead of contrib (and similarly for the plperl transforms). This went into the last week's minor updates. Regards, -- Devrim Gündüz Open Source Solution Architect, Red Ha

Re: pg12 rc1 on CentOS8 depend python2

2019-11-16 Thread Devrim Gündüz
Hi, On Fri, 2019-09-27 at 10:50 +0900, keisuke kuroda wrote: > CentOS8 does not have python2 installed by default, But PostgreSQL is > dependent on python2. > > Do we need to install python2 when we use PostgreSQL on CentOS8? For the archives: I fixed this in 12.1 packages. Core package do not

Re: ERROR: COPY escape must be a single one-byte character (multi-delimiter appears to work on Postgres 9.0 but does not on Postgres 9.2)

2019-11-16 Thread Nicolas Paris
> I am unable to edit this Talend job, as it's very old and we do not have the > source code for the job anymore. I am unable to see what the actual delimiter Compiled talend jobs produce jars file with java .class files in which the SQL statements are in plain text. You should be at least able to

Re: here does postgres take its timezone information from?

2019-11-16 Thread Thomas Munro
On Sat, Nov 16, 2019 at 7:13 PM Tom Lane wrote: > Palle Girgensohn writes: > > 15 nov. 2019 kl. 21:32 skrev Thomas Munro : > >> Ugh. It doesn't have the old backward compatibility names like > >> US/Pacific installed by default, which is a problem if that's what > >> initdb picked for your clust

Re: REINDEX VERBOSE unknown option

2019-11-16 Thread Josef Šimánek
Ahh, I just tried to do the same with reindexdb cli tool and the actual syntax is REINDEX (VERBOSE) TABLE sales; Sorry for unnecessary question. Anyway maybe we can add this to documentation as a example. I can prepare patch for this if welcomed. so 16. 11. 2019 v 18:40 odesílatel Josef Šimánek n

REINDEX VERBOSE unknown option

2019-11-16 Thread Josef Šimánek
Hello, according to https://www.postgresql.org/docs/11/sql-reindex.html VERBOSE option is valid for REINDEX command for 11.3 PostgreSQL server. Anyway I'm getting error using VERBOSE option. project_production=# REINDEX VERBOSE TABLE sales; ERROR: syntax error at or near "VERBOSE" LINE 1: REINDE

Re: Weird ranking results with ts_rank

2019-11-16 Thread Jeff Janes
On Fri, Nov 15, 2019 at 1:31 AM Javier Ayres wrote: > Hi everybody. > > I'm implementing a solution that uses PostgreSQL's full text search > capabilities and I have come across a particular set of results for ts_rank > that don't seem to make sense according to the documentation. > While the do

Re: PostGreSQL Replication and question on maintenance

2019-11-16 Thread Jeff Janes
On Thu, Nov 14, 2019 at 12:23 PM github kran wrote: > >> >> *Problem what we have right now. * >> >> When the migration activity runs(weekly) from past 2 times , we saw the >> cluster read replica instance has restarted as it fallen behind the >> master(writer instance). >> > I can't figure out w

Re: Function performance degrades after repeated execution

2019-11-16 Thread Pavel Stehule
so 16. 11. 2019 v 16:46 odesílatel Ron napsal: > On 11/16/19 8:22 AM, Dave Roberge wrote: > > Hi, > > > > We've been troubleshooting a slow running function in our postgres > database. I've been able to boil it down to the simplest function possible. > It looks like this: > > > > FOR rec IN selec

Re: Function performance degrades after repeated execution

2019-11-16 Thread Ron
On 11/16/19 8:22 AM, Dave Roberge wrote: Hi, We've been troubleshooting a slow running function in our postgres database. I've been able to boil it down to the simplest function possible. It looks like this: FOR rec IN select 1 as matchval FROM table1 t1, table2 t2 join table3 t3 on t3.col

Re: access to original-statement predicates in an INSTEAD-OF row trigger

2019-11-16 Thread Tom Lane
John Lumby writes: > How can a row trigger access the original SQL statement at the root of > the current operation? It can't; at least not in any way that'd be reliable or maintainable. I concur with the upthread recommendation that switching to serializable mode would be a more manageable way

Re: Function performance degrades after repeated execution

2019-11-16 Thread Pavel Stehule
so 16. 11. 2019 v 16:06 odesílatel Dave Roberge napsal: > Hi, > > We've been troubleshooting a slow running function in our postgres > database. I've been able to boil it down to the simplest function possible. > It looks like this: > > FOR rec IN select 1 as matchval FROM table1 t1, table2 t2 >

Function performance degrades after repeated execution

2019-11-16 Thread Dave Roberge
Hi, We've been troubleshooting a slow running function in our postgres database. I've been able to boil it down to the simplest function possible. It looks like this: FOR rec IN select 1 as matchval FROM table1 t1, table2 t2 join table3 t3 on t3.col = t2.col WHERE t1.col = id LOOP IF rec.

Re: access to original-statement predicates in an INSTEAD-OF row trigger

2019-11-16 Thread John Lumby
On 11/15/19 17:38, Adrian Klaver wrote: > On 11/15/19 1:54 PM, John Lumby wrote: >> Adrian Klaver wrote : >>> >> We need to run with Read Committed. >> >> I am looking for a solution which does not alter the application or >> overall behaviour, >> but just addresses detecting which predicates to a

Re: PostGreSQL Replication and question on maintenance

2019-11-16 Thread github kran
Any reply on this please ?. On Fri, Nov 15, 2019 at 9:10 AM github kran wrote: > > > On Thu, Nov 14, 2019 at 11:42 PM Pavel Stehule > wrote: > >> these numbers looks crazy high - how much memory has your server - more >> than 1TB? >> > > The cluster got 244 GB of RAM and storage capacity it h