Re: brininsert optimization opportunity

2023-11-25 Thread Soumyadeep Chakraborty
Thanks a lot for reviewing and pushing! :) Regards, Soumyadeep (VMware)

Re: brininsert optimization opportunity

2023-11-25 Thread Ashwin Agrawal
On Sat, Nov 25, 2023 at 12:06 PM Tomas Vondra wrote: > I've done a bit more cleanup on the last version of the patch (renamed > the fields to start with bis_ as agreed, rephrased the comments / docs / > commit message a bit) and pushed. Thanks a lot Tomas for helping to drive the patch to compl

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-11-25 Thread Alexander Korotkov
On Sat, Nov 25, 2023 at 10:45 PM Andrei Zubkov wrote: > On Sat, 2023-11-25 at 02:45 +0200, Alexander Korotkov wrote: > > > I've reviewed this patch. > > Thank you very much for your review. > > > I think the design was well-discussed in this thread. Implementation > > also looks good to me. I've

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-11-25 Thread Andrei Zubkov
Hi Alexander! On Sat, 2023-11-25 at 02:45 +0200, Alexander Korotkov wrote: > I've reviewed this patch. Thank you very much for your review. > I think the design was well-discussed in this thread.  Implementation > also looks good to me.  I've just slightly revised the commit > messages. I've n

strange para/programlisting pattern in sgml docs

2023-11-25 Thread Tomas Vondra
Hi, while working on a patch I noticed we do this in the SGML docs (for example in indexam.sgml and a bunch of other files): ... some text ... some code ... description of the code. That is, the program listing is in a paragraph that starts immediately before it. I just not

Re: brininsert optimization opportunity

2023-11-25 Thread Tomas Vondra
I've done a bit more cleanup on the last version of the patch (renamed the fields to start with bis_ as agreed, rephrased the comments / docs / commit message a bit) and pushed. Thanks for the patch! -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Test 002_pg_upgrade fails with olddump on Windows

2023-11-25 Thread Alexander Lakhin
Hello, When trying to use a custom dump with the test pg_upgrade/002_pg_upgrade, I observe the following test failure on Windows: >meson test --suite setup >echo create database regression>...\dump.sql >set olddump=...\dump.sql& set oldinstall=.../tmp_install/usr/local/pgsql& meson test pg_upgra

Re: New instability in stats regression test

2023-11-25 Thread Tom Lane
I wrote: > I'm a bit mystified by this. This test was introduced in Andres' > commit 10a082bf7 of 2023-02-11, and it seems to have been stable > since then. I trawled the buildfarm logs going back three months > and found no similar failures. So why's it failing now? The > most plausible theory

New instability in stats regression test

2023-11-25 Thread Tom Lane
In the past few days we've had two buildfarm failures[1][2] in the stats regression test that look like @@ -1582,7 +1582,7 @@ SELECT :io_stats_post_reset < :io_stats_pre_reset; ?column? -- - t + f (1 row) -- test BRIN index doesn't block HOT update I'm a bit mystified by this. T

Re: Table AM Interface Enhancements

2023-11-25 Thread Alexander Korotkov
On Fri, Nov 24, 2023 at 5:18 PM Mark Dilger wrote: > > On Nov 23, 2023, at 4:42 AM, Alexander Korotkov > > wrote: > > > > 0006-Generalize-table-AM-API-for-INSERT-.-ON-CONFLICT-v1.patch > > > > Provides a new table AM API method to encapsulate the whole INSERT ... > > ON CONFLICT ... algorithm ra

Improve rowcount estimate for UNNEST(column)

2023-11-25 Thread Paul A Jungwirth
Hello, Here is a patch to improve rowcount estimates for `UNNEST(some_array_column)`. Today we hard code this to 10, but we have statistics about array size, so it's easy to use them. I've seen plans where this would make a difference. If the array has only 1 or 2 elements, then overestimating th

Re: pg_stats and range statistics

2023-11-25 Thread Alexander Korotkov
On Sat, Nov 25, 2023 at 11:14 AM Egor Rogov wrote: > > Hi Alexander, > > On 25.11.2023 02:06, Alexander Korotkov wrote: > > > > In conclusion of all of the above, I decided to revise the patch and > > show the bounds histogram as it's stored in pg_statistic. I revised > > the docs correspondingly

