Re: Specific query taking time to process

2019-12-08 Thread Justin Pryzby
On Sat, Dec 07, 2019 at 08:05:59PM +, Fahiz Mohamed wrote: > There is a specific search query I am running to get list of Documents and > their metadata from several table in the DB. > We are running Postgres 9.6.9 on Amazon RDS (db.m5.4xlarge instance) > > Our current DB consists of 500GB of

Specific query taking time to process

2019-12-08 Thread Fahiz Mohamed
Hi team, Could you please help me with this strange issue I am facing in my current live server I am maintaining. There is a specific search query I am running to get list of Documents and their metadata from several table in the DB. We are running Postgres 9.6.9 on Amazon RDS (db.m5.4xlarge in

Re: How to run in parallel in Postgres, EXECUTE_PARALLEL

2019-12-08 Thread Lars Aksel Opsahl
> From: Joe Conway > Sent: Sunday, December 8, 2019 9:04 PM > To: Lars Aksel Opsahl; Laurenz Albe; pgsql-performance@lists.postgresql.org > Subject: Re: How to run in parallel in Postgres, EXECUTE_PARALLEL > > On 12/8/19 1:14 PM, Lars Aksel Opsahl wrote: > > Do you or anybody know if there ar

Re: How to run in parallel in Postgres, EXECUTE_PARALLEL

2019-12-08 Thread Joe Conway
On 12/8/19 1:14 PM, Lars Aksel Opsahl wrote: > Do you or anybody know if there are any plans for a function call that > support the calling structure below or something like it and that then > could finish in 1 second ? (If you are calling a void function, the > return value should not be any probl

Re: How to run in parallel in Postgres, EXECUTE_PARALLEL

2019-12-08 Thread Lars Aksel Opsahl
>You cannot run several queries in parallel in a PostgreSQL function. > >You may want to have a look at PL/Proxy which might be used for things like >that. > >Yours, >Laurenz Albe >-- >Cybertec | https://www.cybertec-postgresql.com Hi Laurenz The code below takes 3, seconds DO $body$ DECLARE

Re: query that canceled isnt logged

2019-12-08 Thread Tom Lane
Mariel Cherkassky writes: > If I'll try to run the following query and cancel it manually(ctrl+c) : > select pg_sleep(10) > I will see in the logs the following messages : > 2019-12-08 17:16:34 IST postgres 30797 LOG: statement: select > pg_sleep(10); > 2019-12-08 17:16:36 IST postgres 30797 E

Re: query that canceled isnt logged

2019-12-08 Thread Mariel Cherkassky
that is the first thing I did but it isnt logged even when this parameter is set, I guess because it is canceled before it finishes to run - which is weird..

Re: query that canceled isnt logged

2019-12-08 Thread Mariel Cherkassky
What do you mean by live queries ? If I'll try to run the following query and cancel it manually(ctrl+c) : select pg_sleep(10) I will see in the logs the following messages : 2019-12-08 17:16:34 IST postgres 30797 LOG: statement: select pg_sleep(10); 2019-12-08 17:16:36 IST postgres 30797 ERROR

Re: query that canceled isnt logged

2019-12-08 Thread Tom Lane
Mariel Cherkassky writes: > ... > Therefore, my theory was that the validation query is taking more than 2 > seconds. I decided to log all the statements(log_statements=all) that are > running in order to see for how long the validation query is running in the > db (log_min_duration_statement won

query that canceled isnt logged

2019-12-08 Thread Mariel Cherkassky
Hey all, I'm trying to analyze a weird situation that I have seen in my db. Sometimes my app fails to start because of the following msg : SQL State : null Error Code : 0 Message: Cannot create PoolableConnectionFactory (ERROR: canceling statement due to user request) In the db at the same ti