Re: make dist using git archive

2024-03-24 Thread Peter Eisentraut
On 24.03.24 16:42, Tristan Partin wrote: You might find Meson's string formatting syntax creates a more readable command string: 'tar.tar.bz2.command=@0@ -c'.format(bzip2.path()) And then 'install: false' is the default if you feel like leaving it out. Otherwise, let's get this in! Done

Re: Add new error_action COPY ON_ERROR "log"

2024-03-24 Thread Masahiko Sawada
On Wed, Mar 13, 2024 at 11:02 PM Bharath Rupireddy wrote: > > On Wed, Mar 13, 2024 at 11:09 AM Michael Paquier wrote: > > > > Hmm. This NOTICE is really bugging me. It is true that the clients > > would get more information, but the information is duplicated on the > > server side because the

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-24 Thread shveta malik
On Sun, Mar 24, 2024 at 3:06 PM Bharath Rupireddy wrote: > > I've attached the v18 patch set here. Thanks for the patches. Please find few comments: patch 001: 1) slot.h: + /* The time at which this slot become inactive */ + TimestampTz last_inactive_time; become -->became

Re: Improve readability by using designated initializers when possible

2024-03-24 Thread jian he
looking through v4 again. v4 looks good to me.

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-24 Thread Amit Kapila
On Mon, Mar 25, 2024 at 9:48 AM Amit Kapila wrote: > > > Such a test looks reasonable but shall we add equal to in the second > part of the test (like '$last_inactive_time'::timestamptz >= > > '$slot_creation_time'::timestamptz;). This is just to be sure that even if > > the test ran fast enough

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-24 Thread Amit Kapila
On Sun, Mar 24, 2024 at 3:05 PM Bharath Rupireddy wrote: > > On Sun, Mar 24, 2024 at 10:40 AM Amit Kapila wrote: > > > > > For instance, setting last_inactive_time_1 to an invalid value fails > > > with the following error: > > > > > > error running SQL: 'psql::1: ERROR: invalid input syntax

Re: A problem about partitionwise join

2024-03-24 Thread Richard Guo
On Tue, Mar 19, 2024 at 3:40 PM Ashutosh Bapat wrote: > On Tue, Mar 19, 2024 at 8:18 AM Richard Guo > wrote: > >> On Thu, Mar 7, 2024 at 7:13 PM Ashutosh Bapat < >> ashutosh.bapat@gmail.com> wrote: >> >>> Approach >>> >>> The equijoin condition between partition keys doesn't appear

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-03-24 Thread Masahiko Sawada
On Mon, Mar 25, 2024 at 10:13 AM Tom Lane wrote: > > Masahiko Sawada writes: > > On Mon, Mar 25, 2024 at 1:53 AM Tom Lane wrote: > >> I think the point here is that if you start with an arbitrary > >> non-negative shift value, the preceding loop may in fact decrement it > >> down to something

Re: add AVX2 support to simd.h

2024-03-24 Thread John Naylor
On Fri, Mar 22, 2024 at 12:09 AM Nathan Bossart wrote: > > On Thu, Mar 21, 2024 at 11:30:30AM +0700, John Naylor wrote: > > If this were "<=" then the for long arrays we could assume there is > > always more than one block, and wouldn't need to check if any elements > > remain -- first block,

Re: Add Index-level REINDEX with multiple jobs

2024-03-24 Thread Richard Guo
On Mon, Mar 25, 2024 at 10:07 AM Tom Lane wrote: > Alexander Korotkov writes: > > Here goes the revised patch. I'm going to push this if there are no > objections. > > Quite a lot of the buildfarm is complaining about this: > > reindexdb.c: In function 'reindex_one_database': >

Re: Add Index-level REINDEX with multiple jobs

2024-03-24 Thread Tom Lane
Alexander Korotkov writes: > Here goes the revised patch. I'm going to push this if there are no > objections. Quite a lot of the buildfarm is complaining about this: reindexdb.c: In function 'reindex_one_database': reindexdb.c:434:54: error: 'indices_tables_cell' may be used uninitialized in

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2024-03-24 Thread Noah Misch
On Mon, Oct 30, 2023 at 11:29:04AM +0400, Pavel Borisov wrote: > On Wed, 25 Oct 2023 at 00:13, Alexander Korotkov wrote: > > I think this patch is ready to go. I'm going to push it if there are > > no objections. > It's very good that this long-standing patch is finally committed. Thanks a >

