Re: pg_stat_statements and "IN" conditions

2025-03-17 Thread Dmitry Dolgov
> On Mon, Mar 17, 2025 at 12:07:44PM GMT, vignesh C wrote: > > I noticed that the feedback from Sami at [1] has not yet been > addressed, I have changed the status to Waiting on Author, kindly > address them and update the status to Needs review. > [1] - > https://www.postgresql.org/message-id/CAA

Re: speedup COPY TO for partitioned table.

2025-03-17 Thread newtglobal postgresql_contributors
Hi Jian, Tested this patch with COPY sales TO STDOUT; ~ 1.909ms, improving performance over the older COPY (SELECT * FROM sales) TO STDOUT; ~ 3.80ms method. This eliminates query planning overhead and significantly speeds up data export from partitioned tables. Our test setup involved creating

Supporting TCP_SYNCNT in libpq

2025-03-17 Thread Francesco Canovai
This patch introduces support for a `tcp_syn_count` parameter in libpq, allowing control over the number of SYN retransmissions when initiating a connection. The primary goal is to prevent the walreceiver from getting stuck resending SYNs for an extended period, up to `net.ipv4.tcp_syn_retries` (1

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Mon, Mar 17, 2025 at 1:15 PM David G. Johnston wrote: > > It’s seems like the bug “session A can read and write to session B’s tables” > has gotten lost in this thread that pertains to something related but > different. Solving the bug is not going to involve adding a new GUC. I don

Re: Fwd: lwlocknames.h beautification attempt

2025-03-17 Thread Álvaro Herrera
On 2025-Mar-16, Gurjeet Singh wrote: > (resending the email because it was held for moderation; replaced image > attachment with a link, which might be the reason for being put in the > moderation queue) Kindly don't do this (specifically: cancel the original message and send a different copy).

Unify a recently-added inconsisnt message

2025-03-17 Thread Kyotaro Horiguchi
Subject: Unify a recent-added inconsisnt message Hello. I noticed that the recent commit cd3c45125d2 introduced the following three inconsistent messages at the same time: pg_dump.c: + printf(_(" --no-policiesdo not dump row security policies\n")); pg_dumpall.c: +

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-03-17 Thread Shubham Khanna
On Fri, Mar 14, 2025 at 5:43 PM Nisha Moond wrote: > > Hi Shubham, > > Here are a few comments for the v12 patch. > > doc/src/sgml/ref/pg_createsubscriber.sgml : > > 1. > + > + For all source server non-template databases create subscriptions for > + create subscriptions for data

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Steven Niu
Hi, I have some comments: 1. namespace.c, if relation->schemaname is pg_temp but myTempNamespace isn't set, the error information might be misleading. Consider checking OidIsValid(myTempNamespace) first. 2."you have not any temporary relations" --> "you have no any temporary relations" 3.

Re: Not-terribly-safe checks for CRC intrinsic support

2025-03-17 Thread John Naylor
On Sat, Mar 15, 2025 at 6:04 AM Tom Lane wrote: > > In short, I think we ought to apply and perhaps back-patch something > like the attached. Seems like reasonable defensive coding and consistency. -/* return computed value, to prevent the above being optimized away */ +/* else this func

Re: Conflict detection for multiple_unique_conflicts in logical replication

2025-03-17 Thread Amit Kapila
On Thu, Mar 13, 2025 at 4:30 PM Nisha Moond wrote: > > Attached is the v4 patch (test case changes only). > Comments: = 1. + /* + * Report an INSERT_EXISTS or UPDATE_EXISTS conflict when only one unique + * constraint is violated. + */ + if (conflicts == 1) + { + Oid uniqueidx; + RepOrigi

Re: Add Pipelining support in psql

2025-03-17 Thread Anthonin Bonnefoy
Here is a new patch set: 0001: This introduces the \sendpipeline meta-command and forbid \g in a pipeline. This is to fix the formatting options of \g that are not supported in a pipeline. 0002: Allows ';' to send a query using extended protocol when within a pipeline by using PQsendQueryParams w

Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET

2025-03-17 Thread Michael Paquier
On Mon, Mar 17, 2025 at 07:33:42AM +, Bykov Ivan wrote: > See: > https://www.postgresql.org/message-id/flat/5ac172e0b77a4baba50671cd1a15285f%40localhost.localdomain#6c43f354f5f42d2a27e6824faa660a86 > > Is it really worth spending extra execution time to increase entropy > when we have non-NULL

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-03-17 Thread vignesh C
On Mon, 17 Mar 2025 at 11:28, Shubham Khanna wrote: > > On Fri, Mar 14, 2025 at 5:43 PM Nisha Moond wrote: > > Fixed. > > The attached patch contains the suggested changes. I feel like we're trying to address two separate tasks in this thread: a) Enhancing pg_createsubscriber to automatically re

Re: 64 bit numbers vs format strings

2025-03-17 Thread Thomas Munro
On Mon, Mar 17, 2025 at 8:09 PM Tom Lane wrote: > Peter Eisentraut writes: > > This is not really possible. The behavior is baked deeply into > > the gettext code. (Also note that you don't only need support in > > xgettext, which is part of our build system, but also in the runtime > > librar

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Steven Niu
在 2025/3/17 18:13, Daniil Davydov 写道: Hi, On Mon, Mar 17, 2025 at 4:48 PM Steven Niu wrote: 1. namespace.c, if relation->schemaname is pg_temp but myTempNamespace isn't set, the error information might be misleading. Consider checking OidIsValid(myTempNamespace) first. Could you please cl

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Steven Niu
在 2025/3/17 18:56, Daniil Davydov 写道: Hi, On Mon, Mar 17, 2025 at 5:33 PM Steven Niu wrote: I mean RangeVarGetRelidExtended(), you deleted the following code: if (!OidIsValid(myTempNamespace)) relId = InvalidOid; /* this probably can't happen? */ Hm, I got it. Let's start w

Prune partitions by ScalarArrayOpExpr with an array parameter (partkey = ANY($1))

2025-03-17 Thread Andrei Lepikhov
Hi, As I see, initial pruning doesn't work in the case when a ScalarArrayOpExpr contains a parameter as the RHS of the expression, like following: partkey = ANY($1) As colleagues say, it is quite typical to use stored procedures, pass an array of IDs as a parameter, and use it in a SELECT c

Re: Update Unicode data to Unicode 16.0.0

2025-03-17 Thread Tom Lane
Jeff Davis writes: > That was discussed a few times, but: > (a) That doesn't exactly solve the problem, because people still need > indexes on LOWER() or CASEFOLD(); and > (b) If we change IMMUTABLE to mean "returns the same results on every > platform for all time", that would be too strict for

Re: Add -k/--link option to pg_combinebackup

2025-03-17 Thread Robert Haas
On Thu, Mar 6, 2025 at 6:18 AM Israel Barth Rubio wrote: > > I'm happy with this now, so barring objections or complaints from CI, > > I plan to commit it soon. > > Great, thank you! "Soon" ended up being somewhat later than planned, because I've been out of town, but done now. Now, to see if th

Re: Add -k/--link option to pg_combinebackup

2025-03-17 Thread Nathan Bossart
On Mon, Mar 17, 2025 at 02:10:14PM -0400, Robert Haas wrote: > Now, to see if the buildfarm explodes... I think koel might complain. pgindent on my machine yields the following: diff --git a/src/bin/pg_combinebackup/copy_file.c b/src/bin/pg_combinebackup/copy_file.c index 97ecda5a66d..b0c94f6ee

Re: TOAST versus toast

2025-03-17 Thread Jan Wieck
On 3/17/25 00:24, Tom Lane wrote: Note the lack of any upper case. Shortly later we reverse-engineered an acronym for it [2], with the winner being Tom Lockhart's The Oversized-Attribute Storage Technique Which made it into an acronym. Acronyms are typically capitalized to distinguish t

Re: lwlocknames.h beautification attempt

2025-03-17 Thread Robert Haas
On Mon, Mar 17, 2025 at 2:43 AM Álvaro Herrera wrote: > Tom didn't say he didn't like this change. He said he didn't like a > different change, which is not the one I committed. Sorry, I should have read the emails more carefully. I missed the fact that there were two different proposals. It was

Re: lwlocknames.h beautification attempt

2025-03-17 Thread Álvaro Herrera
On 2025-Mar-17, Robert Haas wrote: > On Mon, Mar 17, 2025 at 2:43 AM Álvaro Herrera > wrote: > > Tom didn't say he didn't like this change. He said he didn't like a > > different change, which is not the one I committed. > > Sorry, I should have read the emails more carefully. I missed the fac

Re: Unify a recently-added inconsisnt message

2025-03-17 Thread Tom Lane
Kyotaro Horiguchi writes: > I noticed that the recent commit cd3c45125d2 introduced the following > three inconsistent messages at the same time: > pg_dump.c: > + printf(_(" --no-policiesdo not dump row security > policies\n")); > pg_dumpall.c: > + printf(_(" --no-po

Re: Some read stream improvements

2025-03-17 Thread Andres Freund
Hi, On 2025-03-14 22:03:15 +1300, Thomas Munro wrote: > I have pushed the new pin limit patches, after some more testing and > copy editing. I dropped an unnecessary hunk (in read_stream_reset(), a > change I'd like to make but it didn't belong in this commit) and > dropped the word "Soft" from Ge

RE: AIX support

2025-03-17 Thread Srirama Kucherlapati
Hi Team, Here are the updates on the meson on AIX. Our team had pushed the fixes meson github here … https://github.com/mesonbuild/meson/pull/14335 #14335 Enhance AIX shared library build to use an export List.

Re: Prune partitions by ScalarArrayOpExpr with an array parameter (partkey = ANY($1))

2025-03-17 Thread Pavel Stehule
po 17. 3. 2025 v 14:28 odesílatel Andrei Lepikhov napsal: > Hi, > > As I see, initial pruning doesn't work in the case when a > ScalarArrayOpExpr contains a parameter as the RHS of the expression, > like following: > > partkey = ANY($1) > > As colleagues say, it is quite typical to use stored pro

Re: Skip collecting decoded changes of already-aborted transactions

2025-03-17 Thread Masahiko Sawada
On Thu, Mar 13, 2025 at 10:04 PM Hayato Kuroda (Fujitsu) wrote: > > Dear hackers, > > I hope I'm in the correct thread. In abfb296, rbtxn_skip_prepared() was > removed from > SnapBuildDistributeNewCatalogSnapshot(). ISTM it was an only caller of the > function. > > Is it an intentional for exter

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Mon, Mar 17, 2025 at 8:29 PM Steven Niu wrote: > > If the (relation->relpersistence == RELPERSISTENCE_TEMP) can ensure the > myTempNamespace is always valid, then my comment can be ignored. No, even if we see a temporary table in RangeVarGetRelidExtended, MyTempNamespace still can be `Inv

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

2025-03-17 Thread Masahiko Sawada
On Tue, Mar 4, 2025 at 4:06 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Mon, 3 Mar 2025 11:06:39 -0800, > Masahiko Sawada wrote: > > > I agree with the fix and the patch looks good to me. I've updated the > > commit

Re: Re: proposal: schema variables

2025-03-17 Thread Marcos Pegoraro
Em seg., 17 de mar. de 2025 às 15:33, Pavel Stehule escreveu: > I was asked for sending a reduced patchset > Would be good to explain what this reduced patchset is. Complete patch contains this and that Reduced patch contains only this. Regards Marcos

Re: AIO v2.5

2025-03-17 Thread Melanie Plageman
On Fri, Mar 14, 2025 at 3:43 PM Andres Freund wrote: > > Open items: > > - Right now effective_io_concurrency cannot be set > 0 on Windows and other > platforms that lack posix_fadvise. But with AIO we can read ahead without > posix_fadvise(). > > It'd not really make anything worse than tod

Re: Add -k/--link option to pg_combinebackup

2025-03-17 Thread Robert Haas
On Mon, Mar 17, 2025 at 2:17 PM Nathan Bossart wrote: > I think koel might complain. pgindent on my machine yields the following: Indeed, it did. I still think it's a mistake to have testing for this in the buildfarm and not in 'meson test' or CI. -- Robert Haas EDB: http://www.enterprisedb.co

Re: vacuumdb changes for stats import/export

2025-03-17 Thread Nathan Bossart
On Fri, Mar 14, 2025 at 02:05:30PM -0500, Nathan Bossart wrote: > If no feedback or objections materialize, I'm planning to commit these > early next week. While preparing this for commit, I noticed that the expression index part of the query was disregarding attstattarget. To fix, I've modified

Re: vacuumdb changes for stats import/export

2025-03-17 Thread Corey Huinker
> > > While preparing this for commit, I noticed that the expression index part > of the query was disregarding attstattarget. To fix, I've modified that > part to look at the index's pg_attribute entries. > +1, should have been there all along.

Re: support fix query_id for temp table

2025-03-17 Thread Christoph Berg
Re: Michael Paquier > On Thu, Feb 01, 2024 at 07:37:32AM +, ma lz wrote: > > session 1: > > create temp table ttt ( a int ); > > insert into ttt values(3); -- query_id is XXX from > > pg_stat_activity > > > > session 2: > > create temp table ttt ( a int ); > > insert

Re: pgsql: pg_upgrade: Preserve default char signedness value from old clus

2025-03-17 Thread Masahiko Sawada
On Mon, Mar 17, 2025 at 10:20 AM Robert Haas wrote: > > On Fri, Feb 21, 2025 at 1:20 PM Masahiko Sawada > wrote: > > pg_upgrade: Preserve default char signedness value from old cluster. > > Hi, > > I noticed that after running 'meson test --suite setup --suite > pg_upgrade', the file delete_old_

Re: Separate GUC for replication origins

2025-03-17 Thread Euler Taveira
On Fri, Mar 14, 2025, at 5:48 AM, vignesh C wrote: > 1) Should we add a test case to verify that if > max_active_replication_origins is set to -1, it will use > max_replication_slots value: I don't think so. I added the following assert to test exactly this condition. if (max_active_repli

Re: Separate GUC for replication origins

2025-03-17 Thread Masahiko Sawada
On Thu, Mar 13, 2025 at 5:55 PM Euler Taveira wrote: > > On Thu, Mar 13, 2025, at 11:10 AM, vignesh C wrote: > > Few comments: > > > Thanks for taking a look. > > 1) After selecting max_active_replication_origins setting in the > SELECT query having order by, the first record returned will be the

Re: Add semi-join pushdown to postgres_fdw

2025-03-17 Thread Alexander Korotkov
Hi, Robins! On Tue, Mar 18, 2025 at 2:20 AM Robins Tharakan wrote: > On Mon, 4 Dec 2023 at 07:22, Alexander Korotkov wrote: > > > > > > Now, I think this looks good. I'm going to push this if no objections. > > After this commit, I began seeing an unexpected ERROR - see this bug-report. > https

Optimize truncation logic to reduce AccessExclusive lock impact

2025-03-17 Thread Stepan Neretin
Hi hackers, We've encountered an issue where autovacuum holds an AccessExclusive lock for an extended period when attempting to truncate heap tables. The root cause appears to be the way autovacuum handles block truncation, specifically when scanning shared buffers during smgrtruncate. This issue

Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication

2025-03-17 Thread Amit Kapila
On Mon, Mar 17, 2025 at 9:35 PM Robert Haas wrote: > > On Thu, Mar 13, 2025 at 12:00 AM Amit Kapila wrote: > > Avoid invalidating all RelationSyncCache entries on publication rename. > > > > On Publication rename, we need to only invalidate the RelationSyncCache > > entries corresponding to relat

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-17 Thread David G. Johnston
On Monday, March 17, 2025, Shubham Khanna wrote: > > I have added validation for "all" to address both issues at once. > > Usage needs to be changed to refer to object types and we should try and specify which are valid there too. The sgml docs need to mention “all” as a valid value and what it

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-17 Thread Amit Kapila
On Tue, Mar 18, 2025 at 12:07 PM David G. Johnston wrote: > > On Monday, March 17, 2025, Shubham Khanna wrote: >> >> >> I have added validation for "all" to address both issues at once. >> > > Usage needs to be changed to refer to object types and we should try and > specify which are valid ther

Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET

2025-03-17 Thread David Rowley
On Mon, 17 Mar 2025 at 13:53, Michael Paquier wrote: > So, here is attached a counter-proposal, where we can simply added a > counter tracking a node count in _jumbleNode() to add more entropy to > the mix, incrementing it as well for NULL nodes. I had a look at this and it seems the main differe

Re: Statistics Import and Export

2025-03-17 Thread Corey Huinker
On Mon, Mar 17, 2025 at 10:24 AM Nathan Bossart wrote: > On Sun, Mar 16, 2025 at 05:32:15PM -0400, Corey Huinker wrote: > >> > >> * The custom format actually does two WriteToc() calls, and since these > >> patches move the queries to this part of pg_dump, it means we'll run > all > >> the qu

Re: dblink: Add SCRAM pass-through authentication

2025-03-17 Thread Jacob Champion
On Mon, Mar 17, 2025 at 11:54 AM Matheus Alcantara wrote: > > If the check functions aren't going to check those because it's > > unnecessary, then that's fine, but then the comments should be > > adjusted. > > > Ok, now I get all of your points. I've misinterpreted your comments, > sorry about th

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

2025-03-17 Thread jian he
On Wed, Mar 12, 2025 at 4:26 PM Jim Jones wrote: > > >> 2) Inconsistent terminology. Invalid values in "on_error set_to_null" > >> mode are names as "erroneous", but as "invalid" in "on_error stop" mode. > >> I don't want to get into the semantics of erroneous or invalid, but > >> sticking to one

Re: support fix query_id for temp table

2025-03-17 Thread Michael Paquier
On Mon, Mar 17, 2025 at 10:38:36PM +0100, Christoph Berg wrote: > Here's that patch with regression tests added. I would think changing > this would be a big usability improvement for anyone using temp tables > a lot. Not the first time I am seeing this argument this month. It is the second time.

Re: Update Unicode data to Unicode 16.0.0

2025-03-17 Thread vignesh C
On Mon, 17 Mar 2025 at 23:03, Jeff Davis wrote: > > On Sun, 2025-03-16 at 19:10 +0530, vignesh C wrote: > > We currently have two Commitfest entries for the same thread at [1] > > and [2]. Are both still necessary, or can we consolidate tracking > > into > > a single entry? > > I'm fine removing m

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-03-17 Thread Melanie Plageman
On Mon, Mar 17, 2025 at 2:55 PM Andres Freund wrote: > > On 2025-03-17 14:52:02 -0400, Melanie Plageman wrote: > > I don't feel strongly that we need to be as rigorous for > > maintenance_io_concurrency, but I'm also not sure 160 seems reasonable > > (which would be the same ratio as before). > >

Re: Bump soft open file limit (RLIMIT_NOFILE) to hard limit on startup

2025-03-17 Thread Jelte Fennema-Nio
On Mon Feb 24, 2025 at 12:01 PM CET, Jelte Fennema-Nio wrote: Right after pressing send I realized I could remove two more useless lines... Rebased patchset attached (trivial conflict against pg_noreturn changes). From 249ebbac1b6c01b99795cfe9b0201ab7ee6bacfa Mon Sep 17 00:00:00 2001 From: Jel

Re: md.c vs elog.c vs smgrreleaseall() in barrier

2025-03-17 Thread Andres Freund
Hi, On 2025-03-14 12:57:51 +1300, Thomas Munro wrote: > On Fri, Mar 14, 2025 at 12:23 PM Andres Freund wrote: > > > > 3. Considering errfinish()'s stated goal, a sort of backstop to help > > > you cancel looping message-spewing code only, I wonder if we should > > > just restrict the kinds of i

Re: optimize file transfer in pg_upgrade

2025-03-17 Thread Nathan Bossart
On Mon, Mar 17, 2025 at 04:04:45PM -0400, Robert Haas wrote: > On Mon, Mar 17, 2025 at 3:34 PM Nathan Bossart > wrote: >> * Once committed, I should update one of my buildfarm animals to use >> PG_TEST_PG_UPGRADE_MODE=--swap. > > It would be better if we didn't need a separate buildfarm animal

Re: pgsql: pg_upgrade: Preserve default char signedness value from old clus

2025-03-17 Thread Masahiko Sawada
On Mon, Mar 17, 2025 at 8:02 PM Robert Haas wrote: > > On Mon, Mar 17, 2025 at 6:02 PM Masahiko Sawada wrote: > > I've confirmed the issue and attached a patch to fix it. > > Cool. The commit message refers to 003_char_signedness, but the test > name is 005, not 003. Thank you for reviewing the

Re: making EXPLAIN extensible

2025-03-17 Thread Sami Imseih
> You only > need the second hook if you want to check the values of options > against the values of other options. +1 I did not think of adding a new hook, because there must be a really good reason to add a new hook. I think it's justified for this case. It's better than my approach since the ex

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-17 Thread David G. Johnston
On Mon, Mar 17, 2025 at 4:01 PM Euler Taveira wrote: > On Mon, Mar 17, 2025, at 9:34 AM, Shubham Khanna wrote: > > I have incorporated the "--remove/-r" parameter in the attached patch, > as it seems more intuitive and straightforward for users. > The attached patch contains the latest changes. >

Re: Re: proposal: schema variables

2025-03-17 Thread Pavel Stehule
Hi po 17. 3. 2025 v 21:53 odesílatel Marcos Pegoraro napsal: > Em seg., 17 de mar. de 2025 às 15:33, Pavel Stehule < > pavel.steh...@gmail.com> escreveu: > >> I was asked for sending a reduced patchset >> > > Would be good to explain what this reduced patchset is. > Complete patch contains this

Re: Update Unicode data to Unicode 16.0.0

2025-03-17 Thread Jeff Davis
On Sat, 2025-03-15 at 12:15 -0400, Tom Lane wrote: > In fact, on the analogy of timezones, I think we should not only > adopt newly-published Unicode versions pretty quickly but push > them into released branches as well. That approach suggests that we consider something like my previous STRICT_UN

Re: ecdh support causes unnecessary roundtrips

2025-03-17 Thread Jacob Champion
On Thu, Mar 13, 2025 at 2:41 PM Daniel Gustafsson wrote: > OpenSSL 3.4 also doesn't like it and AFAICT neither does the upcoming 3.5, > just > haven't had the cycles yet to ship out a new patch with all the time-consuming > testing it requires =) Here is a squash fix to change the capitalization

Re: Add Pipelining support in psql

2025-03-17 Thread Michael Paquier
On Mon, Mar 17, 2025 at 10:50:50AM +0100, Anthonin Bonnefoy wrote: > 0001: This introduces the \sendpipeline meta-command and forbid \g in > a pipeline. This is to fix the formatting options of \g that are not > supported in a pipeline. - count - 4 -(1 row) This removal done in the

Re: pgsql: pg_upgrade: Preserve default char signedness value from old clus

2025-03-17 Thread Robert Haas
On Mon, Mar 17, 2025 at 6:02 PM Masahiko Sawada wrote: > I've confirmed the issue and attached a patch to fix it. Cool. The commit message refers to 003_char_signedness, but the test name is 005, not 003. -- Robert Haas EDB: http://www.enterprisedb.com

Re: Allow io_combine_limit up to 1MB

2025-03-17 Thread Thomas Munro
Here's a new version that also adjusts the code that just landed in da722699: - /* -* Each IO handle can have an PG_IOV_MAX long iovec. -* -* XXX: Right now the amount of space available for each IO is PG_IOV_MAX. -* While it's tempting to use the io_combine_l

Re: Fix couple of typos

2025-03-17 Thread vignesh C
On Mon, 17 Mar 2025 at 16:57, Ashutosh Bapat wrote: > > On Mon, Mar 17, 2025 at 4:46 PM Amit Kapila wrote: > > > > On Mon, Mar 17, 2025 at 3:44 PM vignesh C wrote: > > > > > > While reviewing another patch, I found a couple of typos: > > > 1) subid should have been pubid in AlterPublicationOwner

Re: Support a wildcard in backtrace_functions

2025-03-17 Thread Jelte Fennema-Nio
On Wed, 26 Feb 2025 at 16:40, Tom Lane wrote: > If there's no place where > that can plausibly be done, maybe you don't need the typedef after > all? Makes sense, I removed the unused LogBacktraceVerbosity typedef now. It caused a rebase conflict just now, so this also solves that. From 579ac166a

Re: Simplify the logic a bit (src/bin/scripts/reindexdb.c)

2025-03-17 Thread Ranier Vilela
Em sex., 7 de mar. de 2025 às 16:14, Ranier Vilela escreveu: > > > Em sex., 7 de mar. de 2025 às 16:01, Álvaro Herrera < > alvhe...@alvh.no-ip.org> escreveu: > >> On 2025-Mar-07, Álvaro Herrera wrote: >> >> > Anyway, my version of this is attached. It fixes the problems with your >> > patch, but

RE: long-standing data loss bug in initial sync of logical replication

2025-03-17 Thread Hayato Kuroda (Fujitsu)
Dear hackers, Attached patch set contains proper commit message. It briefly describes the background and handlings. Regarding the PG13, the same commit message is used for 0001. 0002 is still rough. Renamed backpatches to .txt, to make cfbot happy. Thanks Hou working for it. Best regards, Haya

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Tue, Mar 18, 2025 at 2:36 AM David G. Johnston wrote: > > "I want to give a better error message" is not a good enough reason to change > this long-standing behavior in a back-patchable bug fix. > and I do not agree that it is an improvement worth making in HEAD. OK, In this case I'd

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

2025-03-17 Thread Matthias van de Meent
On Tue, 11 Mar 2025 at 16:53, Peter Geoghegan wrote: > > On Sat, Mar 8, 2025 at 11:43 AM Peter Geoghegan wrote: > > I plan on committing this one soon. It's obviously pretty pointless to > > make the BTMaxItemSize operate off of a page header, and not requiring > > it is more flexible. > > Commit

Re: Statistics Import and Export

2025-03-17 Thread Nathan Bossart
On Mon, Mar 17, 2025 at 07:24:46PM -0400, Corey Huinker wrote: > On Mon, Mar 17, 2025 at 10:24 AM Nathan Bossart > wrote: >> I'm assuming that writing a completely different TOC on the second pass >> would corrupt the dump file. Perhaps we could teach it to skip stats >> entries on the second pas

Re: Separate GUC for replication origins

2025-03-17 Thread Euler Taveira
On Mon, Mar 17, 2025, at 8:44 PM, Masahiko Sawada wrote: > I would suggest putting the new max_active_replication_origins after > max_parallel_apply_workers_per_subscription as both > max_sync_workers_per_subscription and > max_parallel_apply_workers_per_subscription are related to > max_logical_re

Re: dsm_registry: Add detach and destroy features

2025-03-17 Thread Sungwoo Chang
Regression test failed because I didn't add an extra new line in the expected file. 2025년 3월 17일 (월) 오전 9:55, Sungwoo Chang 님이 작성: > > There was a minor typo in the test module. I built and ran the > test_dsm_registry extension before submitting the patch but perhaps it > got mixed up with an olde

Re: Vacuum statistics

2025-03-17 Thread Alena Rybakina
On 17.03.2025 09:42, vignesh C wrote: On Thu, 27 Feb 2025 at 23:30, Alena Rybakina wrote: Hi! On 17.02.2025 17:46, Alena Rybakina wrote: On 04.02.2025 18:22, Alena Rybakina wrote: Hi! Thank you for your review! On 02.02.2025 23:43, Alexander Korotkov wrote: On Mon, Jan 13, 2025 at 3:26 PM

Re: Fix couple of typos

2025-03-17 Thread Ashutosh Bapat
On Tue, Mar 18, 2025 at 8:49 AM vignesh C wrote: > > On Mon, 17 Mar 2025 at 16:57, Ashutosh Bapat > wrote: > > > > On Mon, Mar 17, 2025 at 4:46 PM Amit Kapila wrote: > > > > > > On Mon, Mar 17, 2025 at 3:44 PM vignesh C wrote: > > > > > > > > While reviewing another patch, I found a couple of t

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-17 Thread Shubham Khanna
On Tue, Mar 18, 2025 at 4:31 AM Euler Taveira wrote: > > On Mon, Mar 17, 2025, at 9:34 AM, Shubham Khanna wrote: > > I have incorporated the "--remove/-r" parameter in the attached patch, > as it seems more intuitive and straightforward for users. > The attached patch contains the latest changes.

Re: pg_recvlogical requires -d but not described on the documentation

2025-03-17 Thread David G. Johnston
On Monday, March 17, 2025, Fujii Masao wrote: > > On 2025/03/12 14:59, David G. Johnston wrote: > >> On Monday, February 24, 2025, Hayato Kuroda (Fujitsu) < >> kuroda.hay...@fujitsu.com > wrote: >> >> >> OK, so I will exclude the point in the thread. The patc

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-17 Thread Shubham Khanna
On Tue, Mar 18, 2025 at 5:48 AM David G. Johnston wrote: > > On Mon, Mar 17, 2025 at 4:01 PM Euler Taveira wrote: >> >> On Mon, Mar 17, 2025, at 9:34 AM, Shubham Khanna wrote: >> >> I have incorporated the "--remove/-r" parameter in the attached patch, >> as it seems more intuitive and straightfo

Re: Next commitfest app release is planned for March 18th

2025-03-17 Thread Jelte Fennema-Nio
On Tue, 4 Mar 2025 at 02:21, Jelte Fennema-Nio wrote: > > The next commitfest app release is planned for March 18th I deployed the latest release of the commitfest app. Below is a changelog that's slightly updated. 1. Major change: There's a new /me page which shows a dashboard of open patches w

Re: RFC: Allow EXPLAIN to Output Page Fault Information

2025-03-17 Thread Jelte Fennema-Nio
On Mon, 10 Feb 2025 at 14:23, torikoshia wrote: > Thanks for reviewing the patch and comments! > Fixed issues you pointed out and attached v2 patch. This patch needs a rebase, because it's failing to compile currently. So I marked this as "Waiting on Author" in the commitfest app.

Re: Add semi-join pushdown to postgres_fdw

2025-03-17 Thread Robins Tharakan
Hi Alexander, On Mon, 4 Dec 2023 at 07:22, Alexander Korotkov wrote: > > > Now, I think this looks good. I'm going to push this if no objections. After this commit, I began seeing an unexpected ERROR - see this bug-report. https://www.postgresql.org/message-id/18852-fb75b88160678f78%40postgresq

Re: maintenance_work_mem = 64kB doesn't work for vacuum

2025-03-17 Thread David Rowley
On Tue, 18 Mar 2025 at 05:49, Masahiko Sawada wrote: > I've attached the patch. I added the minimum regression tests for that. I think the change to vacuumlazy.c is ok. The new test you've added creates a table called pvactst2 but then adds a test that uses the pvactst table. Did you mean to ski

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, I see that the presence of isolation tests in the patch is controversial. First things first, let's concentrate on fixing the bug. I attach a new version of patch (for `master` branch) to this letter. It contains better comments and a few small improvements. P.S. Sorry for bad formatting in pr

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-17 Thread Shubham Khanna
On Mon, Mar 17, 2025 at 8:44 AM Amit Kapila wrote: > > On Sat, Mar 15, 2025 at 8:03 PM David G. Johnston > wrote: > > > > On Friday, March 14, 2025, Amit Kapila wrote: > >> > >> > >> Style-1 sounds reasonable to me, but how exactly we want to do. One > >> idea is to have short and long switches

Re: Allow default \watch interval in psql to be configured

2025-03-17 Thread Ashutosh Bapat
Hi Daniel, On Fri, Mar 14, 2025 at 2:26 PM Daniel Gustafsson wrote: > > On 13 Mar 2025, at 15:03, Greg Sabino Mullane wrote: > > Patch looks good. One minor issue: > > greg=# \set WATCH_INTERVAL -1 > invalid value "-1" for "WATCH_INTERVAL": must be greater than 0.00 > greg=# \set WATCH_INTERVAL

Re: 64 bit numbers vs format strings

2025-03-17 Thread Thomas Munro
On Mon, Mar 17, 2025 at 8:03 PM Peter Eisentraut wrote: > On 15.03.25 03:42, Thomas Munro wrote: > > So we should make pgoff_t a typedef for int64_t everywhere. It's a > > bit annoying that we have to teach everyone to remember to use PRId64 > > to print it, though. > > The ramifications of such

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Mon, Mar 17, 2025 at 5:33 PM Steven Niu wrote: > > I mean RangeVarGetRelidExtended(), you deleted the following code: > > if (!OidIsValid(myTempNamespace)) > relId = InvalidOid; /* this probably can't happen? */ Hm, I got it. Let's start with the fact that the comment "this pr

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-17 Thread jian he
hi. I played around with it. current syntax, we don't need to deal with column constraint grammar. like the following can fail directly: create table t0(a int constraint nn not null a not valid); we only support table constraint cases like: alter table lp add constraint nc1 not null a not valid;

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-17 Thread Alvaro Herrera
On 2025-Mar-17, jian he wrote: > hi. > I played around with it. > > current syntax, we don't need to deal with column constraint grammar. > like the following can fail directly: > create table t0(a int constraint nn not null a not valid); > we only support table constraint cases like: > alter tab

RE: long-standing data loss bug in initial sync of logical replication

2025-03-17 Thread Hayato Kuroda (Fujitsu)
Dear hackers, > Regarding the PG13, it cannot be > applied > as-is thus some adjustments are needed. I will share it in upcoming posts. Here is a patch set for PG13. Apart from PG14-17, the patch could be created as-is, because... 1. WAL record for invalidation messages (XLOG_XACT_INVALIDATIONS

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-03-17 Thread Ashutosh Bapat
On Mon, Mar 17, 2025 at 4:02 PM vignesh C wrote: > > On Mon, 17 Mar 2025 at 11:28, Shubham Khanna > wrote: > > > > On Fri, Mar 14, 2025 at 5:43 PM Nisha Moond > > wrote: > > > > Fixed. > > > > The attached patch contains the suggested changes. > > I feel like we're trying to address two separat

Re: Fix couple of typos

2025-03-17 Thread Ashutosh Bapat
On Mon, Mar 17, 2025 at 4:46 PM Amit Kapila wrote: > > On Mon, Mar 17, 2025 at 3:44 PM vignesh C wrote: > > > > While reviewing another patch, I found a couple of typos: > > 1) subid should have been pubid in AlterPublicationOwner and > > AlterPublicationOwner_oid functions. > > 2) Only tuples wi

Fwd: lwlocknames.h beautification attempt

2025-03-17 Thread Gurjeet Singh
(resending the email because it was held for moderation; replaced image attachment with a link, which might be the reason for being put in the moderation queue) On Sun, Mar 16, 2025 at 7:53 PM Robert Haas wrote: > > On Fri, Mar 14, 2025 at 3:38 PM Álvaro Herrera > wrote: > > I forgot to send a

Re: Fix couple of typos

2025-03-17 Thread Amit Kapila
On Mon, Mar 17, 2025 at 3:44 PM vignesh C wrote: > > While reviewing another patch, I found a couple of typos: > 1) subid should have been pubid in AlterPublicationOwner and > AlterPublicationOwner_oid functions. > 2) Only tuples with XIDs/MXIDs older than the the > FreezeLimit/MultiXactCutoff are

Re: Proposal: Deferred Replica Filtering for PostgreSQL Logical Replication

2025-03-17 Thread Amit Kapila
On Sun, Mar 16, 2025 at 12:59 AM Dean wrote: > > I'd like to propose an enhancement to PostgreSQL's logical replication > system: Deferred Replica Filtering (DRF). The goal of this feature is to > provide more granular control over which rows are replicated by applying > publication filters aft

Re: Snapshot related assert failure on skink

2025-03-17 Thread Tomas Vondra
On 3/4/25 23:25, Andres Freund wrote: > Hi, > > I just saw a BF failure on skink (valgrind) that asserts out. > > Check the 002_compare_backups failure in: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2025-03-04%2017%3A35%3A01 > > TRAP: failed Assert("TransactionIdPrecedesO

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-03-17 Thread Jakub Wartak
On Thu, Mar 13, 2025 at 9:34 PM Melanie Plageman wrote: > On Thu, Mar 13, 2025 at 5:46 AM Jakub Wartak > wrote: > > > > Cool, anything > 1 is just better. Just quick question, so now we have: > > > > #define DEFAULT_EFFECTIVE_IO_CONCURRENCY 16 > > #define DEFAULT_MAINTENANCE_IO_CONCURRENCY 10 > >

Re: Draft for basic NUMA observability

2025-03-17 Thread Jakub Wartak
On Fri, Mar 14, 2025 at 1:08 PM Bertrand Drouvot wrote: > On Fri, Mar 14, 2025 at 11:05:28AM +0100, Jakub Wartak wrote: > > On Thu, Mar 13, 2025 at 3:15 PM Bertrand Drouvot > > wrote: > > > > Hi, > > > > Thank you very much for the review! I'm answering to both reviews in > > one go and the resul

RE: long-standing data loss bug in initial sync of logical replication

2025-03-17 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > A few comments: > == > 1. > +SnapBuildDistributeSnapshotAndInval(SnapBuild *builder, XLogRecPtr > lsn, TransactionId xid) > { > dlist_iter txn_i; > ReorderBufferTXN *txn; > + ReorderBufferTXN *curr_txn; > + > + curr_txn = ReorderBufferTXNByXid(builder->reorder, xid, false,

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2025-03-17 Thread Ashutosh Bapat
On Fri, Mar 14, 2025 at 5:36 PM Amit Langote wrote: > > Thanks for the patch and the extensive benchmarking. > > Would you please also share a simple, self-contained example that I > can use to reproduce and verify the performance improvements? It’s > helpful to first see the patch in action with

Re: pg_stat_statements and "IN" conditions

2025-03-17 Thread vignesh C
On Mon, 17 Mar 2025 at 13:42, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > On Mon, Mar 17, 2025 at 12:07:44PM GMT, vignesh C wrote: > > > > I noticed that the feedback from Sami at [1] has not yet been > > addressed, I have changed the status to Waiting on Author, kindly > > address them and

  1   2   >