Re: How Do You Associate a Query With its Invoking Procedure?

2018-09-14 Thread Roman Konoval
queries and set the format to include application_name parameter. This way every query is logged and each log entry has an application name. Several things to keep in mind: 1. logging everything may affect performance 2. application_name is 64 chars by default Regards, Roman Konoval rkono

Re: High concurrency but simple updating causes deadlock

2018-07-12 Thread Roman Konoval
only way to overcome this that I know is to first to select for update with order by clause so that all transactions lock rows in the same order and do not cause deadlock conflicts. Regards, Roman Konoval rkono...@gmail.com > On Jul 11, 2018, at 16:16, 枫 wrote: > > Hi, > > Al

Re: Bad plan for ltree predicate <@

2017-12-01 Thread Roman Konoval
Buffers: shared hit=35230 Total runtime: 1011.565 ms (10 rows) The question is if it possible to get plan like that using function or some other way to get ltree value for given document_head.id value in one query? As an alternative I can get ltree value with the separate query but this would require 1. a round-trip to postgres 2. me to change isolation level to REPEATABLE READ to make sure that I get consistent result so I would like to avoid that. Regards, Roman Konoval

Bad plan for ltree predicate <@

2017-12-01 Thread Roman Konoval
Hi, I have a problem on 9.3.14 with a query that accesses table: Size: (retrieved by query https://gist.github.com/romank0/74f9d1d807bd3f41c0729d0fc6126749) schemaname |relname| size | toast | associated_idx_size | total +---+++-