Re: Adding REPACK [concurrently]

2025-09-01 Thread Antonin Houska
Mihail Nikalayeu wrote: > Antonin Houska : > > Are you sure the test is complete? I see no occurrence of the REPACK command > > in it. > Oops, send invalid file. The correct one in attachment. Thanks! The problem was that when removing the original "preserve visibility patch" v12-0005 [1] from

Re: split func.sgml to separated individual sgml files

2025-09-01 Thread Florents Tselai
On 1 Sep 2025, at 4:35 PM, Euler Taveira wrote: On Mon, Sep 1, 2025, at 7:35 AM, Florents Tselai wrote: While working on this https://commitfest.postgresql.org/patch/6020/ I discovered that when changing for func/func-aggregate.sgml, the HTML wasn’t marked for update. IIUC the doc/Makefile shou

Re: Orphan page in _bt_split

2025-09-01 Thread Peter Geoghegan
On Mon, Sep 1, 2025 at 1:35 AM Michael Paquier wrote: > Nice investigation and report, that I assume you have just guessed > from a read of the code and that there could be plenty of errors that > could happen in this code path. It indeed looks like some weak > coding assumption introduced in thi

Re: Orphan page in _bt_split

2025-09-01 Thread Peter Geoghegan
On Mon, Sep 1, 2025 at 1:03 AM Konstantin Knizhnik wrote: > So we should zero this page in case of reporting error to "not confuse > vacuum. > It is done for all places where this function reports error before > entering critical section and wal-logging this page. Right. > _bp_getbuf just reads

Re: Improving tracking/processing of buildfarm test failures

2025-09-01 Thread Alexander Lakhin
Hello hackers, Please take a look at the August report on buildfarm failures: # SELECT br, COUNT(*) FROM failures WHERE dt >= '2025-08-01' AND  dt < '2025-09-01' GROUP BY br; REL_13_STABLE: 9 REL_14_STABLE: 8 REL_15_STABLE: 6 REL_16_STABLE: 12 REL_17_STABLE: 13 REL_18_STABLE: 16 master: 38 -- Tot

Re: Orphan page in _bt_split

2025-09-01 Thread Peter Geoghegan
On Mon, Sep 1, 2025 at 3:04 PM Peter Geoghegan wrote: > There's just no reason to think that we'd ever be able to tie back one > of these LOG messages from VACUUM to the problem within _bt_split. > There's too many other forms of corruption that might result in VACUUM > logging this same error (e.

Re: MergeAppend could consider sorting cheapest child path

2025-09-01 Thread Alexander Korotkov
On Thu, Jul 31, 2025 at 5:20 PM Andrei Lepikhov wrote: > On 27/7/2025 00:51, Alexander Korotkov wrote: > > On Tue, Jul 22, 2025 at 2:13 PM Andrei Lepikhov > I've another idea. cost_tuplesort() puts 2.0 under logarithm to prefer > > tuplesort over heapsort. I think we can adjust cost_gather_merg

Re: Extension security improvement: Add support for extensions with an owned schema

2025-09-01 Thread Jelte Fennema-Nio
On Mon Sep 1, 2025 at 4:44 PM CEST, Jelte Fennema-Nio wrote: On Mon Aug 11, 2025 at 9:23 PM CEST, Robert Haas wrote: On Mon, Aug 11, 2025 at 1:55 PM Robert Haas wrote: [ some review ] Attached is a patch that addresses your comments I think. Attached is a version that doesn't fail the tes

Re: Extension security improvement: Add support for extensions with an owned schema

