Adding support for Row Compares to nbtree startikey optimization

2025-07-05 Thread Peter Geoghegan
Postgres 18 commit 8a510275 taught nbtree to apply page-level context to determine an offset into the so->keyData[] array (pstate.ikey/startikey) that works for the duration of a call to _bt_readpage. Affected _bt_readpage calls have _bt_checkkeys calls that use fewer CPU cycles, since all the _bt_

Re: C11 / VS 2019

2025-07-05 Thread Tom Lane
Peter Eisentraut writes: > On 04.06.25 08:15, Peter Eisentraut wrote: >> For an explanation, the background is that MSVC has a "traditional" >> preprocessor and a new "conforming" one.  The latter is available >> starting in VS 2019, but it's not the default.  We have some code, >> especially a

Re: NegotiateProtocolVersion description

2025-07-05 Thread Tatsuo Ishii
> A similar issue was discussed, and a patch was proposed in [1]. > That thread might be worth reading. Thanks. I will take a look at it. Best regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp

Re: NegotiateProtocolVersion description

2025-07-05 Thread Tatsuo Ishii
> Add an example? I like the wording as-is, though I can see your point. I > wouldn’t expect the returned value to be a fragment of a version in this > context so minor just emphasizes that the client is applying a filter on > the major version it supports. I’d be ok with removing “minor” altoge

Re: A assert failure when initdb with track_commit_timestamp=on

2025-07-05 Thread Tom Lane
I wrote: > Fujii Masao writes: >> Or GUC ignore_system_indexes also should be treated in the same way >> as transaction_timeout? > Yes, I'd say we ought to mark that GUC as don't-accept-in-bootstrap > too. I've not done any research about what other GUCs can break > initdb, but now I'm starting

Re: Trim the heap free memory

2025-07-05 Thread shawn wang
Thank you very much for your response. > To propose something less abstract / more tangible, I think we should do > something like this: > > 1) add a bit of code for glibc-based systems, that adjusts selected > malloc parameters using mallopt() during startup > > 2) add a GUC that enables this, w

Re: [PATCH] initdb: Treat empty -U argument as unset username

2025-07-05 Thread Tom Lane
Jianghua Yang writes: > I wanted to ask if this patch can be merged first, as it seems to be a > separate issue different from the aclitem parsing problem Tom discussed in > https://www.postgresql.org/message-id/3792884.1751492172%40sss.pgh.pa.us Merging your patch will make it more difficult to

Re: A assert failure when initdb with track_commit_timestamp=on

2025-07-05 Thread Tom Lane
Fujii Masao writes: > On 2025/07/05 2:17, Tom Lane wrote: >> Oh, good point. But there doesn't seem to be any ill effect from >> making BootstrapModeMain set BootstrapProcessing a bit earlier. > Maybe. But I noticed that your patch also moves the line "IgnoreSystemIndexes > = true;" > earlier.

Re: [PATCH] initdb: Treat empty -U argument as unset username

2025-07-05 Thread Jianghua Yang
Hello Daniel, Tom lane I wanted to ask if this patch can be merged first, as it seems to be a separate issue different from the aclitem parsing problem Tom discussed in https://www.postgresql.org/message-id/3792884.1751492172%40sss.pgh.pa.us

Re: A assert failure when initdb with track_commit_timestamp=on

2025-07-05 Thread Fujii Masao
On 2025/07/05 2:17, Tom Lane wrote: Fujii Masao writes: On 2025/07/05 0:30, Tom Lane wrote: As I remarked in the other thread, I don't like inventing a different solution for each GUC. So if there are even two that need something done, I think Hayato-san's idea has merit. This code seem

024_add_drop_pub.pl might fail due to deadlock

2025-07-05 Thread Alexander Lakhin
Hello hackers, The recent buildfarm failure [1] on REL_15_STABLE with the following diagnostics: # Looks like your test exited with 29 just after 1. t/024_add_drop_pub.pl .. Dubious, test returned 29 (wstat 7424, 0x1d00) pgsql.build/src/test/subscription/tmp_check/log/regress_log_024

Re: NegotiateProtocolVersion description

2025-07-05 Thread Fujii Masao
On 2025/07/05 19:30, Tatsuo Ishii wrote: In the docs (54.7. Message Formats) NegotiateProtocolVersion message's third field is described as below: "Newest minor protocol version supported by the server for the major protocol version requested by the client. " From the description initially

Re: Buildfarm animal prion can't complete tests in 4 hours nowadays

2025-07-05 Thread Andrew Dunstan
On 2025-07-05 Sa 5:00 AM, Alexander Lakhin wrote: Hello Andrew, I've noticed that prion fails with timeout rather frequently this week. Probably this is caused just by increased total number and duration of tests, as we can see timeouts at different stages: [1] # +++ tap install-check in src/t

Re: NegotiateProtocolVersion description

2025-07-05 Thread David G. Johnston
On Saturday, July 5, 2025, Tatsuo Ishii wrote: > In the docs (54.7. Message Formats) NegotiateProtocolVersion message's > third field is described as below: > > "Newest minor protocol version supported by the server for the major > protocol version requested by the client. " > > From the descript