Re: Properly pathify the union planner

2024-03-24 Thread David Rowley
On Tue, 12 Mar 2024 at 23:21, David Rowley wrote: > I've attached v3. I spent quite a bit more time looking at this. I discovered that the dNumGroups wasn't being set as it should have been for INTERSECT and EXCEPT queries. There was a plan change as a result of this. I've fixed this by

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-24 Thread Japin Li
On Mon, 25 Mar 2024 at 09:32, Tom Lane wrote: > Japin Li writes: >> /home/japin/postgres/debug/../src/bin/pg_dump/pg_dump_sort.c: In function >> 'repairDependencyLoop': >> /home/japin/postgres/debug/../src/bin/pg_dump/pg_dump_sort.c:1276:3: error: >> format not a string literal and no format

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-24 Thread Tom Lane
Japin Li writes: > /home/japin/postgres/debug/../src/bin/pg_dump/pg_dump_sort.c: In function > 'repairDependencyLoop': > /home/japin/postgres/debug/../src/bin/pg_dump/pg_dump_sort.c:1276:3: error: > format not a string literal and no format arguments [-Werror=format-security] > 1276 |

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-03-24 Thread Tom Lane
John Naylor writes: > Hmm, before 30e144287 this code only ran in a test module, is it > possible Coverity would not find it there? That could indeed explain why Coverity didn't see it. I'm not sure how our community run is set up, but it may not build the test modules.

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-24 Thread Japin Li
On Sat, 23 Mar 2024 at 01:22, Japin Li wrote: > On Sat, 23 Mar 2024 at 01:04, Tom Lane wrote: >> Japin Li writes: >>> When I try to configure PostgreSQL 16.2 on Illumos using the following >>> command, >>> it complains $subject. >> >>> ./configure --enable-cassert --enable-debug

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-03-24 Thread John Naylor
On Mon, Mar 25, 2024 at 8:02 AM Masahiko Sawada wrote: > > On Mon, Mar 25, 2024 at 1:53 AM Tom Lane wrote: > > > > I'm not sure why it took a couple weeks for Coverity to notice > > ee1b30f12, but it saw it today, and it's not happy: > > Hmm, I've also done Coverity Scan in development but I

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-03-24 Thread Tom Lane
Masahiko Sawada writes: > On Mon, Mar 25, 2024 at 1:53 AM Tom Lane wrote: >> I think the point here is that if you start with an arbitrary >> non-negative shift value, the preceding loop may in fact decrement it >> down to something less than zero before exiting, in which case we >> would indeed

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-03-24 Thread Masahiko Sawada
On Mon, Mar 25, 2024 at 1:53 AM Tom Lane wrote: > > John Naylor writes: > > Done. I pushed this with a few last-minute cosmetic adjustments. This > > has been a very long time coming, but we're finally in the home > > stretch! Thank you for the report. > > I'm not sure why it took a couple

Re: Adding OLD/NEW support to RETURNING

2024-03-24 Thread jian he
On Mon, Mar 18, 2024 at 6:48 PM Dean Rasheed wrote: > > On Tue, 12 Mar 2024 at 18:21, Dean Rasheed wrote: > > > > Updated version attached tidying up a couple of things and fixing another > > bug: > > > > Rebased version attached, on top of c649fa24a4 (MERGE ... RETURNING support). > hi, some

Re: Built-in CTYPE provider

2024-03-24 Thread Jeff Davis
On Sun, 2024-03-24 at 14:00 +0300, Alexander Lakhin wrote: > Please look at a Valgrind-detected error caused by the following > query > (starting from f69319f2f): > SELECT lower('Π' COLLATE pg_c_utf8); Thank you for the report! Fixed in 503c0ad976. Valgrind did not detect the problem in my

Re: Streaming I/O, vectored I/O (WIP)

2024-03-24 Thread Thomas Munro
On Mon, Mar 25, 2024 at 6:30 AM Melanie Plageman wrote: > I haven't reviewed the whole patch, but as I was rebasing > bitmapheapscan streaming read user, I found callback_private confusing > because it seems like it is a private callback, not private data > belonging to the callback. Perhaps call

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-24 Thread Melanie Plageman
On Sun, Mar 24, 2024 at 5:59 PM Tomas Vondra wrote: > > BTW when you say "up to 'Make table_scan_bitmap_next_block() async > friendly'" do you mean including that patch, or that this is the first > patch that is not one of the independently useful patches. I think the code is easier to

