Re: plperl version on the meson setup summary screen

2024-11-28 Thread Zharkov Roman
Hello, On 2024-11-27 21:50, Andrew Dunstan wrote: it should give the same answer Sometimes "version" and "api_versionstring" are different. Here are two simple examples from my windows system and from a linux system of one of my colleagues: C:\Temp>perl -MConfig -e "print \"$Config{api_ver

Re: Converting SetOp to read its two inputs separately

2024-11-28 Thread David Rowley
On Wed, 20 Nov 2024 at 15:09, Tom Lane wrote: > Once I'd wrapped my head around how things are done now (which the > comments in prepunion.c were remarkably unhelpful about), I saw that > most of the problem for #2 just requires re-ordering things that > generate_nonunion_paths was already doing.

RE: Rework subscription-related code for psql and pg_dump

2024-11-28 Thread Hayato Kuroda (Fujitsu)
Dear Michael, Thanks for working on this. It was not good to follow existing codes without confirmation :-(. I grepped files in bin/ and could not find lines which includes catalog/pg_xxx.h files. (One exception is pg_control.h. It is not a catalog-header but has the same prefix.) The patch bas

Re: Отв.: Re: UUID v7

2024-11-28 Thread Masahiko Sawada
On Thu, Nov 28, 2024 at 8:13 PM Sergey Prokhorenko wrote: > > I mean to add not benchmark results to the patch, but functions so that > everyone can compare themselves on their equipment. The comparison with > UUIDv4 is not very interesting, as the choice is usually between UUIDv7 and > an inte

Re: relfilenode statistics

2024-11-28 Thread Kirill Reshke
On Tue, 5 Nov 2024 at 11:06, Bertrand Drouvot wrote: > > > Does it sound ok to you to move with the above principal? (I'm +1 on it). > Hi! I looked through this thread. Looks like we are still awaiting a patch which stores more counters (n_dead_tup, ... etc) into relfilenode stats. So, I assume t

Отв.: Re: UUID v7

2024-11-28 Thread Sergey Prokhorenko
I mean to add not benchmark results to the patch, but functions so that everyone can compare themselves on their equipment. The comparison with UUIDv4 is not very interesting, as the choice is usually between UUIDv7 and an integer key. And I have described many use cases, and in your benchmark t

Re: Отв.: Re: UUID v7

2024-11-28 Thread Kirill Reshke
On Fri, 29 Nov 2024, 09:14 Sergey Prokhorenko, < sergeyprokhore...@yahoo.com.au> wrote: > I mean to add not benchmark results to the patch, but functions so that > everyone can compare themselves on their equipment. The comparison with > UUIDv4 is not very interesting, as the choice is usually bet

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-11-28 Thread Michael Paquier
On Thu, Nov 28, 2024 at 11:32:59PM +0500, Andrey M. Borodin wrote: > Michael, we have 30 tests with checks that need injection > points. But these 30 tests also test functionality that needs to be > tested even in build without injection points. > Do we have to extract checks with injection point

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

2024-11-28 Thread Alena Rybakina
On 29.11.2024 03:04, Alexander Korotkov wrote: On Thu, Nov 28, 2024 at 9:33 PM Alena Rybakina wrote: On 28.11.2024 22:28, Ranier Vilela wrote: Em qui., 28 de nov. de 2024 às 16:03, Alena Rybakina escreveu: Hi! Thank you for the case. On 28.11.2024 21:00, Alexander Lakhin wrote: Hello Alex

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread songjinzhou
> This sort of stuff is best addressed by running the code through > pgindent, rather than fixing it manually. Usually we don't insist > on submitters getting it right; the committer should pgindent it. Hello, thank you and David Rowley for your comments.  I have used pgindent to adjust the

Re: Use streaming read API in pgstattuple.

2024-11-28 Thread Nazir Bilal Yavuz
Hi, > Hello! Thank you for taking a peek. Your review comments have been > corrected. Since my changes were wrong, I honestly don't know why this > worked in version 1. By a miracle. > > As for CI, i rechecked v1: > > ``` > db2=# > select * from pgstathashindex('test_hashidx'); > version | bucket

Re: Remove useless GROUP BY columns considering unique index

2024-11-28 Thread jian he
On Fri, Nov 29, 2024 at 2:36 PM Andrei Lepikhov wrote: > > > I forgot to do a local commit before sending v8. Fixed in the attached v9. > 1. Thread reference in the patch comment doesn't work. fixed. I found that unique expression index can also be used for groupby column removal. so I implemente

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

2024-11-28 Thread Alexander Korotkov
On Fri, Nov 29, 2024 at 7:51 AM Alena Rybakina wrote: > > On 29.11.2024 03:04, Alexander Korotkov wrote: > > On Thu, Nov 28, 2024 at 9:33 PM Alena Rybakina > > wrote: > >> On 28.11.2024 22:28, Ranier Vilela wrote: > >> > >> Em qui., 28 de nov. de 2024 às 16:03, Alena Rybakina > >> escreveu: > >

Re: Strange assertion in procarray.c

2024-11-28 Thread Michael Paquier
On Thu, Nov 28, 2024 at 09:04:36PM +0100, Michail Nikolaev wrote: > I discovered that a similar issue was previously addressed by Heikki in > commit [0], where installcheck was disabled for injection point tests. > However, in the meson build configuration, this was only applied to > regression tes

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

2024-11-28 Thread Andrei Lepikhov
On 11/29/24 07:04, Alexander Korotkov wrote: On Thu, Nov 28, 2024 at 9:33 PM Alena Rybakina I slightly revised the fix and added similar check to group_similar_or_args(). Could you, please, review that before commit? LGTM, As I see, we didn't pay attention to this option from the beginning. Th

Re: crash with synchronized_standby_slots

2024-11-28 Thread Amit Kapila
On Thu, Nov 28, 2024 at 5:54 PM Alvaro Herrera wrote: > > Gabriele just reported a crash when changing synchronized_standby_slots > under SIGHUP and logging collector working. The problem apparently is > that validate_sync_standby_slots is run for the GUC check routine, and > it requires acquirin

Rework subscription-related code for psql and pg_dump

2024-11-28 Thread Michael Paquier
Hi all, While looking at some of the code related to subscriptions in psql, coming down to make LOGICALREP_STREAM_* available for client code, I've also noticed quite a few inconsistencies and mistakes with how pg_subscription is handled in pg_dump, that have accumulated over the years as of what

Re: Remove useless GROUP BY columns considering unique index

2024-11-28 Thread Andrei Lepikhov
On 11/29/24 09:39, David Rowley wrote: On Fri, 29 Nov 2024 at 15:02, David Rowley wrote: I've attached an updated patch that gets rid of the get_unique_not_null_attnos() function completely and uses the RelOptInfo.indexlist and RelOptInfo.notnullattnums. I forgot to do a local commit before s

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-28 Thread Amit Langote
On Wed, Nov 27, 2024 at 12:53 AM Alvaro Herrera wrote: > On 2024-Nov-20, Amit Langote wrote: > > On Tue, Nov 19, 2024 at 6:41 PM Alvaro Herrera > > wrote: > > > Here's an example that I think matches the above description, which, > > ISTM, leads to a state similar to what one would encounter wit

Re: Remove useless GROUP BY columns considering unique index

2024-11-28 Thread David Rowley
On Fri, 29 Nov 2024 at 19:36, Andrei Lepikhov wrote: > 1. Thread reference in the patch comment doesn't work. > 2. May it be possible to move remove_useless_groupby_columns in the > second commit? It would be easier to review the differences. For #1, I rewrote the commit message. I've split into

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

2024-11-28 Thread vignesh C
On Fri, 22 Nov 2024 at 17:43, vignesh C wrote: > > On Thu, 21 Nov 2024 at 17:35, Nisha Moond wrote: > > > > On Wed, Nov 20, 2024 at 1:29 PM vignesh C wrote: > > > > > > On Tue, 19 Nov 2024 at 12:43, Nisha Moond > > > wrote: > > > > > > > > Attached is the v49 patch set: > > > > - Fixed the bug

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-11-28 Thread Kirill Reshke
On Thu, 28 Nov 2024 at 10:52, Tom Lane wrote: > No, I don't think this should be part of the patch discussed in this > thread. Ok, I created a separate thread for this. How about this one? Do you think the suggested idea is good? Is it worthwhile to do this, in your opinion? -- Best regards,

Re: Adding OLD/NEW support to RETURNING

2024-11-28 Thread Dean Rasheed
On Tue, 29 Oct 2024 at 13:05, Dean Rasheed wrote: > > Rebased version attached. No other changes. > In the light of 7f798aca1d5df290aafad41180baea0ae311b4ee, I guess I should remove various (void *) casts that this patch adds, copied from old code. I'll wait a while though, just in case the build

crash with synchronized_standby_slots

2024-11-28 Thread Alvaro Herrera
Hello, Gabriele just reported a crash when changing synchronized_standby_slots under SIGHUP and logging collector working. The problem apparently is that validate_sync_standby_slots is run for the GUC check routine, and it requires acquiring an LWLock; but syslogger doesn't have a PGPROC so that

Re: Add Pipelining support in psql

2024-11-28 Thread Jelte Fennema-Nio
On Thu, 28 Nov 2024 at 07:43, Michael Paquier wrote: > Hmm. The start, end and sync meta-commands are useful for testing. I > find the flush control a bit less interesting, TBH. > > What would you use these for? I guess mostly for interactively playing around with pipelining from psql. But I t

Re: Add Pipelining support in psql

2024-11-28 Thread Anthonin Bonnefoy
On Wed, Nov 27, 2024 at 11:46 AM Kirill Reshke wrote: > I'm very doubtful about the \syncpipeline . Maybe we should instead > support \sync meta-command in psql? This will be a useful contribution > itself. \syncpipeline is useful to cover regression tests involving implicit transaction blocks wi

Pass ParseState as down to utility functions.

2024-11-28 Thread Kirill Reshke
Hi hackers! PFA patch fixing a number of places where typenameType called with NULL pstate. === motivation. Per discussion in a nearby thread for `CREATE SCHEMA ... CREATE DOMAIN support`. Suggested by Jian He & Tom Lane. On Thu, 28 Nov 2024 at 10:52, Tom Lane wrote: > > Kirill Reshke writes:

Re: Virtual generated columns

2024-11-28 Thread Peter Eisentraut
On 12.11.24 17:08, Peter Eisentraut wrote: On 11.11.24 12:37, jian he wrote: On Wed, Nov 6, 2024 at 12:17 AM Peter Eisentraut wrote: New patch version.  I've gone through the whole thread again and looked at all the feedback and various bug reports and test cases and made sure they are all ad

Re: More CppAsString2() in psql's describe.c

2024-11-28 Thread Daniel Gustafsson
> On 28 Nov 2024, at 07:34, Michael Paquier wrote: > > On Tue, Oct 22, 2024 at 09:49:10AM +0900, Michael Paquier wrote: >> Note that there were a couple of value checks not part of the queries >> that relied on values from the catalogs for some relpersistences and >> replidents. I've fixed them

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-11-28 Thread Junwang Zhao
On Thu, Nov 28, 2024 at 2:16 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Wed, 27 Nov 2024 19:49:17 +0800, > Junwang Zhao wrote: > > > I just gave this another round of benchmarking tests. I'd like to > > share the nu

Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY

2024-11-28 Thread Amit Kapila
On Thu, Nov 21, 2024 at 5:30 PM Shlok Kyal wrote: > Review comments: === 1. + + /* + * true if all generated columns which are part of replica identity are + * published or the publication actions do not include UPDATE or DELETE. + */ + bool replident_valid_for_update; + bool repliden

Re: [Feature Request] Schema Aliases and Versioned Schemas

2024-11-28 Thread Ashutosh Bapat
On Wed, Nov 27, 2024 at 8:45 PM AbdelAziz Sharaf wrote: > > Dear PostgreSQL Development Team, > > I’d like to propose a new feature for consideration: schema aliases and > versions > > **Problem Statement:** > For migrating old db to new one, one must use an external tool or define a > dedicated

Re: tab_complete for copy(merge

2024-11-28 Thread Peter Eisentraut
On 19.11.24 14:23, jian he wrote: On Tue, Nov 19, 2024 at 5:20 PM Kirill Reshke wrote: On Tue, 19 Nov 2024, 14:08 jian he, wrote: in v17, we support COPY(MERGE RETURNING) we can add tab_complete for it. Sounds sane /* Complete COPY ( with legal query commands */ else if (Matche

Re: Difference in dump from original and restored database due to NOT NULL constraints on children

2024-11-28 Thread Ashutosh Bapat
On Wed, Nov 27, 2024 at 7:04 PM Alvaro Herrera wrote: > > On 2024-Nov-27, Ashutosh Bapat wrote: > > > I noticed that. But two reasons why I chose the backend changes > > 1. The comment where we add explicit ADD CONSTRAINT is > > /* > > * Dump additional per-column properties that we can't handle i

Re: Difference in dump from original and restored database due to NOT NULL constraints on children

2024-11-28 Thread Ashutosh Bapat
On Thu, Nov 28, 2024 at 4:44 PM Ashutosh Bapat wrote: > > On Wed, Nov 27, 2024 at 7:04 PM Alvaro Herrera > wrote: > > > > On 2024-Nov-27, Ashutosh Bapat wrote: > > > > > I noticed that. But two reasons why I chose the backend changes > > > 1. The comment where we add explicit ADD CONSTRAINT is >

Re: [PATCH] kNN for btree

2024-11-28 Thread Kirill Reshke
On Wed, 31 Jul 2024 at 09:46, Anton A. Melnikov wrote: > > Hi! > > Rebased existing patch on current master to have an actual working version. > There is an inconsistency with commit 5bf748b86. > > Reproduction: > CREATE TABLE test (a int4); > INSERT INTO test VALUES (2), (3); > CREATE INDEX test_

Re: Remove useless GROUP BY columns considering unique index

2024-11-28 Thread jian he
On Thu, Nov 28, 2024 at 2:11 PM David Rowley wrote: > > I think it'll make more sense to adjust some of the > existing tests to use a unique constraint instead of a PK and then > adjust a column's NOT NULL property to check that part of the code is > working correctly. > looking around, i insert

Re: Make pg_stat_io view count IOs as bytes instead of blocks

2024-11-28 Thread Bertrand Drouvot
Hi, On Wed, Nov 27, 2024 at 11:08:01AM -0500, Melanie Plageman wrote: > On Wed, Sep 11, 2024 at 7:19 AM Nazir Bilal Yavuz wrote: > > > > Currently, in the pg_stat_io view, IOs are counted as blocks. However, > > there are two issues with this approach: > > > > 1- The actual number of IO requests

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread David Rowley
On Fri, 29 Nov 2024 at 06:25, 孤傲小二~阿沐 wrote: > Hello, thank you very much for your attention and guidance. I have modified > and improved the problem you mentioned. The patch of version v2 is attached > below. I've only had a quick look at the patch. * The following needs a DatumGetFloat8():

Re: Enhancing Memory Context Statistics Reporting

2024-11-28 Thread Rahila Syed
Hi Tomas, Thank you for the review. > > > 1) I read through the thread, and in general I agree with the reasoning > for removing the file part - it seems perfectly fine to just dump as > much as we can fit into a buffer, and then summarize the rest. But do we > need to invent a "new" limit here?

Re: Enhancing Memory Context Statistics Reporting

2024-11-28 Thread Tomas Vondra
On 11/29/24 00:23, Rahila Syed wrote: > Hi Tomas, > > Thank you for the review. > > > > 1) I read through the thread, and in general I agree with the reasoning > for removing the file part - it seems perfectly fine to just dump as > much as we can fit into a buffer, and then summari

Re: More CppAsString2() in psql's describe.c

2024-11-28 Thread Tom Lane
Daniel Gustafsson writes: > On 28 Nov 2024, at 19:25, Corey Huinker wrote: >>> I sort of wish we had a shorter macro as CppAsString2() get's pretty verbose >>> when used frequently like this. >> I don't quite understand the etymology of the name (it's some variation on >> C++'s std::to_string,

Re: Changing shared_buffers without restart

2024-11-28 Thread Matthias van de Meent
On Thu, 28 Nov 2024 at 19:57, Tom Lane wrote: > > Matthias van de Meent writes: > > On Thu, 28 Nov 2024 at 18:19, Robert Haas wrote: > >> [...] It's unclear to me why > >> operating systems don't offer better primitives for this sort of thing > >> -- in theory there could be a system call that s

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-11-28 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Thu, 28 Nov 2024 19:02:57 +0800, Junwang Zhao wrote: >> > I tested 3 branches: >> > >> > 1. the master branch >> > 2. all v26 patch sets applied >> > 3. Emitting JSON to file using COPY TO v13 patch set[1],

Re: Remove useless GROUP BY columns considering unique index

2024-11-28 Thread jian he
minor changes in get_unique_not_null_attnos: * cosmetic changes * if the returned list length is less than 2, no need sort. From 58094504364d8a9eb51cbc77a75626aef39b17f0 Mon Sep 17 00:00:00 2001 From: jian he Date: Fri, 29 Nov 2024 09:23:27 +0800 Subject: [PATCH v7 1/1] remove useless group by co

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread Tom Lane
David Rowley writes: > Also a few minor things: > * Missing space after "if" > + if(arg3) > * We always have an empty line after variable declarations, that's missing in: > + NumericVar q; > + init_var(&q); This sort of stuff is best addressed by running the code through pgindent, rather than fix

Re: CI CompilerWarnings test fails on 15 in mingw_cross_warning

2024-11-28 Thread Thomas Munro
Pushed. CI is finally returned to its full verdant splendour in the back-branches.

Re: More CppAsString2() in psql's describe.c

2024-11-28 Thread Michael Paquier
On Thu, Nov 28, 2024 at 10:40:35AM +0100, Daniel Gustafsson wrote: > LGTM, I didn't scan for omissions but the ones in the patch look right to me. > I sort of wish we had a shorter macro as CppAsString2() get's pretty verbose > when used frequently like this. Thanks for the reviews, applied what I

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

2024-11-28 Thread Alexander Korotkov
On Thu, Nov 28, 2024 at 9:33 PM Alena Rybakina wrote: > > On 28.11.2024 22:28, Ranier Vilela wrote: > > Em qui., 28 de nov. de 2024 às 16:03, Alena Rybakina > escreveu: >> >> Hi! Thank you for the case. >> >> On 28.11.2024 21:00, Alexander Lakhin wrote: >> > Hello Alexander, >> > >> > 21.11.2024

Re: Truncate logs by max_log_size

2024-11-28 Thread Jim Jones
On 28.11.24 20:20, Kirill Gavrilov wrote: >   Here is version 3 of this patch. I found another place where this > setting can be applied.  >   Also added some documentation and specified that this setting > truncates queries by size in bytes. Thanks. It is now possible to change the parameter u

Re: Changing shared_buffers without restart

2024-11-28 Thread Tom Lane
Matthias van de Meent writes: > I mean, we can do the following to get a nice contiguous empty address > space no other mmap(NULL)s will get put into: > /* reserve size bytes of memory */ > base = mmap(NULL, size, PROT_NONE, ...flags, ...); > /* use the first small_size bytes of that

Re: Remove an unnecessary check on semijoin_target_ok() on postgres_fdw.c

2024-11-28 Thread Tender Wang
Alexander Pyhalov 于2024年11月29日周五 00:02写道: > Tender Wang писал(а) 2024-10-09 10:26: > > Hi, > >When I debug FDW join pushdown codes, I found below codes in > > semijoin_target_ok(): > > if (bms_is_member(var->varno, innerrel->relids) && > > > > !bms_is_member(var->varno, outerrel->

Re: Remove useless GROUP BY columns considering unique index

2024-11-28 Thread David Rowley
On Fri, 29 Nov 2024 at 01:33, jian he wrote: > > On Thu, Nov 28, 2024 at 2:11 PM David Rowley wrote: > > I think it'll make more sense to adjust some of the > > existing tests to use a unique constraint instead of a PK and then > > adjust a column's NOT NULL property to check that part of the cod

Memory leak in WAL sender with pgoutput (v10~)

2024-11-28 Thread Michael Paquier
Hi all, This is a follow-up of ea792bfd93ab and this thread where I've noticed that some memory was still leaking when running sysbench with a logical replication setup: https://www.postgresql.org/message-id/zz7srcbxxhoyn...@paquier.xyz Reproducing the problem is quite simple, and can be done wit

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

2024-11-28 Thread vignesh C
On Wed, 27 Nov 2024 at 16:25, Nisha Moond wrote: > > On Wed, Nov 27, 2024 at 8:39 AM Peter Smith wrote: > > > > Hi Nisha, > > > > Here are some review comments for the patch v50-0002. > > > > == > > src/backend/replication/slot.c > > > > InvalidatePossiblyObsoleteSlot: > > > > 1. > > + if (no

Re: [PATCH] SVE popcount support

2024-11-28 Thread Kirill Reshke
On Thu, 28 Nov 2024 at 20:22, Malladi, Rama wrote: > > Attachments protected by Amazon: 0001-SVE-popcount-support.patch | > SVE-popcount-support-PostgreSQL.png | > Amazon has replaced the attachments in this email with download links. > Downloads will be available until December 27, 2024, 15:43

Re: Fix comment in reorderbuffer.h

2024-11-28 Thread Daniel Gustafsson
> On 28 Nov 2024, at 15:14, vignesh C wrote: > > On Thu, 28 Nov 2024 at 06:40, Peter Smith wrote: >> >> Hi, while reviewing another patch I noticed a poorly worded code comment. >> >> Please find the attached trivial fix. > > I agree with this finding, the patch looks good to me. Agreed, and

Re: Truncate logs by max_log_size

2024-11-28 Thread Jim Jones
On 25.11.24 17:52, Kirill Reshke wrote: > Hello! Please deliver the most recent patch version and fix the issues > Jim identified [0] as the current commitfest draws to a close. > Do not forget to include both parts of this patch (This was actually > developed off-list, and we are now using this

[PATCH] SVE popcount support

2024-11-28 Thread Malladi, Rama
Attachments protected by Amazon: [0001-SVE-popcount-support.patch] https://us-west-2.secure-attach.amazon.com/a29c9ff9-1f9b-430f-9b3c-07fde9a419aa/f9178627-0600-4527-bc5c-7e4cb9ef6e9a [SVE-popcount-support-PostgreSQL.png] https://us-west-2.secure-attach.amazon.com/a29c9ff9-1f9b-430f-9b3c-07fde9a41

Re: Useless field ispartitioned in CreateStmtContext

2024-11-28 Thread Kirill Reshke
On Tue, 5 Nov 2024 at 16:51, hugo <2689496...@qq.com> wrote: > > Hi, Kirill > > Sorry for the late reply, thanks for your suggestion. > A simple fix has been added to the attached patch. > > -- > hugo > Hi! This field is actually used after 14e87ff. Just like Álvaro stated in [0] Patch status is

Re: Changing shared_buffers without restart

2024-11-28 Thread Robert Haas
On Thu, Nov 28, 2024 at 11:30 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > on Linux, this fact is already used in the patch. The idea that we could put > upper boundary on the size of other mappings based on total available memory > comes from the fact that anonymous mappings, that are much la

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread 孤傲小二~阿沐
Hello, thank you very much for your attention and guidance. I have modified and improved the problem you mentioned. The patch of version v2 is attached below.  Regarding regression testing, I implemented it with the help of some facilities of generate_series_timestamp_support last time. Everyt

Re: Truncate logs by max_log_size

2024-11-28 Thread Kirill Gavrilov
On Thu, Nov 28, 2024 at 5:23 PM Jim Jones wrote: > > > On 25.11.24 17:52, Kirill Reshke wrote: > > Hello! Please deliver the most recent patch version and fix the issues > > Jim identified [0] as the current commitfest draws to a close. > > Do not forget to include both parts of this patch (This

Re: More CppAsString2() in psql's describe.c

2024-11-28 Thread Daniel Gustafsson
> On 28 Nov 2024, at 19:25, Corey Huinker wrote: >> LGTM, I didn't scan for omissions but the ones in the patch look right to me. >> I sort of wish we had a shorter macro as CppAsString2() get's pretty verbose >> when used frequently like this. > > I don't quite understand the etymology of the n

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

2024-11-28 Thread Ranier Vilela
Em qui., 28 de nov. de 2024 às 16:03, Alena Rybakina < a.rybak...@postgrespro.ru> escreveu: > Hi! Thank you for the case. > > On 28.11.2024 21:00, Alexander Lakhin wrote: > > Hello Alexander, > > > > 21.11.2024 09:34, Alexander Korotkov wrote: > >> I'm going to push this if no objections. > > > >

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

2024-11-28 Thread Alena Rybakina
On 28.11.2024 22:28, Ranier Vilela wrote: Em qui., 28 de nov. de 2024 às 16:03, Alena Rybakina escreveu: Hi! Thank you for the case. On 28.11.2024 21:00, Alexander Lakhin wrote: > Hello Alexander, > > 21.11.2024 09:34, Alexander Korotkov wrote: >> I'm going to push thi

Re: Fix comment in reorderbuffer.h

2024-11-28 Thread vignesh C
On Thu, 28 Nov 2024 at 06:40, Peter Smith wrote: > > Hi, while reviewing another patch I noticed a poorly worded code comment. > > Please find the attached trivial fix. I agree with this finding, the patch looks good to me. Regards, Vignesh

Re: Changing shared_buffers without restart

2024-11-28 Thread Dmitry Dolgov
> On Wed, Nov 27, 2024 at 04:05:47PM GMT, Robert Haas wrote: > On Wed, Nov 27, 2024 at 3:48 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > My understanding is that clashing of mappings (either at creation time > > or when resizing) could happen only withing the process address space, > > and t

Re: Using read stream in autoprewarm

2024-11-28 Thread Matheus Alcantara
On Wednesday, November 27th, 2024 at 11:19 AM, Nazir Bilal Yavuz wrote: > > v2-0001-Use-read-stream-in-autoprewarm.patch > > + bool *rs_have_free_buffer = per_buffer_data; > > + > > + > > + *rs_have_free_buffer = true; > > + > > > > Not sure if I understand why this variable is needed, it seems

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

2024-11-28 Thread Alena Rybakina
Hi! Thank you for the case. On 28.11.2024 21:00, Alexander Lakhin wrote: Hello Alexander, 21.11.2024 09:34, Alexander Korotkov wrote: I'm going to push this if no objections. Please look at the following query, which triggers an error after ae4569161: SET random_page_cost = 1; CREATE TABLE

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

2024-11-28 Thread Alena Rybakina
Sorry, I was in a hurry and forgot to add the test result. I updated the patch On 28.11.2024 22:03, Alena Rybakina wrote: Hi! Thank you for the case. On 28.11.2024 21:00, Alexander Lakhin wrote: Hello Alexander, 21.11.2024 09:34, Alexander Korotkov wrote: I'm going to push this if no object

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2024-11-28 Thread Masahiro Ikeda
On 2024-11-26 07:32, Peter Geoghegan wrote: On Mon, Nov 25, 2024 at 4:07 AM Masahiro Ikeda wrote: One thing I am concerned about is that it reduces the cases where the optimization of _bt_checkkeys_look_ahead() works effectively, as the approach skips the skip immediately on the first occurrenc

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-11-28 Thread Junwang Zhao
On Fri, Nov 29, 2024 at 9:07 AM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Thu, 28 Nov 2024 19:02:57 +0800, > Junwang Zhao wrote: > > >> > I tested 3 branches: > >> > > >> > 1. the master branch > >> > 2. all v26 patch

Re: Remove useless GROUP BY columns considering unique index

2024-11-28 Thread David Rowley
On Fri, 29 Nov 2024 at 15:02, David Rowley wrote: > I've attached an updated patch that gets rid of the > get_unique_not_null_attnos() function completely and uses the > RelOptInfo.indexlist and RelOptInfo.notnullattnums. I forgot to do a local commit before sending v8. Fixed in the attached v9.

Re: Converting SetOp to read its two inputs separately

2024-11-28 Thread David Rowley
On Thu, 14 Nov 2024 at 22:33, Richard Guo wrote: > BTW, I noticed a typo in the comment for function > - * Returns false when sorted paths are not any more useful then unsorted > + * Returns false when sorted paths are not any more useful than unsorted I pushed a fix for that. Thanks.

Re: Using read stream in autoprewarm

2024-11-28 Thread Kirill Reshke
On Wed, 27 Nov 2024 at 19:20, Nazir Bilal Yavuz wrote: > > Hi, > > Thank you for looking into this! > > On Wed, 27 Nov 2024 at 16:50, Matheus Alcantara wrote: > > I've executed the same test of 5 databases with each of them having 1 table > > of > > 3GB of size and I've got very similar results.

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

2024-11-28 Thread Hayato Kuroda (Fujitsu)
Dear Nisha, > > Attached v51 patch-set addressing all comments in [1] and [2]. > Thanks for working on the feature! I've stated to review the patch. Here are my comments - sorry if there are something which have already been discussed. The thread is too long to follow correctly. Comments for 0

Re: UUID v7

2024-11-28 Thread Andrey M. Borodin
> On 28 Nov 2024, at 04:07, Sergey Prokhorenko > wrote: > > It would be useful to add a standard comparative benchmark with several > parameters and use cases to the patch, so that IT departments can compare > UUIDv7, ULID, UUIDv4, Snowflake ID and BIGSERIAL for their hardware and > condit

Re: Remove an unnecessary check on semijoin_target_ok() on postgres_fdw.c

2024-11-28 Thread Alexander Pyhalov
Tender Wang писал(а) 2024-10-09 10:26: Hi, When I debug FDW join pushdown codes, I found below codes in semijoin_target_ok(): if (bms_is_member(var->varno, innerrel->relids) && !bms_is_member(var->varno, outerrel->relids)) As far as I know, if a var belongs to the innerrel of joi

Re: Added prosupport function for estimating numeric generate_series rows

2024-11-28 Thread Dean Rasheed
On Thu, 28 Nov 2024 at 07:47, 孤傲小二~阿沐 wrote: > > Hello hackers, I saw a recent submission: Teach planner how to estimate rows > for timestamp generate_series. I provide a patch for the numeric type here, > and a simple test is as follows: > > I really want to know your thoughts, please give me f

postgres_fdw could deparse ArrayCoerceExpr

2024-11-28 Thread Alexander Pyhalov
Hi. Recently, we were surprised by the following behavior - prepared statement, selecting data from foreign table with varchar(N) field couldn't push down "field = ANY($1)" expression, when switched to generic plan. This looked like shown in the attached patch. Reproducer is simple: create

Re: pg_stat_statements and "IN" conditions

2024-11-28 Thread Kirill Reshke
On Wed, 14 Aug 2024 at 01:06, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > On Sun, Aug 11, 2024 at 09:34:55PM GMT, Dmitry Dolgov wrote: > > > On Sun, Aug 11, 2024 at 07:54:05PM +0300, Sergei Kornilov wrote: > > > > > > This feature will improve my monitoring. Even in patch 0001. I think > >

Re: Using read_stream in index vacuum

2024-11-28 Thread Kirill Reshke
On Mon, 18 Nov 2024 at 16:34, Andrey M. Borodin wrote: > > > > > On 2 Nov 2024, at 02:36, Kirill Reshke wrote: > > > > I noticed CI failure for this patch. This does not look like a flap. > > Seems like vacuum did not start index cleanup. I’ve added "index_cleanup on". > Thanks! > > > Best regard

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-11-28 Thread Kirill Reshke
On Tue, 19 Nov 2024 at 13:52, jian he wrote: > > On Sat, Nov 16, 2024 at 5:55 PM Kirill Reshke wrote: > > > > I am attaching my v8 for reference. > > > > in your v8. > > > REJECT_LIMIT > > > Specifies the maximum number of errors tolerated while converting a > colum

Re: Changing shared_buffers without restart

2024-11-28 Thread Tom Lane
Matthias van de Meent writes: > On Thu, 28 Nov 2024 at 18:19, Robert Haas wrote: >> [...] It's unclear to me why >> operating systems don't offer better primitives for this sort of thing >> -- in theory there could be a system call that sets aside a pool of >> address space and then other system

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-11-28 Thread Andrey M. Borodin
> On 25 Nov 2024, at 20:40, Bernd Helmle wrote: > > Hi Bernd! Thanks for the new patch version. There are still some problems with tests. 0. You rely on order of test execution. "init.sql" test must prepend any other test. I doubt it is guaranteed. 1. There's a typo float8__buffering in M

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

2024-11-28 Thread Alexander Lakhin
Hello Alexander, 21.11.2024 09:34, Alexander Korotkov wrote: I'm going to push this if no objections. Please look at the following query, which triggers an error after ae4569161: SET random_page_cost = 1; CREATE TABLE tbl(u UUID); CREATE INDEX idx ON tbl USING HASH (u); SELECT COUNT(*) FROM tb

Re: Changing shared_buffers without restart

2024-11-28 Thread Matthias van de Meent
On Thu, 28 Nov 2024 at 18:19, Robert Haas wrote: > > [...] It's unclear to me why > operating systems don't offer better primitives for this sort of thing > -- in theory there could be a system call that sets aside a pool of > address space and then other system calls that let you allocate > share

Re: More CppAsString2() in psql's describe.c

2024-11-28 Thread Corey Huinker
> > > LGTM, I didn't scan for omissions but the ones in the patch look right to > me. > I sort of wish we had a shorter macro as CppAsString2() get's pretty > verbose > when used frequently like this. > I don't quite understand the etymology of the name (it's some variation on C++'s std::to_string

Re: Changing shared_buffers without restart

2024-11-28 Thread Dmitry Dolgov
> On Thu, Nov 28, 2024 at 12:18:54PM GMT, Robert Haas wrote: > > All that having been said, what does concern me a bit is our ability > to predict what Linux will do well enough to keep what we're doing > safe; and also whether the Linux behavior might abruptly change in the > future. Users would b

Re: UUID v7

2024-11-28 Thread Peter Eisentraut
On 27.11.24 00:11, Masahiko Sawada wrote: On Tue, Nov 26, 2024 at 1:55 PM Jelte Fennema-Nio wrote: On Tue, 26 Nov 2024 at 21:48, Sergey Prokhorenko wrote: gen_uuidv7() is OK I'd very much prefer to not have a gen_ or get_ prefix as argued before[1][2]. My vote is still for simply uuidv7()

Re: Strange assertion in procarray.c

2024-11-28 Thread Michail Nikolaev
Hello, Heikki, Nathan and Michael! Oh, please excuse my impudence in bringing you all here, but I finally found what almost the same issue was fixed by Heikki already [0]. I discovered that a similar issue was previously addressed by Heikki in commit [0], where installcheck was disabled for injec

Re: [PATCH] Add support for displaying database service in psql prompt

2024-11-28 Thread Michael Banck
Hi, On Tue, Nov 19, 2024 at 07:47:58PM -0500, Greg Sabino Mullane wrote: > Compiled and tested: works fine, so +1 from me. Honestly, I was surprised > %s was still available. :) Thanks. Was that full review? You kept the commitfest item in "Needs Review" state. Michael

Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)

2024-11-28 Thread Alena Rybakina
Hi! On 27.11.2024 16:36, Matthias van de Meent wrote: On Wed, 27 Nov 2024 at 14:22, Alena Rybakina wrote: Sorry it took me so long to answer, I had some minor health complications On 12.11.2024 23:00, Peter Geoghegan wrote: On Sun, Nov 10, 2024 at 2:00 PM Alena Rybakina wrote: Or maybe I w

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2024-11-28 Thread Michail Nikolaev
Hello, everyone! I've improved the test stability. The revised version should provide consistent results in all test runs. Best regards, Mikhail. > From e9a562587a509ace581d7ccf40eb41eb73b93b6f Mon Sep 17 00:00:00 2001 From: nkey Date: Sun, 24 Nov 2024 14:55:13 +0100 Subject: [PATCH v5 4/4] Mod