2025-09-01 Thread Jelte Fennema-Nio
On Mon Aug 11, 2025 at 9:23 PM CEST, Robert Haas wrote: On Mon, Aug 11, 2025 at 1:55 PM Robert Haas wrote: [ some review ] Attached is a patch that addresses your comments I think. I restructured the schema creation code, and added more comments to the AlterExtensionNamespace code (I couldn't

Re: Replace magic numbers with strategy numbers for B-tree indexes

2025-09-01 Thread Michael Paquier
On Mon, Sep 01, 2025 at 09:04:04PM +0700, Daniil Davydov wrote: > I don't think that we can just create different enums for each index > strategies. > We have (for example) ScanKey functionality, which can work with different > indexes (and such a functions has a uint16 argument for strategy numbe

Re: Refactoring: Use soft error reporting for *_opt_error functions

2025-09-01 Thread Michael Paquier
On Mon, Sep 01, 2025 at 12:21:18PM +0100, Dean Rasheed wrote: > On Mon, 1 Sept 2025 at 10:36, Amul Sul wrote: >> I believe we should update all *_opt_error functions to use the new >> soft error reporting infrastructure instead of boolean flags -- did >> the same in the attached patch. I am not su

Re: PG 18 release notes draft committed

2025-09-01 Thread Yugo Nagata
On Thu, 1 May 2025 22:44:50 -0400 Bruce Momjian wrote: > I have committd the first draft of the PG 18 release notes. The item > count looks strong: I noticed that the following commit seems to be missing from the release notes: 2024-09-17 [89f908a6d] Add temporal FOREIGN KEY contraints I bel

Re: COPY TO: provide hint when WHERE clause is used

2025-09-01 Thread Jim Jones
On 01.09.25 11:09, Fujii Masao wrote: > The patch looks good to me. Barring any objections, I'm thinking to > commit the patch. LGTM. The HINT was added to copy2's test output and check-world passes. Thanks! Best, Jim

Re: Improve LWLock tranche name visibility across backends

2025-09-01 Thread Bertrand Drouvot
Hi, On Sat, Aug 30, 2025 at 09:14:46AM -0500, Nathan Bossart wrote: > On Fri, Aug 29, 2025 at 09:51:38PM -0500, Nathan Bossart wrote: > > I've also attached a rebased patch that addresses all the latest feedback. > > A reworked verison of the test patch is also included, but that's mostly > > inte

Re: Changing the state of data checksums in a running cluster

2025-09-01 Thread Tomas Vondra
On 8/29/25 16:38, Tomas Vondra wrote: > On 8/29/25 16:26, Tomas Vondra wrote: >> ... >> >> I've seen these failures after changing checksums in both directions, >> both after enabling and disabling. But I've only ever saw this after >> immediate shutdown, never after fast shutdown. (It's interestin

Re: Conflict detection for update_deleted in logical replication

2025-09-01 Thread shveta malik
On Mon, Sep 1, 2025 at 5:07 PM Zhijie Hou (Fujitsu) wrote: > > > I reviewed the patch internally and tweaked a small detail of the apply worker > to reduce the waiting time in the main loop when max_retention_duration is > defined (set wait_time = min(wait_time, max_retention_duration)). Also, I

Re: Improve LWLock tranche name visibility across backends

2025-09-01 Thread Rahila Syed
Hi, > I've also attached a rebased patch that addresses all the latest feedback. > A reworked verison of the test patch is also included, but that's mostly > intended for CI purposes and is still not intended for commit (yet). > > Please see below for some comments regarding v20 patch. 1. Follow

Re: ABI Compliance Checker GSoC Project

2025-09-01 Thread David E. Wheeler
On Aug 31, 2025, at 10:17, Mankirat Singh wrote: > I have updated the module to report a failure status whenever any ABI change > is detected without specific conditions. For example, the image attached from > my local server gave a failure status on the ABICompCheck step when comparing > REL_

Re: Generate GUC tables from .dat file

2025-09-01 Thread David E. Wheeler
Hi John, On Sep 1, 2025, at 03:21, John Naylor wrote: > I find the loop over @parse a lot less readable this way. Yeah, that’s the trade-off. Probably not worth it to reduce legibility. >> * Use the /r regex return sequence to simplify dquote() (requires Perl 5.14, >> IIRC) > > I think our p

Re: RFC: Logging plan of the running query

2025-09-01 Thread torikoshia
On 2025-06-02 21:56, torikoshia wrote: On 2025-05-23 17:50, Atsushi Torikoshi wrote: Thanks for the idea and the sample patch! Agreed. I’ll go ahead and implement a new patch based on this approach. Rebased just because of doc refactoring. -- Regards, -- Atsushi Torikoshi Seconded from NTT

Re: pgbench - adding pl/pgsql versions of tests

2025-09-01 Thread Robert Treat
On Wed, Jul 23, 2025 at 12:18 PM Hannu Krosing wrote: > On Sun, Jul 6, 2025 at 11:52 PM Hannu Krosing wrote: > > On Sat, Feb 3, 2024 at 8:54 AM Hannu Krosing wrote: > > > > > > My justification for adding pl/pgsql tests as part of the immediately > > > available tests > > > is that pl/pgsql its

Re: Generate GUC tables from .dat file

2025-09-01 Thread John Naylor
On Thu, Aug 28, 2025 at 1:53 PM Peter Eisentraut wrote: > Ok, good suggestions. I addressed all those, and did another cleanup > pass over the script. (The formatting is from pgperltidy.) I have no further comments on v3. On Fri, Aug 29, 2025 at 1:03 AM David E. Wheeler wrote: > And since I g

Refactoring: Use soft error reporting for *_opt_error functions

2025-09-01 Thread Amul Sul
Hi, While reviewing version v6 of the CAST(... ON DEFAULT) patch [1], I noticed that it attempts to change the type conversion function to use soft error reporting. However, some of the underlying functions of the type conversion, such as *_opt_error, still rely on a boolean argument passed by the

Re: Raw parse tree is not dumped to log

2025-09-01 Thread John Naylor
On Mon, Sep 1, 2025 at 8:13 AM Tatsuo Ishii wrote: > > > Branch alignment surely shouldn't matter in a function that is called > > once per query? > > According to my test, it seems using unlikely() makes a small but > non-negligible performance improvement over the code without > unlikely() for s

Re: New commitfest app release on August 19th

2025-09-01 Thread vignesh C
On Fri, 8 Aug 2025 at 12:50, Jelte Fennema-Nio wrote: > > Thanks to the Claude Code AI tool I was able to get some boring > cleanup done on the CF app in not that much time. I'll release all of > it on August 19th. > > List of the changes: > - Update to Bootstrap 5 for more modern visual look and

Re: Extension security improvement: Add support for extensions with an owned schema

2025-09-01 Thread Julien Rouhaud
On Tue, 12 Aug 2025, 03:24 Robert Haas, wrote: > On Mon, Aug 11, 2025 at 1:55 PM Robert Haas wrote: > > [ some review ] > > Another thing that's occurring to me here is that nothing prevents > other objects from making their way into the owned schema. Sure, if we > create a new schema with nobod

Re: SQL:2023 JSON simplified accessor support

2025-09-01 Thread Chao Li
> On Aug 27, 2025, at 15:26, Chao Li wrote: > > diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h > index f7d07c84542..58a4b9df157 100644 > --- a/src/include/parser/parse_node.h > +++ b/src/include/parser/parse_node.h > @@ -361,7 +361,7 @@ extern SubscriptingRef >

Re: COPY TO: provide hint when WHERE clause is used

2025-09-01 Thread Fujii Masao
On Mon, Sep 1, 2025 at 7:58 AM Atsushi Torikoshi wrote: > > > > On Sun, Aug 31, 2025 at 3:14 AM Jim Jones wrote: > > > > Hi > > > > On 19.08.25 03:35, torikoshia wrote: > > > Considering what the user was trying to do, it might be helpful to > > > provide a similar hint in this case as well. > >

Re: Replace magic numbers with strategy numbers for B-tree indexes

2025-09-01 Thread Nikita Malakhov
Hi Daniil! Please correct if I'm wrong, but it seems Peter had another approach in mind - magic numbers in separate macros could be easily replaced with enums and validation functions, which would make code more readable and less 'magical'. Please check the POC patch in attach. I've made this just

new warnings with clang-21 / how const is Datum

2025-09-01 Thread Peter Eisentraut
clang-21 shows some new warnings: ../src/backend/access/common/toast_internals.c:296:33: error: variable 'chunk_data' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 296 | t_values[2] = PointerGetDatum(&chunk_data); ../src/backen

Orphan page in _bt_split

2025-09-01 Thread Konstantin Knizhnik
Hi hacker, The function _bt_split creates new (right) page to split into. The comment says:     /*      * Acquire a new right page to split into, now that left page has a new      * high key.  From here on, it's not okay to throw an error without      * zeroing rightpage first.  This coding rule

Re: Issue with logical replication slot during switchover

2025-09-01 Thread Fabrice Chapuis
Hi, I will make de modifications based on the remarks you mentioned. Regards, Fabrice On Mon, Sep 1, 2025 at 5:45 AM shveta malik wrote: > On Sat, Aug 30, 2025 at 11:43 AM Shlok Kyal > wrote: > > > > Hi Fabrice, > > > > Thanks for providing the patch. I reviewed your patch and have > > follow

Re: Refactoring: Use soft error reporting for *_opt_error functions

2025-09-01 Thread Dean Rasheed
On Mon, 1 Sept 2025 at 10:36, Amul Sul wrote: > > I believe we should update all *_opt_error functions to use the new > soft error reporting infrastructure instead of boolean flags -- did > the same in the attached patch. I am not sure if this patch should be > part of that thread[1]. It's a signi

Re: Add progressive backoff to XactLockTableWait functions

2025-09-01 Thread Xuneng Zhou
Hi, > Some changes in v10: > > 1) XidWaitHashLock is used for all operations on XidWaitHash though > might be unnecessary for some cases. > 2) Field pg_atomic_uint32 waiter_count was removed from the > XidWaitEntry. The start process now takes charge of cleaning up the > XidWaitHash entry after wa

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-09-01 Thread Jacques Combrink
I came across this discussion after we had this problem at least twice now at work. I read through the discussion to see if this is the problem we are experiencing. At first, I thought this was not exactly our problem, because of the way it was showed to be reproduced. With a long running tran

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2025-09-01 Thread David Geier
Hi Lukas! On 01.03.2025 08:45, Lukas Fittl wrote: > On Sun, Jun 2, 2024 at 1:08 AM Andres Freund wrote: > >> At some point this patch switched from rdtsc to rdtscp, which imo largely >> negates the point of it. What lead to that? > > > From what I can gather, it appears this was an oversight

Re: split func.sgml to separated individual sgml files

2025-09-01 Thread Florents Tselai
On 4 Aug 2025, at 4:09 PM, Andrew Dunstan wrote: On 2025-07-29 Tu 11:40 AM, Tom Lane wrote: Andrew Dunstan writes: OK. I'm inclined to do this after the CF finishes, to avoid collisions with other patches. I assume it's going to make the CFbot fairly unhappy. +1 for proceeding that way. (I

Re: Replace magic numbers with strategy numbers for B-tree indexes

2025-09-01 Thread Daniil Davydov
Hi, On Mon, Sep 1, 2025 at 3:27 PM Nikita Malakhov wrote: > > Please correct if I'm wrong, but it seems Peter had another approach in mind - > magic numbers in separate macros could be easily replaced with enums and > validation functions, which would make code more readable and less 'magical'. >

Re: SQL:2023 JSON simplified accessor support

2025-09-01 Thread David G. Johnston
On Monday, September 1, 2025, Chao Li wrote: > > The last comment is about error message: > > ``` > evantest=# select data.a from test_jsonb_types; > ERROR: missing FROM-clause entry for table "data" > LINE 1: select data.a from test_jsonb_types; > ``` > > “Missing FROM-clause entry” is quite co

Re: Orphan page in _bt_split

2025-09-01 Thread Michael Paquier
On Mon, Sep 01, 2025 at 03:04:58PM -0400, Peter Geoghegan wrote: > This hazard has existing since commit 8fa30f906b, from 2010. That's > the commit that introduced the general idea of making _bt_split zero > its rightpage in order to make it safe to throw an ERROR instead of just > PANICing. Thank

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-09-01 Thread shveta malik
On Tue, Sep 2, 2025 at 10:24 AM shveta malik wrote: > > Few trivial comments for doc: Sorry, the email got sent without comments. 1) +It is important to note that when wal_level is set to +replica the effective WAL level can automatically change comma after replica missing. 2)

Re: SQL:2023 JSON simplified accessor support

2025-09-01 Thread Chao Li
Hi Alex, Thank you so much for such a detailed explanation. > On Aug 30, 2025, at 08:53, Alexandra Wang > wrote: > > > > I hope this long explanation helps! > > [1] > https://www.postgresql.org/docs/current/functions-json.html#SQLJSON-QUERY-FUNCTIONS > > I used to only use the “->” and

Re: Fixing MSVC's inability to detect elog(ERROR) does not return

2025-09-01 Thread David Rowley
On Thu, 24 Jul 2025 at 23:03, Peter Eisentraut wrote: > Please review my patch at > > https://www.postgresql.org/message-id/ccb273c9-7544-4748-8638-30feba212...@eisentraut.org > https://commitfest.postgresql.org/patch/5934/ Now that we're building with C11, here's a rebased patch with the new pg_