Re: add AVX2 support to simd.h

2024-03-24 Thread Nathan Bossart
On Sun, Mar 24, 2024 at 03:53:17PM -0500, Nathan Bossart wrote: > Here's a new version of 0001 with some added #ifdefs that cfbot revealed > were missing. Sorry for the noise. cfbot revealed another silly mistake (forgetting to reset the "i" variable in the assertion path). That should be fixed

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-24 Thread Tomas Vondra
On 3/24/24 21:12, Melanie Plageman wrote: > On Sun, Mar 24, 2024 at 2:22 PM Tomas Vondra > wrote: >> >> On 3/24/24 18:38, Melanie Plageman wrote: >>> I haven't had a chance yet to reproduce the regressions you saw in the >>> streaming read user patch or to look closely at the performance results.

Re: add AVX2 support to simd.h

2024-03-24 Thread Nathan Bossart
Here's a new version of 0001 with some added #ifdefs that cfbot revealed were missing. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From cc2bc5ca5b49cd8641af8b2231a34a1aa5091bb9 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 20 Mar 2024 14:20:24 -0500 Subject: [PATCH

Re: SET ROLE documentation improvement

2024-03-24 Thread Nathan Bossart
On Sat, Mar 23, 2024 at 08:37:20AM -0400, Robert Haas wrote: > On Fri, Mar 22, 2024 at 4:51 PM Nathan Bossart > wrote: >> Actually, shouldn't this one be back-patched to v16? If so, I'd do that >> one separately from the other changes we are discussing. > > Sure, that seems fine. Committed

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-24 Thread Melanie Plageman
On Sun, Mar 24, 2024 at 2:22 PM Tomas Vondra wrote: > > On 3/24/24 18:38, Melanie Plageman wrote: > > I haven't had a chance yet to reproduce the regressions you saw in the > > streaming read user patch or to look closely at the performance results. > > So you tried to reproduce it and didn't hit

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-24 Thread Melanie Plageman
On Sat, Mar 23, 2024 at 01:09:30AM +0200, Heikki Linnakangas wrote: > On 20/03/2024 21:17, Melanie Plageman wrote: > > Attached patch changes-for-0001.patch has a bunch of updated comments -- > > especially for heapam_xlog.h (including my promised diagram). And a few > > suggestions (mostly

Re: pg_dump versus enum types, round N+1

2024-03-24 Thread Tom Lane
Andrew Dunstan writes: > On Sat, Mar 23, 2024 at 3:00 PM Tom Lane wrote: >> So I'm glad we found that sooner not later, but something needs >> to be done about it if [1] is to get committed. It doesn't seem >> particularly hard to fix though: we just have to track the enum >> type OIDs made in

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-24 Thread Tomas Vondra
On 3/24/24 18:38, Melanie Plageman wrote: > On Sun, Mar 24, 2024 at 01:36:19PM +0100, Tomas Vondra wrote: >> >> >> On 3/23/24 01:26, Melanie Plageman wrote: >>> On Fri, Mar 22, 2024 at 08:22:11PM -0400, Melanie Plageman wrote: On Tue, Mar 19, 2024 at 02:33:35PM +0200, Heikki Linnakangas

Re: Streaming I/O, vectored I/O (WIP)

2024-03-24 Thread Melanie Plageman
On Sun, Mar 24, 2024 at 9:02 AM Thomas Munro wrote: > > On Wed, Mar 20, 2024 at 4:04 AM Heikki Linnakangas wrote: > > On 12/03/2024 15:02, Thomas Munro wrote: > > > src/backend/storage/aio/streaming_read.c > > > src/include/storage/streaming_read.h > > > > Standard file header comments missing.

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-03-24 Thread Tom Lane
John Naylor writes: > Done. I pushed this with a few last-minute cosmetic adjustments. This > has been a very long time coming, but we're finally in the home > stretch! I'm not sure why it took a couple weeks for Coverity to notice ee1b30f12, but it saw it today, and it's not happy:

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-24 Thread Melanie Plageman
On Thu, Mar 21, 2024 at 9:28 AM Heikki Linnakangas wrote: > > In heap_page_prune_and_freeze(), we now do some extra work on each live > tuple, to set the all_visible_except_removable correctly. And also to > update live_tuples, recently_dead_tuples and hastup. When we're not > freezing, that's a

Re: make dist using git archive

2024-03-24 Thread Tristan Partin
3 comments left that are inconsequential. Feel free to ignore. +# Meson has its own distribution building command (meson dist), but we +# are not using that at this point. The main problem is that the way +# they have implemented it, it is not deterministic. Also, we want it +# to be

Re: Sync scan & regression tests

2024-03-24 Thread Tom Lane
Heikki Linnakangas writes: > On 19/09/2023 01:57, Andres Freund wrote: >> On 2023-09-18 13:49:24 +0300, Heikki Linnakangas wrote: >>> d) Copy fewer rows to the table in the test. If we copy only 6 rows, for >>> example, the table will have only two pages, regardless of shared_buffers. >>> >>>