Re: pg_stats and range statistics

2023-11-25 Thread Alexander Korotkov
you proposed. And I've added to the documentation a short note on how the range length histogram is calculated. -- Regards, Alexander Korotkov 0001-Update-comments-for-pg_statistic-catalog--20231125-2.patch Description: Binary data 0002-Display-length-and-bounds-histograms-in-p-20231125-2.patch Description: Binary data

Re: [HACKERS] Changing references of password encryption to hashing

2023-11-25 Thread Bruce Momjian
On Wed, Nov 22, 2023 at 08:23:42PM -0500, Bruce Momjian wrote: > Let me also add that I apologize for brining up these old threads. I > feel badly I didn't address them years ago, I feel bad for the original > posters, and I do think there is some value in addressing some of them, > which I think

Re: POC, WIP: OR-clause support for indexes

2023-11-25 Thread Alexander Korotkov
On Sat, Nov 25, 2023 at 1:10 PM Alena Rybakina wrote: > On 25.11.2023 04:13, Alexander Korotkov wrote: > > It seems to me there is a confusion. I didn't mean we need to move > conversion of OR-expressions to ANY into choose_bitmap_and() function > or anything like this. My idea was to avoid degr

Re: [HACKERS] Bogus WAL segments archived after promotion

2023-11-25 Thread Bruce Momjian
On Thu, Apr 23, 2015 at 02:57:59PM +0900, Michael Paquier wrote: > Finally looking at that... The commit log of b2a5545 is a bit > misleading. Segment files that were recycled during archive recovery > are not necessarily removed, they could be recycled as well during > promotion on the new timelin

RE: Random pg_upgrade test failure on drongo

2023-11-25 Thread Hayato Kuroda (Fujitsu)
Dear Alexander, > > Please look at the simple test program attached. It demonstrates the > failure for me when running in two sessions as follows: > unlink-open test 150 1000 > unlink-open test2 150 1000 Thanks for attaching a program. This helps us to understand the issue. I wa

Re: pg_upgrade and logical replication

2023-11-25 Thread Amit Kapila
On Sat, Nov 25, 2023 at 7:21 AM vignesh C wrote: > Few comments on v19: == 1. + + The subscriptions will be migrated to the new cluster in a disabled state. + After migration, do this: + + + + + + Enable the subscriptions by executing + A

Re: POC, WIP: OR-clause support for indexes

2023-11-25 Thread Alena Rybakina
On 25.11.2023 04:13, Alexander Korotkov wrote: It seems to me there is a confusion. I didn't mean we need to move conversion of OR-expressions to ANY into choose_bitmap_and() function or anything like this. My idea was to avoid degradation of plans, which I've seen in [1]. Current code for gen

Re: undetected deadlock in ALTER SUBSCRIPTION ... REFRESH PUBLICATION

2023-11-25 Thread Amit Kapila
On Fri, Nov 24, 2023 at 5:05 PM Shlok Kyal wrote: > > > I tried to reproduce the issue and was able to reproduce it with > > scripts shared by Tomas. > > I tried testing it from PG17 to PG 11. This issue is reproducible for > > each version. > > > > Next I would try to test with the patch in the t

Re: pg_stats and range statistics

2023-11-25 Thread Egor Rogov
Hi Alexander, On 25.11.2023 02:06, Alexander Korotkov wrote: In conclusion of all of the above, I decided to revise the patch and show the bounds histogram as it's stored in pg_statistic. I revised the docs correspondingly. So basically we returned to what it all has started from? I guess i

Re: pg_stats and range statistics

2023-11-25 Thread jian he
On Sat, Nov 25, 2023 at 7:06 AM Alexander Korotkov wrote: > > Hi! > Additionally, I found that the current patch can't handle infinite > range bounds and discards information about inclusiveness of range > bounds. The infinite bounds could be represented as NULL (while I'm > not sure how good thi

Re: pg_stats and range statistics

2023-11-25 Thread jian he
On Sat, Nov 25, 2023 at 7:06 AM Alexander Korotkov wrote: > > Hi! > > I'm going to push this if there are no objections. > > -- > Regards, > Alexander Korotkov src/include/catalog/pg_statistic.h 268: * range type's subdiff function. Only non-null rows are considered. should it be: * range