Re: Bloom Filter improvements in postgesql

2025-07-05 Thread Ross Heaney
Hi, I appreciate you taking the time to leave feedback. I would like to address your points I think this has a major flaw, in that it is nearly impossible to guarantee zero false positives in practice using the scheme you describe. Assuming 1 bit for each element that passes the main Bloom filter

Re: Inconsistent LSN format in pg_waldump output

2025-07-05 Thread Masahiko Sawada
On Fri, Jul 4, 2025 at 8:01 PM Álvaro Herrera wrote: > > On 2025-Jul-04, Japin Li wrote: > > > I've opted to directly use %X/%08X for LSN formatting in this patch, with an > > accompanying comment near LSN_FORMAT_ARGS. > > Thank you! I support this approach and intend to work on getting this > pa

Re: Binary operators for cubes

2025-07-05 Thread Kirill Panin
Hi, Thanks for your response. Do you think it makes sense to disallow cube+cube operations and only allow cube+point or point+point instead? Dot and cross products would be similarly only defined for point+point if someone were to implement them. I'll submit a v2 if this is an acceptable solut

Re: Add \pset options for boolean value display

2025-07-05 Thread Vik Fearing
On 25/06/2025 00:30, Tom Lane wrote: "David G. Johnston" writes: On Thu, Mar 20, 2025 at 8:24 PM David G. Johnston < david.g.johns...@gmail.com> wrote: It's \pset null for boolean values Do we really want this? Yes, many of us do. It's the sort of thing that has a strong potential to

Re: Conflict detection for update_deleted in logical replication

2025-07-05 Thread Dilip Kumar
On Sat, Jul 5, 2025 at 2:26 PM Dilip Kumar wrote: > > On Fri, Jul 4, 2025 at 4:48 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Wed, Jul 2, 2025 at 3:28 PM Hou, Zhijie wrote: > > > Kindly use the latest patch set for performance testing. > > > > During testing, we observed a limitation in cascading

Re: Changing shared_buffers without restart

2025-07-05 Thread Dmitry Dolgov
> On Fri, Jul 04, 2025 at 05:23:29PM +0200, Tomas Vondra wrote: > >> 2) pending GUC changes > >> > >> Perhaps this should be a separate utility command, or maybe even just > >> a new ALTER SYSTEM variant? Or even just a function, similar to what > >> the "online checksums" patch did, possibly combi

NegotiateProtocolVersion description

2025-07-05 Thread Tatsuo Ishii
In the docs (54.7. Message Formats) NegotiateProtocolVersion message's third field is described as below: "Newest minor protocol version supported by the server for the major protocol version requested by the client. " >From the description initially I thought the field value is minor protocol ve

Buildfarm animal prion can't complete tests in 4 hours nowadays

2025-07-05 Thread Alexander Lakhin
Hello Andrew, I've noticed that prion fails with timeout rather frequently this week. Probably this is caused just by increased total number and duration of tests, as we can see timeouts at different stages: [1] # +++ tap install-check in src/test/modules/test_misc +++ t/001_constraint_validation

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-07-05 Thread Peter Eisentraut
On 01.07.25 10:47, Daniel Gustafsson wrote: On 29 Jun 2025, at 12:56, Peter Eisentraut wrote: On 27.06.25 11:15, Daniel Gustafsson wrote: On 26 Jun 2025, at 23:06, Daniel Gustafsson wrote: I'll propose changes for these comments in the morning when coffee has been had. The attached moves to

Re: Conflict detection for update_deleted in logical replication

2025-07-05 Thread Dilip Kumar
On Fri, Jul 4, 2025 at 4:48 PM Zhijie Hou (Fujitsu) wrote: > > On Wed, Jul 2, 2025 at 3:28 PM Hou, Zhijie wrote: > > Kindly use the latest patch set for performance testing. > > During testing, we observed a limitation in cascading logical replication > setups, such as (A -> B -> C). When retain_c

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2025-07-05 Thread Alvaro Herrera
On 2025-Jul-04, Tom Lane wrote: > Alvaro Herrera writes: > > On 2025-Jul-04, Alvaro Herrera wrote: > >> Hmm, crake doesn't like the fact that there's no regnamespace in 9.4. > >> Apparently in version 13 we claim to support back to 9.0. I only tried > >> with an old server version 12. Should be

Re: array_random

2025-07-05 Thread Vik Fearing
On 30/06/2025 17:04, jian he wrote: reasons for adding array_random is: 1. This is better than array_fill. This can fill random and constant values (random, min and max the same). 2. Building a multi-dimensional PL/pgSQL function equivalent to array_random is not efficient and is also not easie

Re: Adding basic NUMA awareness - Preliminary feedback and outline for an extensible approach

2025-07-05 Thread Cédric Villemain
Hi Tomas, I haven't yet had time to fully read all the work and proposals around NUMA and related features, but I hope to catch up over the summer. However, I think it's important to share some thoughts before it's too late, as you might find them relevant to the NUMA management code. 6)