Re: pg_stat_statements and "IN" conditions

2024-03-24 Thread Yasuo Honda
Thanks for the information. I can apply these 4 patches from 0eb23285a2 . I tested this branch from Ruby on Rails and it gets some unexpected behavior from my point of view. Setting pg_stat_statements.query_id_const_merge_threshold = 5 does not normalize sql queries whose number of in clauses

Re: Extension for PostgreSQL WIP

2024-03-24 Thread David G. Johnston
On Sun, Mar 24, 2024 at 5:49 AM ShadowGhost wrote: > Cast_jsonb_to_hstore WIP > v1 > This extension add function that can cast jsonb to hstore. > That link to my github where does my extension lie > https://github.com/antuanviolin/cast_jsonb_to_hstore > If you are intending to submit this to

Re: Streaming I/O, vectored I/O (WIP)

2024-03-24 Thread Thomas Munro
On Wed, Mar 20, 2024 at 4:04 AM Heikki Linnakangas wrote: > On 12/03/2024 15:02, Thomas Munro wrote: > > src/backend/storage/aio/streaming_read.c > > src/include/storage/streaming_read.h > > Standard file header comments missing. Fixed. > It would be nice to have a comment at the top of

Extension for PostgreSQL WIP

2024-03-24 Thread ShadowGhost
Cast_jsonb_to_hstore WIP v1 This extension add function that can cast jsonb to hstore. That link to my github where does my extension lie https://github.com/antuanviolin/cast_jsonb_to_hstore

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-24 Thread Tomas Vondra
On 3/23/24 01:26, Melanie Plageman wrote: > On Fri, Mar 22, 2024 at 08:22:11PM -0400, Melanie Plageman wrote: >> On Tue, Mar 19, 2024 at 02:33:35PM +0200, Heikki Linnakangas wrote: >>> On 18/03/2024 17:19, Melanie Plageman wrote: I've attached v7 rebased over this commit. >>> >>> If we

Re: make dist using git archive

2024-03-24 Thread Peter Eisentraut
On 22.03.24 18:29, Tristan Partin wrote: On Thu Mar 21, 2024 at 3:44 AM CDT, Peter Eisentraut wrote: Here is an updated version of this patch set. You should add 'disabler: true' to the git find_program in Meson. If Git doesn't exist on the system with the way your patch is currently

Re: Built-in CTYPE provider

2024-03-24 Thread Alexander Lakhin
Hello Jeff, 21.03.2024 03:13, Jeff Davis wrote: On Tue, 2024-03-19 at 13:41 +0100, Peter Eisentraut wrote: * v25-0002-Support-C.UTF-8-locale-in-the-new-builtin-collat.patch Looks ok. Committed. Please look at a Valgrind-detected error caused by the following query (starting from

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-24 Thread Bharath Rupireddy
On Sun, Mar 24, 2024 at 10:40 AM Amit Kapila wrote: > > > For instance, setting last_inactive_time_1 to an invalid value fails > > with the following error: > > > > error running SQL: 'psql::1: ERROR: invalid input syntax for > > type timestamp with time zone: "foo" > > LINE 1: SELECT

Re: SQL:2011 application time

2024-03-24 Thread Peter Eisentraut
On 23.03.24 18:42, Paul Jungwirth wrote: Now this is a long chain of reasoning to say rangetypes are safe. I added a comment. Note it doesn't apply to arbitrary types, so if we support those eventually we should just require a recheck always, or alternately use equals, not containedby. (That