SV: idle_in_transaction_session_timeout

2021-05-06 Thread Gustavsson Mikael
Hi, idle_in_transaction_session_timeout came in PG 9.6 if im not mistaken. KR Mikael Från: Atul Kumar Skickat: den 7 maj 2021 8:34 Till: pgsql-general Ämne: idle_in_transaction_session_timeout Hi, I have postgres 9.5 version running on my machine. When I am

Re: trigger impacting insertion of records

2021-05-06 Thread Atul Kumar
hi, The data is inserting using some json sript which is working fine in our stating server and inserting complete records. But in production data insertion is slow and after some insertion it just abort somehow. DB logs are given below: #PostGreSQL: idle^^2021-05-06 18:06:09 PDT^^bonzipay^^us

idle_in_transaction_session_timeout

2021-05-06 Thread Atul Kumar
Hi, I have postgres 9.5 version running on my machine. When I am trying to find out the parameter idle_in_transaction_session_timeout it is showing me below error: postgres=# show idle_in_transaction_session_timeout; ERROR: unrecognized configuration parameter "idle_in_transaction_session_timeo

Optimizing search query with sorting by creation field

2021-05-06 Thread Droid Tools
Hi, I'm looking for tips on optimizing a search query where someone searches for content within a post and wants to sort the results by a timestamp. I have a table `posts` with a `created` field (timestamp) and a post_tsv column (TSVECTOR). Likewise I have a GIN Index on the `post_tsv` field and a

Re: "invalid contrecord" error on replica

2021-05-06 Thread Adrien Nayrat
On 5/6/21 7:37 AM, Kyotaro Horiguchi wrote: At Sun, 2 May 2021 22:43:44 +0200, Adrien Nayrat wrote in I also dumped 000100AA00A1 on the secondary and it contains all the records until AA/A1004018. It is really weird, I don't understand how the secondary can miss the last 2 records

Re: Strange behavior of function date_trunc

2021-05-06 Thread Tom Lane
Pavel Luzanov writes: > One thing remains unclear. > Why, if a scalar subquery is used to materialize the function value(even > constant), then an inefficient index scan is chosen: The scalar subquery prevents the planner from seeing the actual comparison value, so it falls back to a default sel

Re: Strange behavior of function date_trunc

2021-05-06 Thread Pavel Luzanov
Hello, On 06.05.2021 16:44, Tom Lane wrote: Pavel Luzanov writes: Does having an index allow the function value to be cached? For an indexscan, the comparison value is evaluated once and used to search the index. The point of the "stable" marking is actually to promise that this will give th

Re: trigger impacting insertion of records

2021-05-06 Thread Adrian Klaver
On 5/6/21 12:45 AM, Atul Kumar wrote: Hi, I have simple table having structure like given below: \d bp_ach_trans Table "bonzipay.bp_ach_trans" Column | Type | Modifiers ++

Compiling a ossp-uuid module for Win32

2021-05-06 Thread Wolfgang Rißler
Hello community, since we need a libpq for postgres v13 for a win32 project, and I did not find a binary package, I tried to compile my own postgres v13 win32 with MSVisualStudio 2019. This works so far, as described in the docs. I also could add the most extensions in the config.pl (without

[RPM/CentOS7] Need to disable repo_gpgcheck on pgdg-common when using RPM version 42.0-17.1

2021-05-06 Thread Thomas Boussekey
Hello all, This morning, a new RPM version has been sent to https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/ with version ID 42.0-17.1 We had to adapt our tooling to comply with this new repository file. We faced the following error on section pgdg-common > Failure talking to y

Re: Strange behavior of function date_trunc

2021-05-06 Thread David G. Johnston
On Thu, May 6, 2021 at 6:44 AM Tom Lane wrote: > This case is the reason we invented the "stable" attribute to begin > with. People have since misinterpreted it as authorizing caching of > function results, but that's not what it was intended for. > > This is a good paragraph...if something like

Re: Strange behavior of function date_trunc

2021-05-06 Thread Tom Lane
Pavel Luzanov writes: > Does having an index allow the function value to be cached? For an indexscan, the comparison value is evaluated once and used to search the index. The point of the "stable" marking is actually to promise that this will give the same result as the naive interpretation of a

Re: Chain Hashing

2021-05-06 Thread Thomas Munro
On Thu, May 6, 2021 at 9:48 PM Jian He wrote: > The following part is about the Chain Hashing. >> >> Maintain a linked list of buckets for each slot in the hash table. >> Resolve collisions by placing all elements with the same hash key into the >> same bucket. >> → To determine whether an elem

Re: Strange behavior of function date_trunc

2021-05-06 Thread Pavel Luzanov
Hello, On 05.05.2021 16:55, Tomas Vondra wrote: Well, it'd not like date_trunc is executed for each row while now() is executed only once. The functions are executed for each row in both cases... A couple more experiments. Since I can't to track usage of system functions, I decided to play wit

Re: trigger impacting insertion of records

2021-05-06 Thread Vijaykumar Jain
just simplified, but it works fine for me. create table example(id int primary key, value text); create or replace function trg_fn() returns trigger language plpgsql as $$ begin RAISE NOTICE 'trigger_func(%) called: action = %, when = %, level = %', TG_ARGV[0], TG_OP, TG_WHEN, TG_LEVEL;

Re: Trusty postgresql-client-9.5_9.5.17-1.pgdg14.04+1_amd64.deb removed ?

2021-05-06 Thread Ashwin Kini
Yes we are aware, we are in the process of completely moving to bionic so very soon this wont be a problem. Thanks again! Regards, Ashwin Kini [signature_2093667507] From: Adrian Klaver Date: Wednesday, 5 May 2021 at 3:27 PM To: Ashwin Kini , pgsql-general@lists.postgresql.org Subject: Re: T

Re: Trusty postgresql-client-9.5_9.5.17-1.pgdg14.04+1_amd64.deb removed ?

2021-05-06 Thread Ashwin Kini
Thank you very much Regards, Ashwin Kini From: Adrian Klaver Sent: Wednesday, May 5, 2021 2:25:51 PM To: Ashwin Kini ; pgsql-general@lists.postgresql.org Subject: Re: Trusty postgresql-client-9.5_9.5.17-1.pgdg14.04+1_amd64.deb removed ? On 5/5/21 11:42 AM, A

Chain Hashing

2021-05-06 Thread Jian He
Been following YouTube to study about Database Hash Join. https://www.youtube.com/watch?v=J0nbgXIarhc * HASH TABLE* *Design Decision* * #1: Hash Function *→ How to map a large key space into a smaller domain. → Trade-off between being fast vs. collision rate. Design Decision *#2: Hashing Scheme* →

trigger impacting insertion of records

2021-05-06 Thread Atul Kumar
Hi, I have simple table having structure like given below: \d bp_ach_trans Table "bonzipay.bp_ach_trans" Column | Type | Modifiers ++---