Re: WIP - xmlvalidate implementation from TODO list

2025-12-06 Thread Kirill Reshke
On Sun, 7 Dec 2025 at 04:38, Marcos Magueta wrote: > > Hello! > > I am likely one of the few people still using XML, but I noticed XSD schema > validation is still a TODO on postgresql, which I have some personal use > cases for. > > In this patch I attempt to implement XMLVALIDATE with the alre

Re: Fix incorrect comments in tuplesort.c

2025-12-06 Thread David G. Johnston
On Saturday, December 6, 2025, cca5507 wrote: > Hi Chao, > > Thank you for your reply. > > I feed the comment to Github Copilot and he says it's incorrect. The > "slightly" is just what he suggests. > > Your suggestion also LGTM. > I don’t think just adding the word “slightly” is a good fix here

Re: Fix incorrect comments in tuplesort.c

2025-12-06 Thread cca5507
Hi Chao, Thank you for your reply. I feed the comment to Github Copilot and he says it's incorrect. The "slightly" is just what he suggests. Your suggestion also LGTM. -- Regards, ChangAo Chen

Re: Fix incorrect comments in tuplesort.c

2025-12-06 Thread Chao Li
> On Dec 6, 2025, at 22:56, cca5507 wrote: > > Hi, > > The incorrect comment: > > ``` > /* > * Initial size of memtuples array. We're trying to select this size so that > * array doesn't exceed ALLOCSET_SEPARATE_THRESHOLD and so that the overhead of > * allocation might possibly be lowered.

Re: [PATCH] Add sampling statistics to autoanalyze log output

2025-12-06 Thread 河田達也
Hi, Here is the updated version (v2). This revision fixes the CI failure reported in the previous patch. No other functional changes. Regards, v2-0001-Add-sampling-statistics-to-autoanalyze-log-output.patch Description: Binary data

Re: Moving _bt_readpage and _bt_checkkeys into a new .c file

2025-12-06 Thread Peter Geoghegan
On Sat, Dec 6, 2025 at 3:04 PM Peter Geoghegan wrote: > My best guess is that the benefits I see come from eliminating a > dependent load. Without the second patch applied, I see this > disassembly for _bt_checkkeys: > > movrax,QWORD PTR [rdi+0x38] ; Load scan->opaque > movr15d,DWORD PTR

Re: Making jsonb_agg() faster

2025-12-06 Thread Chao Li
> On Dec 7, 2025, at 03:00, Tom Lane wrote: > > Chao Li writes: >> On Dec 6, 2025, at 07:14, Tom Lane wrote: >>> I'd kind of like to get this pushed soon, because it keeps getting >>> sideswiped ... does anyone have further comments? > >> My only nit commit is still about the hard-coded 12:

WIP - xmlvalidate implementation from TODO list

2025-12-06 Thread Marcos Magueta
Hello! I am likely one of the few people still using XML, but I noticed XSD schema validation is still a TODO on postgresql, which I have some personal use cases for. In this patch I attempt to implement XMLVALIDATE with the already in use libxml following a version I got my hands on of the SQL/X

Re: Strict functions with variadic "any" argument bug

2025-12-06 Thread Tom Lane
Svetlana Derevyanko writes: > A few days ago Karina Litskevich noticed that strict function with > variadic argument containing a few values, only one of which was NULL, > returned NULL without evaluating the function itself. It didn't match > with documented behaviour: > "If a function is dec

Re: Something in our JIT code is screwing up PG_PRINTF_ATTRIBUTE

2025-12-06 Thread Tom Lane
Daniel Gustafsson writes: > On 4 Dec 2025, at 19:01, Tom Lane wrote: >> On the other hand, aligning the C++ compiler with the C compiler >> is likely to avoid other problems, so maybe it's better to focus >> on making that happen. I'm not sure how we'd do that automatically >> though. > It soun

Re: Moving _bt_readpage and _bt_checkkeys into a new .c file

2025-12-06 Thread Peter Geoghegan
On Sat, Dec 6, 2025 at 3:07 AM Victor Yegorov wrote: > I like this change and I agree that it's both handy and gives an easy > performance boost. There's a number of things that I find counterintuitive about the performance impact of this patch: * It doesn't make very much difference (under a 1

Re: [PATCH] Fix typo in psql \copy command documentation

2025-12-06 Thread Kirill Reshke
On Sat, 6 Dec 2025, 20:39 Ignat Remizov, wrote: > Hi Postgres hackers, > > Small comment typo fix: pstdout was listed twice; first should be pstdin. > Patch inline. > > Kind regards, > Ignat Remizov > > From a4ae3eb6abd1189a2710b09efd567e46ed9b1f83 Mon Sep 17 00:00:00 2001 > From: Ignat Remizov

Re: Making jsonb_agg() faster

2025-12-06 Thread Tom Lane
Chao Li writes: > On Dec 6, 2025, at 07:14, Tom Lane wrote: >> I'd kind of like to get this pushed soon, because it keeps getting >> sideswiped ... does anyone have further comments? > My only nit commit is still about the hard-coded 12: > I commented this before and you explained. But I still t

Re: Adding REPACK [concurrently]

2025-12-06 Thread Mihail Nikalayeu
Hello, Antonin! Some comments for 0003: > /* allocate in transaction context */ It may be any context now, because it is a function now. > result = CopySnapshot(snapshot); > /* Restore the original values so the source is intact. */ > snapshot->xip = oldxip; > snapshot->xcnt = oldxcnt; I thin

Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring

2025-12-06 Thread Naga Appani
Hi Ashutosh, Thanks for the review! I agree - comparing the exposed members_size against the documented thresholds is sufficient for monitoring purposes. This aligns with the approach taken in v11: exposing the current usage in a way consistent with other PostgreSQL counters (e.g., XIDs, OIDs),

[PATCH] Add sampling statistics to autoanalyze log output

2025-12-06 Thread 河田達也
Hi, I would like to propose a patch to add sampling statistics to autoanalyze log output, addressing an inconsistency between ANALYZE VERBOSE and autoanalyze logging. ## Problem Currently, ANALYZE VERBOSE displays sampling statistics, but autoanalyze does not log this information. This makes it

Re: bt_index_parent_check and concurrently build indexes

2025-12-06 Thread Donghang Lin
Hi Álvaro You're correct that the bug is older. I'm not sure about backporting > the fix to 16 and earlier though, because it depends on BtreeCheckState > having the snapshot member which was only added in commit 5ae2087202af. > It's not a difficult patch -- attached. > The issue itself in fact

Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS

2025-12-06 Thread Tomas Vondra
On 12/6/25 17:08, Tom Lane wrote: > Tomas Vondra writes: >> On 12/6/25 10:00, Alexander Lakhin wrote: >>> though I can't see timeout-related changes in [4], probably something was >>> changed in the environment during the upgrade... > >> Yeah, I noticed that too. But I have no idea what could hav

Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS

2025-12-06 Thread Andrew Dunstan
On 2025-12-06 Sa 7:04 AM, Tomas Vondra wrote: On 12/6/25 10:00, Alexander Lakhin wrote: Hello Tomas, 03.12.2025 21:23, Tomas Vondra wrote: On 12/3/25 19:33, Tom Lane wrote: I wrote: Yeah, I can imagine that constantly flushing the cached plan for that plpgsql function would be bad. Let m

Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS

2025-12-06 Thread Tom Lane
Tomas Vondra writes: > On 12/6/25 10:00, Alexander Lakhin wrote: >> though I can't see timeout-related changes in [4], probably something was >> changed in the environment during the upgrade... > Yeah, I noticed that too. But I have no idea what could have changed or > why - the only thing I upda

[PATCH] Fix typo in psql \copy command documentation

2025-12-06 Thread Ignat Remizov
Hi Postgres hackers, Small comment typo fix: pstdout was listed twice; first should be pstdin. Patch inline. Kind regards, Ignat Remizov >From a4ae3eb6abd1189a2710b09efd567e46ed9b1f83 Mon Sep 17 00:00:00 2001 From: Ignat Remizov Date: Sat, 6 Dec 2025 17:30:20 +0200 Subject: [PATCH] Fix typo in

Re: Proposal: Conflict log history table for Logical Replication

2025-12-06 Thread Dilip Kumar
On Fri, Dec 5, 2025 at 10:39 AM Dilip Kumar wrote: > > On Thu, Dec 4, 2025 at 8:05 PM vignesh C wrote: > > > > On Wed, 3 Dec 2025 at 16:57, Dilip Kumar wrote: > > > > > > On Wed, Dec 3, 2025 at 9:49 AM shveta malik > > > wrote: > > > > > > > > > > relid | 16391 > > > > > schemaname

Fix incorrect comments in tuplesort.c

2025-12-06 Thread cca5507
Hi, The incorrect comment: ``` /* * Initial size of memtuples array. We're trying to select this size so that * array doesn't exceed ALLOCSET_SEPARATE_THRESHOLD and so that the overhead of * allocation might possibly be lowered. However, we don't consider array sizes * less than 1024. * *

Initial COPY of Logical Replication is too slow

2025-12-06 Thread Marcos Pegoraro
Subscriber needs to ask publisher about tables and fields to COPY and it uses pg_get_publication_tables for that, and it is too slow when the number of tables is high because on every table it's subscribed it has to run this select. We can get the same result with a join on pg_publication_rel. reg

Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS

2025-12-06 Thread Tomas Vondra
On 12/6/25 10:00, Alexander Lakhin wrote: > Hello Tomas, > > 03.12.2025 21:23, Tomas Vondra wrote: >> On 12/3/25 19:33, Tom Lane wrote: >>> I wrote: Yeah, I can imagine that constantly flushing the cached plan for that plpgsql function would be bad. Let me see if I can reformulate >>

Change comment in `contrib/amcheck` regression suite.

2025-12-06 Thread Kirill Reshke
I did find a misleading comment in amcheck's regression test suite, during un-related hacking in Cloudberry[0]. There is a comment which says `-- Check that sequences are rejected` but those are supported starting c3b011d Lets make things not misleading. [0] https://github.com/apache/cloudberry

Re: proposal: schema variables

2025-12-06 Thread Jim Jones
On 05/12/2025 07:50, Pavel Stehule wrote: > yes, there was a bug, fixed > Both mentioned issues are related to the declared target of this > patchset - maximal reduction of the size. Nice, the memory is now being freed after a DROP VARIABLE and the tab completion for LET and DROP VARIABLE work

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-06 Thread Mihail Nikalayeu
Hello, Alexander! On Sat, Dec 6, 2025 at 7:00 AM Alexander Lakhin wrote: > I've discovered that despite removing FIXME (in 90eae926a), the error > "invalid arbiter index list" can still be triggered with: Wow, thanks for finding this. > The first commit it produced on with this script is bc32a1

Re: Adding REPACK [concurrently]

2025-12-06 Thread Álvaro Herrera
Hello, On 2025-Dec-04, Marcos Pegoraro wrote: > Em qui., 4 de dez. de 2025 às 12:43, Álvaro Herrera > escreveu: > > > So if you're trying to do this, the number of problematic pages must > > be large. > > Not necessarily. I have some tables where I like to use CLUSTER every > 2 or 3 months, to

Re: IPC/MultixactCreation on the Standby server

2025-12-06 Thread Álvaro Herrera
On 2025-Dec-05, Andrey Borodin wrote: > I'm on-call for the rest of this week, but a bit later I can produce > fast tests for all kinds of wraparounds :) I suspect that would be valuable. > But as you said, hopefully soon there won't be wraparounds, and, > what's more important, offsets\members

Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS

2025-12-06 Thread Alexander Lakhin
Hello Tomas, 03.12.2025 21:23, Tomas Vondra wrote: On 12/3/25 19:33, Tom Lane wrote: I wrote: Yeah, I can imagine that constantly flushing the cached plan for that plpgsql function would be bad. Let me see if I can reformulate that test without using a plpgsql function --- right offhand, it's

Re: Moving _bt_readpage and _bt_checkkeys into a new .c file

2025-12-06 Thread Victor Yegorov
сб, 6 дек. 2025 г. в 06:49, Peter Geoghegan : > Attached patch v1-0001-* moves _bt_readpage (from nbtsearch.c) and > _bt_checkkeys (from nbtutils.c) into a new .c file -- nbtreadpage.c. > It also moves all of the functions that _bt_checkkeys itself calls > (either directly or indirectly) over to n