Re: CRC32C Parallel Computation Optimization on ARM

2025-04-01 Thread John Naylor
On Wed, Mar 19, 2025 at 12:54 AM Bruce Momjian wrote: > Contributing code is copyright, which is unrelated to patents. I don't > think the Postgres community even has a method of accepting patent usage > grants. Since the legal status is still unclear, I've marked the CF entry Returned with Feed

Re: Change log level for notifying hot standby is waiting non-overflowed snapshot

2025-04-01 Thread Fujii Masao
On 2025/04/01 20:54, torikoshia wrote: Thank you for updating the patch! LGTM. I've pushed the patch. Thanks! I feel like changing the status to 'Ready for Committer', but since Nagata-san may have additional comments, I'm leaving it as 'Needs Review'. If any issues arise, let's contin

Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX

2025-04-01 Thread Gurjeet Singh
On Sun, Sep 22, 2024 at 3:45 PM David Rowley wrote: > I think the documents should also mention that disabling an index is a > useful way to verify an index is not being used before dropping it as > the index can be enabled again at the first sign that performance has > been effected. (It might a

RE: Fix slot synchronization with two_phase decoding enabled

2025-04-01 Thread Zhijie Hou (Fujitsu)
On Wed, Apr 2, 2025 at 12:41 PM Amit Kapila wrote: > > On Tue, Apr 1, 2025 at 4:28 PM Zhijie Hou (Fujitsu) > > wrote: > > > > Here is the V3 patch set which addressed all the comments. > > > > Comment 0n 0001 > NULL for logical slots where > + two_phase is false and physical slots. > +

Re: pgsql: Add memory/disk usage for Window aggregate nodes in EXPLAIN.

2025-04-01 Thread Christoph Berg
Re: Tatsuo Ishii > Add memory/disk usage for Window aggregate nodes in EXPLAIN. This is failing for PG18 on Debian unstable on 32-bit i386: build/src/test/regress/regression.diffs diff -U3 /build/reproducible-path/postgresql-18-18~~devel.20250331/src/test/regress/expected/expla

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-01 Thread Amit Kapila
On Tue, Apr 1, 2025 at 4:28 PM Zhijie Hou (Fujitsu) wrote: > > Here is the V3 patch set which addressed all the comments. > Comment 0n 0001 NULL for logical slots where + two_phase is false and physical slots. + change above to: NULL for logical slots where two_phase is false and for

Re: CREATE SUBSCRIPTION - add missing test case

2025-04-01 Thread Peter Smith
Thanks for pushing. == Kind Regards, Peter Smith. Fujitsu Australia

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

2025-04-01 Thread jian he
hi. the following are reviews of changes in pg_dump on v6-0001-NOT-NULL-NOT-VALID.patch minor style tweak: + "CASE WHEN NOT co.convalidated THEN co.oid" + " ELSE NULL END AS notnull_invalidoid,\n" align with surrounding code convention: leave white space at the end, not beginning. maybe we can +

Re: Statistics Import and Export

2025-04-01 Thread Nathan Bossart
On Tue, Apr 01, 2025 at 03:05:59PM -0700, Jeff Davis wrote: > To restate the problem: one of the problems being solved here is that > the existing code for custom-format dumps calls WriteToc twice. That > was not a big problem before this patch, when the contents of the > entries was easily accessi

Re: TEMP_CONFIG vs test_aio

2025-04-01 Thread Andrew Dunstan
On 2025-04-01 Tu 4:17 PM, Andres Freund wrote: Hi, On 2025-04-01 20:12:29 +, Todd Cook wrote: On 4/1/25, 3:42 PM, "Andres Freund" mailto:and...@anarazel.de>> wrote: I just committed the tests for AIO, and unfortunately they (so far) fail on one buildfarm animal: https://buildfarm.postgres

Re: bug when apply fast default mechanism for adding new column over domain with default value

2025-04-01 Thread Tender Wang
Tom Lane 于2025年4月2日周三 09:05写道: > Alexander Lakhin writes: > > I've discovered that 95f650674 introduced a defect similar to bug #18297, > > but this time with DEFAULT. Namely, the following script: > > CREATE TABLE a (aa text); > > CREATE TABLE c (cc text) INHERITS (a); > > CREATE TABLE d (dd te

Re: Statistics Import and Export

2025-04-01 Thread Robert Haas
On Tue, Apr 1, 2025 at 4:24 PM Jeff Davis wrote: > On Tue, 2025-04-01 at 09:37 -0400, Robert Haas wrote: > > I don't think I was aware of the open item; I was just catching up on > > email. > > I lean towards making it opt-in for pg_dump and opt-out for pg_upgrade. Big +1. > But I think we shoul

Re: Reduce "Var IS [NOT] NULL" quals during constant folding

2025-04-01 Thread Richard Guo
On Wed, Apr 2, 2025 at 4:34 AM Robert Haas wrote: > On Tue, Apr 1, 2025 at 2:34 AM Richard Guo wrote: > > However, I gave up this idea because I realized it would require > > retrieving a whole bundle of catalog information that isn't needed > > until after the RelOptInfos are built, such as max_

Re: Add mention in docs about locking all partitions for generic plans

2025-04-01 Thread David Rowley
On Mon, 31 Mar 2025 at 12:19, David Rowley wrote: > I'll push these in the next few days unless anyone else wants to voice > their opinions. Thanks for the review. Pushed. David

Re: bug when apply fast default mechanism for adding new column over domain with default value

2025-04-01 Thread Tom Lane
Alexander Lakhin writes: > I've discovered that 95f650674 introduced a defect similar to bug #18297, > but this time with DEFAULT. Namely, the following script: > CREATE TABLE a (aa text); > CREATE TABLE c (cc text) INHERITS (a); > CREATE TABLE d (dd text) INHERITS (c, a); > ALTER TABLE a ADD COLU

Re: AIO v2.5

2025-04-01 Thread Noah Misch
On Tue, Apr 01, 2025 at 06:25:28PM -0400, Andres Freund wrote: > On 2025-04-01 17:47:51 -0400, Andres Freund wrote: > > 3) Some subtests fail if RELCACHE_FORCE_RELEASE and CATCACHE_FORCE_RELEASE > > are defined: > > > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2025-04-01%2

Covering the comparison between date and timestamp, tz, type

2025-04-01 Thread Kwangwon Seo
Hi, Using the PostgreSQL code coverage report, I found that tests for comparisons between date and timestamp[tz] are missing. Some of them have only partial coverage. Attached patch will cover following functions: date_eq_timestamp date_ne_timestamp date_lt_timestamp date_gt_timestamp // already

Re: Small memory fixes for pg_createsubcriber

2025-04-01 Thread Michael Paquier
On Apr 2, 2025, at 5:14, Noah Misch wrote:Yes, pg_upgrade should not do that.  I was trying to explain the differencebetween NULL and 'NULL'.  I didn't mean pg_upgrade should emit "IS NULL".(Apologies for the probably-weirdly-formatted message)This issue has been already mentioned around here, wit

Re: general purpose array_sort

2025-04-01 Thread Junwang Zhao
On Wed, Apr 2, 2025 at 6:05 AM Tom Lane wrote: > > Junwang Zhao writes: > > On Tue, Apr 1, 2025 at 1:11 AM Tom Lane wrote: > >> Attached 0001 is the same as v18, and then 0002 is the proposed > >> addition to typcache. > > > I've applied the patches to master and regression passed. > > 0002 is n

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

2025-04-01 Thread Peter Geoghegan
On Tue, Apr 1, 2025 at 5:56 PM Matthias van de Meent wrote: > 0002: > > // nbtutils.c > > > + * (safe even when "key->sk_attno <= firstchangingattnum") > > Typo: should be "key->sk_attno >= firstchangingattnum". Good catch! Though I think it should be "" safe even when "key->sk_attno

Re: Hashed IN only applied to first encountered IN

2025-04-01 Thread David Rowley
On Wed, 2 Apr 2025 at 01:31, David Rowley wrote: > > On Wed, 2 Apr 2025 at 00:51, David Geier wrote: > > The hashed IN optimization is only applied to the first encountered > > ScalarArrayOpExpr during the expression tree traversal in > > convert_saop_to_hashed_saop_walker(). Reason being that th

Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)

2025-04-01 Thread Shayon Mukherjee
On Tue, Apr 1, 2025 at 2:41 PM Sami Imseih wrote: > I went back to look at this patch and a few things. I noticed it did > not have correct > indentation, so I ran pgindent. I also removed some extra lines added and > made > some slight adjustments to the docs. Attached my edited patch as a txt.

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-01 Thread Jacob Champion
On Mon, Mar 31, 2025 at 7:06 AM Christoph Berg wrote: > Perhaps we could do the same with libldap and libgssapi? (Though > admittedly I have never seen any complaints or nagging questions from > security people about these.) If we end up happy with how the Curl indirection works, that seems like

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

2025-04-01 Thread Matthias van de Meent
On Fri, 28 Mar 2025 at 22:59, Peter Geoghegan wrote: > > On Tue, Mar 25, 2025 at 7:45 PM Peter Geoghegan wrote: > > Attached is v31, which has a much-improved _bt_skip_ikeyprefix (which > > I've once again renamed, this time to _bt_set_startikey). > > Attached is v32 Thanks! The review below wa

Re: Using read stream in autoprewarm

2025-04-01 Thread Melanie Plageman
On Tue, Apr 1, 2025 at 8:50 AM Nazir Bilal Yavuz wrote: > > I am attaching v8, which is an updated version of the v7. I tried to > get rid of these local variables and refactored code to make logic > more straightforward instead of going back and forth. > > 0001 and 0002 are v8. 0003 is another re

Re: AIO v2.5

2025-04-01 Thread Andres Freund
Hi, On 2025-04-01 17:47:51 -0400, Andres Freund wrote: > 3) Some subtests fail if RELCACHE_FORCE_RELEASE and CATCACHE_FORCE_RELEASE > are defined: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2025-04-01%2019%3A23%3A07 > > # +++ tap check in src/test/modules/test_aio +++

Re: [PATCH v1] parallel pg_restore: avoid disk seeks when jumping short distance forward

2025-04-01 Thread Dimitrios Apostolou
Thanks. This is the first value I tried and it works well. In the archive I have all blocks seem to be between 8 and 20KB so the jump forward before the change never even got close to 1MB. Could it be bigger in an uncompressed archive? Or in a future pg_dump that raises the block size? I don't r

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

2025-04-01 Thread Matthias van de Meent
On Tue, 1 Apr 2025 at 04:02, Peter Geoghegan wrote: > > On Fri, Mar 28, 2025 at 5:59 PM Peter Geoghegan wrote: > > Attached is v32, which has very few changes, but does add a new patch: > > a patch that adds skip-array-specific primitive index scan heuristics > > to _bt_advance_array_keys (this i

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

2025-04-01 Thread Matthias van de Meent
On Tue, 1 Apr 2025 at 23:56, Matthias van de Meent wrote: > > On Tue, 1 Apr 2025 at 04:02, Peter Geoghegan wrote: > > > > On Fri, Mar 28, 2025 at 5:59 PM Peter Geoghegan wrote: > > > Attached is v32, which has very few changes, but does add a new patch: > > > a patch that adds skip-array-specifi

Re: Statistics Import and Export

2025-04-01 Thread Jeff Davis
On Tue, 2025-04-01 at 13:44 -0500, Nathan Bossart wrote: > Apologies for the noise.  I noticed one more way to simplify 0002.  > As > before, there should be no functional differences. To restate the problem: one of the problems being solved here is that the existing code for custom-format dumps

Re: general purpose array_sort

2025-04-01 Thread Tom Lane
Junwang Zhao writes: > On Tue, Apr 1, 2025 at 1:11 AM Tom Lane wrote: >> Attached 0001 is the same as v18, and then 0002 is the proposed >> addition to typcache. > I've applied the patches to master and regression passed. > 0002 is neat, I am +1 for this improvement. Hearing no further comments

Re: Fix 035_standby_logical_decoding.pl race conditions

2025-04-01 Thread Amit Kapila
On Tue, Apr 1, 2025 at 2:02 PM Bertrand Drouvot wrote: > > Hi Kuroda-san, > > On Tue, Apr 01, 2025 at 01:22:49AM +, Hayato Kuroda (Fujitsu) wrote: > > Dear Bertrand, > > > > Thanks for the updated patch! > > > > s/to avoid the seeing a xl_running_xacts/to avoid seeing a > > > xl_running_xacts

Making sslrootcert=system work on Windows psql

2025-04-01 Thread George MacKerron
I was very pleased to see the sslrootcert=system connection option added in Postgres 16 (I even blogged about it: https://neon.tech/blog/avoid-mitm-attacks-with-psql-postgres-16). But sslrootcert=system has not been widely supported by psql installations, perhaps because people compiling Postgr

Re: TEMP_CONFIG vs test_aio

2025-04-01 Thread Andres Freund
Hi, On 2025-04-01 17:08:49 -0400, Andrew Dunstan wrote: > On 2025-04-01 Tu 4:17 PM, Andres Freund wrote: > > For one using PG_TEST_INITDB_EXTRA_OPTS would probably require changing the > > buildfarm code, because the buildfarm code filters out environment variables > > that aren't on an allowlist

Re: AIO v2.5

2025-04-01 Thread Andres Freund
Hi, On 2025-04-01 11:55:20 -0400, Andres Freund wrote: > I haven't yet pushed the changes, but will work on that in the afternoon. There are three different types of failures in the test_aio test so far: 1) TEMP_CONFIG See https://postgr.es/m/zh5u22wbpcyfw2ddl3lsvmsxf4yvsrvgxqwwmfjddc4c2khsgp%

Re: Making sslrootcert=system work on Windows psql

2025-04-01 Thread Jacob Champion
On Tue, Apr 1, 2025 at 2:05 PM George MacKerron wrote: > > I was very pleased to see the sslrootcert=system connection option added in > Postgres 16 (I even blogged about it: > https://neon.tech/blog/avoid-mitm-attacks-with-psql-postgres-16). But > sslrootcert=system has not been widely support

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

2025-04-01 Thread Peter Geoghegan
On Tue, Apr 1, 2025 at 10:40 AM Matthias van de Meent wrote: > The review below was started for v31, then adapted to v32 when that > arrived. I haven't cross-checked this with v33. There's been hardly any changes to 0001- in quite a while, so that's fine. > > Teach nbtree composite index scans t

Re: Add partial :-variable expansion to psql \copy

2025-04-01 Thread Corey Huinker
> > I'm hesitating about the right syntax, though, for an input backslash > command which in effect would really only apply to COPY? ISTM that \g* is > used for "go", i.e. a semi-colon replacement which executes the SQL, and we > should want the same thing, which suggests: > making it a \g-variant

Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

2025-04-01 Thread David Rowley
On Tue, 1 Apr 2025 at 20:52, Ilia Evdokimov wrote: > With the feature freeze coming up soon, I’d like to ask: do we plan to > include this patch in v18? I don't think there's a clear enough consensus yet on what EXPLAIN should display. We'd need that beforehand. There are now less than 7 days to

Re: TEMP_CONFIG vs test_aio

2025-04-01 Thread Andres Freund
Hi, On 2025-04-01 20:12:29 +, Todd Cook wrote: > On 4/1/25, 3:42 PM, "Andres Freund" > wrote: > > I just committed the tests for AIO, and unfortunately they (so far) fail on > > one buildfarm animal: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bumble

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

2025-04-01 Thread Alvaro Herrera
On 2025-Mar-28, jian he wrote: > ATPrepAddPrimaryKey > + if (!conForm->convalidated) > + ereport(ERROR, > + errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), > + errmsg("not-null constraint \"%s\" of table \"%s\" has not been validated", > + NameStr(conForm->conname), > + RelationGetRelationN

Re: [PATCH] Fix build on MINGW on ARM64

2025-04-01 Thread Andrew Dunstan
On 2025-04-01 Tu 11:15 AM, Andrew Dunstan wrote: On 2025-04-01 Tu 8:47 AM, vignesh C wrote: On Tue, 1 Apr 2025 at 16:02, Andrew Dunstan wrote: On 2025-04-01 Tu 5:16 AM, vignesh C wrote: On Sun, 2 Feb 2025 at 00:52, Lars Kanis wrote: This patch limits the workaround of using __buildin_se

Re: TEMP_CONFIG vs test_aio

2025-04-01 Thread Noah Misch
On Tue, Apr 01, 2025 at 03:42:44PM -0400, Andres Freund wrote: > The reason for the failure is simple, the buildfarm animal specifies > io_method=io_uring (thanks to "cookt" for setting that up so quickly, whoever > you are :)) and the test is assuming that the -c io_method=... it passes to > initd

Re: Statistics Import and Export

2025-04-01 Thread Jeff Davis
On Tue, 2025-04-01 at 09:37 -0400, Robert Haas wrote: > I don't think I was aware of the open item; I was just catching up on > email. I lean towards making it opt-in for pg_dump and opt-out for pg_upgrade. But I think we should leave open the possibility for changing the default to opt-out for pg

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-04-01 Thread Daniel Gustafsson
I took another pass at this one and did a few small tweaks, so I would to take it for another spin across CI before looking at committing it. There are no functionality changes, only polish. -- Daniel Gustafsson v11-0001-libpq-Add-support-for-dumping-SSL-keylog-to-file.patch Description: Binar

Re: Draft for basic NUMA observability

2025-04-01 Thread Tomas Vondra
Hi, I've spent a bit of time reviewing this. In general I haven't found anything I'd call a bug, but here's a couple comments for v18 ... Most of this is in separate "review" commits, with a couple exceptions. 1) Please update the commit messages, with proper formatting, etc. I tried to do that i

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

2025-04-01 Thread Matthias van de Meent
On Tue, 1 Apr 2025 at 21:02, Peter Geoghegan wrote: > > On Tue, Apr 1, 2025 at 10:40 AM Matthias van de Meent > wrote: > > > When nbtree is passed input scan keys derived from a > > > query predicate "WHERE b = 5", new nbtree preprocessing steps now output > > > "WHERE a = ANY() AND b = 5" scan k

Re: Small memory fixes for pg_createsubcriber

2025-04-01 Thread Noah Misch
On Tue, Apr 01, 2025 at 04:28:34PM -0300, Ranier Vilela wrote: > Em ter., 1 de abr. de 2025 às 15:39, Noah Misch > escreveu: > > > On Thu, Feb 27, 2025 at 10:23:31AM -0300, Ranier Vilela wrote: > > > Em qui., 27 de fev. de 2025 às 02:51, Michael Paquier < > > mich...@paquier.xyz> > > > escreveu:

Re: TEMP_CONFIG vs test_aio

2025-04-01 Thread Todd Cook
On 4/1/25, 3:42 PM, "Andres Freund" mailto:and...@anarazel.de>> wrote: > I just committed the tests for AIO, and unfortunately they (so far) fail on > one buildfarm animal: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bumblebee&dt=2025-04-01%2018%3A55%3A01 > >

Re: [PATCH v1] parallel pg_restore: avoid disk seeks when jumping short distance forward

2025-04-01 Thread Nathan Bossart
On Tue, Apr 01, 2025 at 09:33:32PM +0200, Dimitrios Apostolou wrote: > It didn't break any test, but I also don't see any difference, the > performance boost is noticeable only when restoring a huge archive that is > missing offsets. This seems generally reasonable to me, but how did you decide on

Re: macOS 15.4 versus strchrnul()

2025-04-01 Thread Peter Eisentraut
On 01.04.25 17:57, Tom Lane wrote: That is, the function exists now in macOS' libc, and so configure's does-it-link test for HAVE_STRCHRNUL finds it, but will not let you use it unless you monkey around with export MACOSX_DEPLOYMENT_TARGET=15.4 or similar. I don't think we want to require peo

Re: Test to dump and restore objects left behind by regression

2025-04-01 Thread Daniel Gustafsson
> On 1 Apr 2025, at 19:01, Alvaro Herrera wrote: > Thanks! Thanks for taking this one across the finishing line! -- Daniel Gustafsson

TEMP_CONFIG vs test_aio

2025-04-01 Thread Andres Freund
Hi, I just committed the tests for AIO, and unfortunately they (so far) fail on one buildfarm animal: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bumblebee&dt=2025-04-01%2018%3A55%3A01 The reason for the failure is simple, the buildfarm animal specifies io_method=io_uring (thanks to

Re: Improving tracking/processing of buildfarm test failures

2025-04-01 Thread Alexander Lakhin
Hello hackers, Please take a look at the March report on buildfarm failures: # SELECT br, count(*) FROM failures WHERE dt >= '2025-03-01' AND  dt < '2025-04-01' GROUP BY br; REL_13_STABLE: 5 REL_14_STABLE: 10 REL_15_STABLE: 7 REL_16_STABLE: 5 REL_17_STABLE: 12 master: 204 -- Total: 243 (Counting

Re: Small memory fixes for pg_createsubcriber

2025-04-01 Thread Ranier Vilela
Em ter., 1 de abr. de 2025 às 15:39, Noah Misch escreveu: > On Thu, Feb 27, 2025 at 10:23:31AM -0300, Ranier Vilela wrote: > > Em qui., 27 de fev. de 2025 às 02:51, Michael Paquier < > mich...@paquier.xyz> > > escreveu: > > > > > On Tue, Feb 25, 2025 at 08:54:31AM -0300, Ranier Vilela wrote: > >

Re: [PATCH v1] parallel pg_restore: avoid disk seeks when jumping short distance forward

2025-04-01 Thread Dimitrios Apostolou
On Sat, 29 Mar 2025, Dimitrios Apostolou wrote: P.S. What is the recommended way to test a change, besides a generic make check? And how do I run selectively only the pg_dump/restore tests, in order to speed up my development routine? I have tested it with: make -C src/bin/pg_dump check

Re: RFC: Logging plan of the running query

2025-04-01 Thread Robert Haas
On Tue, Apr 1, 2025 at 3:05 PM Sami Imseih wrote: > > Looking at ExplainAssembleLogOutput() is making me realize that > > auto_explain is in serious need of some cleanup. That's not really the > > fault of this patch, but the hack whereby we overwrite the [] that > > would have surrounded the JSON

Re: System views for versions reporting

2025-04-01 Thread Dmitry Dolgov
> On Sun, Mar 23, 2025 at 06:21:33PM GMT, Tom Lane wrote: > > FWIW, I think the 0004 patch is about to be mostly obsoleted by > Andrei's proposal at [1]. To the extent that it's not obsoleted, > I question whether it's something we want at all, given the ground > rule that unprivileged users are n

Re: macOS 15.4 versus strchrnul()

2025-04-01 Thread Tom Lane
Peter Eisentraut writes: > On 01.04.25 17:57, Tom Lane wrote: >> I speculate that the meson test for preadv/pwritev has never worked >> for macOS either, and we haven't noticed because nobody has tried to >> build with meson on a machine with low enough default deployment >> target to not have pre

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

2025-04-01 Thread Alena Rybakina
Hi! Sorry for my later feedback, I didn't have enough time because of my work and the conference that was held during these two days. On 28.03.2025 23:15, Peter Geoghegan wrote: On Thu, Mar 27, 2025 at 6:03 PM Alena Rybakina wrote: I replied an example like this: This example shows costs th

Re: RFC: Logging plan of the running query

2025-04-01 Thread Sami Imseih
> Looking at ExplainAssembleLogOutput() is making me realize that > auto_explain is in serious need of some cleanup. That's not really the > fault of this patch, but the hack whereby we overwrite the [] that > would have surrounded the JSON output with {} is not very nice. I also > think that the a

Re: AIO v2.5

2025-04-01 Thread Aleksander Alekseev
Hi Andres, > > I didn't yet push > > > > > > Subject: [PATCH v2.14 13/29] aio: Add README.md explaining higher level > > > > design I have several notes about 0003 / README.md: 1. I noticed that the use of "Postgres" and "postgres" is inconsistent. 2. ``` +pgaio_io_register_callbacks(ioh, PGA

Re: POC: make mxidoff 64 bits

2025-04-01 Thread Heikki Linnakangas
On 07/03/2025 13:30, Maxim Orlov wrote: Here is a rebase, v14. Thanks! I did some manual testing of this. I created a little helper function to consume multixids, to test the autovacuum behavior, and found one issue: If you consume a lot of multixid members space, by creating lots of multi

Re: Statistics Import and Export

2025-04-01 Thread Nathan Bossart
On Mon, Mar 31, 2025 at 09:33:15PM -0500, Nathan Bossart wrote: > My goal is to commit the attached patches on Friday morning, but of course > that is subject to change based on any feedback or objections that emerge > in the meantime. I spent some more time polishing these patches this morning.

Re: Small memory fixes for pg_createsubcriber

2025-04-01 Thread Ranier Vilela
Em ter., 1 de abr. de 2025 às 15:39, Noah Misch escreveu: > On Thu, Feb 27, 2025 at 10:23:31AM -0300, Ranier Vilela wrote: > > Em qui., 27 de fev. de 2025 às 02:51, Michael Paquier < > mich...@paquier.xyz> > > escreveu: > > > > > On Tue, Feb 25, 2025 at 08:54:31AM -0300, Ranier Vilela wrote: > >

Re: RFC: Logging plan of the running query

2025-04-01 Thread Robert Haas
On Fri, Mar 21, 2025 at 8:40 AM torikoshia wrote: > Rebased it again. > > On 2025-03-10 14:10, torikoshia wrote: > > BTW the patch adds about 400 lines to explain.c and it may be better > > to split the file as well as 9173e8b6046, but I leave it as it is for > > now. > > This part remains unchang

Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)

2025-04-01 Thread Sami Imseih
I went back to look at this patch and a few things. I noticed it did not have correct indentation, so I ran pgindent. I also removed some extra lines added and made some slight adjustments to the docs. Attached my edited patch as a txt. If you agree, please revise into a v14. I also noticed that b

Re: Statistics Import and Export

2025-04-01 Thread Nathan Bossart
On Tue, Apr 01, 2025 at 01:20:30PM -0500, Nathan Bossart wrote: > On Mon, Mar 31, 2025 at 09:33:15PM -0500, Nathan Bossart wrote: >> My goal is to commit the attached patches on Friday morning, but of course >> that is subject to change based on any feedback or objections that emerge >> in the mean

Re: Small memory fixes for pg_createsubcriber

2025-04-01 Thread Noah Misch
On Thu, Feb 27, 2025 at 10:23:31AM -0300, Ranier Vilela wrote: > Em qui., 27 de fev. de 2025 às 02:51, Michael Paquier > escreveu: > > > On Tue, Feb 25, 2025 at 08:54:31AM -0300, Ranier Vilela wrote: > > > @@ -455,7 +455,9 @@ set_locale_and_encoding(void) > > > locale->db_locale, > > > strlen

macOS 15.4 versus strchrnul()

2025-04-01 Thread Tom Lane
Last night I updated the machine that hosts sifaka and indri to spankin' new macOS Sequoia 15.4, and that promptly broke the build on both animals: snprintf.c:350:1: error: static declaration of 'strchrnul' follows non-static declaration 350 | strchrnul(const char *s, int c) | ^ /Library/

Re: bug when apply fast default mechanism for adding new column over domain with default value

2025-04-01 Thread Alexander Lakhin
Hello Tom, 03.03.2025 20:38, Tom Lane wrote: Pushed with that adjustment and some other minor polishing. I've discovered that 95f650674 introduced a defect similar to bug #18297, but this time with DEFAULT. Namely, the following script: CREATE TABLE a (aa text); CREATE TABLE c (cc text) INHERI

Document SQL functions behavior regarding custom/generic plan

2025-04-01 Thread Renan Alves Fonseca
Hi, In [1], we discussed adding some lines regarding the fact that SQL functions always use generic plan. Here is the suggested patch. I've tested on V17 and V12. It does not concern V18. Regards, Renan [1] https://www.postgresql.org/message-id/CAApHDvp3EDrVhGjmb21bceJ5-Y7iXKOn2UGG3-ngp_9ob_mpL

Re: Extend ALTER DEFAULT PRIVILEGES for large objects

2025-04-01 Thread Fujii Masao
On 2025/01/23 19:22, Yugo NAGATA wrote: On Wed, 22 Jan 2025 13:30:17 +0100 Laurenz Albe wrote: On Fri, 2024-09-13 at 16:18 +0900, Yugo Nagata wrote: I've attached a updated patch. The test is rewritten using has_largeobject_privilege() function instead of calling loread & lowrite, which m

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

2025-04-01 Thread Alena Rybakina
On 01.04.2025 17:39, Matthias van de Meent wrote: On Fri, 28 Mar 2025 at 22:59, Peter Geoghegan wrote: On Tue, Mar 25, 2025 at 7:45 PM Peter Geoghegan wrote: Attached is v31, which has a much-improved _bt_skip_ikeyprefix (which I've once again renamed, this time to _bt_set_startikey). Attach

RE: Fix 035_standby_logical_decoding.pl race conditions

2025-04-01 Thread Hayato Kuroda (Fujitsu)
Dear Bertrand, > s/to avoid the seeing a xl_running_xacts/to avoid seeing a xl_running_xacts/? Fixed. > > === 2 (Nit) > > /* For testing slot invalidation due to the conflict */ > > Not sure "due to the conflict" is needed. > OK, removed. > About PG17-v2-0001 > > === 3 > > The commit

Re: Proposal: Progressive explain

2025-04-01 Thread Rafael Thofehrn Castro
My bad, I mistakenly did the tests without assertion enabled in the last 2 days, so couldn't catch that Assertion failure. Was able to reproduce it, thanks. I guess when the code was designed we were not expecting to be doing explains in parallel workers. One comment is that this has nothing to d

Re: Test to dump and restore objects left behind by regression

2025-04-01 Thread Alvaro Herrera
On 2025-Apr-01, Ashutosh Bapat wrote: > Just today morning, I found something which looks like another bug in > statistics dump/restore [1]. As Daniel has expressed upthread [2], we > should go ahead and commit the test even if the bug is not fixed. But > in case it creates a lot of noise and make

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

2025-04-01 Thread Ashutosh Bapat
On Tue, Apr 1, 2025 at 1:32 PM Amit Langote wrote: > > I think David’s suggestion to use 64 as the fixed initial size is > simpler and more predictable. Since list_length * 2 will always be >= > 64 anyway, unless we expect clause counts to grow significantly right > after the threshold, the fixed

Re: Proposal: Progressive explain

2025-04-01 Thread Robert Haas
On Tue, Apr 1, 2025 at 9:38 AM torikoshia wrote: > Could you please check if you can reproduce this? I can, and I now see that this patch has a pretty big design problem. The assertion failure occurs when a background worker tries to call ruleutils.c's get_parameter(), which tries to find the exp

Re: Fix 035_standby_logical_decoding.pl race conditions

2025-04-01 Thread Amit Kapila
On Tue, Apr 1, 2025 at 6:53 AM Hayato Kuroda (Fujitsu) wrote: > With respect to 0001, can't this problem happen for the following case as well? # Recovery conflict: Invalidate conflicting slots, including in-use slots # Scenario 5: conflict due to on-access pruning. You have not added any inject

Re: Improve CRC32C performance on SSE4.2

2025-04-01 Thread Nathan Bossart
On Tue, Apr 01, 2025 at 05:33:02PM +0700, John Naylor wrote: > On Thu, Mar 27, 2025 at 2:55 AM Devulapalli, Raghuveer > wrote: >> (1) zmm_regs_available() in pg_crc32c_sse42_choose.c is a duplicate of >> pg_popcount_avx512.c but perhaps that’s fine for now. I will propose a >> consolidated SIMD r

Re: AIO v2.5

2025-04-01 Thread Noah Misch
On Tue, Apr 01, 2025 at 11:55:20AM -0400, Andres Freund wrote: > On 2025-04-01 08:11:59 -0700, Noah Misch wrote: > > On Mon, Mar 31, 2025 at 08:41:39PM -0400, Andres Freund wrote: > I haven't yet pushed the changes, but will work on that in the afternoon. > > I plan to afterwards close the CF ent

Re: Proposal - Allow extensions to set a Plan Identifier

2025-04-01 Thread Sami Imseih
On Mon, Mar 31, 2025 at 1:28 PM Lukas Fittl wrote: > > On Tue, Mar 25, 2025 at 8:12 PM Sami Imseih wrote: >>> >>> So this comes down to forking the Postgres code to do the job. What I >>> had in mind was a slightly different flow, where we would be able to >>> push custom node attributes between

Re: AIO v2.5

2025-04-01 Thread Andres Freund
Hi, On 2025-04-01 08:11:59 -0700, Noah Misch wrote: > On Mon, Mar 31, 2025 at 08:41:39PM -0400, Andres Freund wrote: > > updated version > > All non-write patches (1-7) are ready for commit, though I have some cosmetic > recommendations below. I've marked the commitfest entry Ready for Committer.

Re: add function argument name to substring and substr

2025-04-01 Thread Daniel Gustafsson
> On 1 Apr 2025, at 15:14, Marcos Pegoraro wrote: > > Em ter., 1 de abr. de 2025 às 02:00, David G. Johnston > escreveu: > > Wouldn't it be good to add the use of parentheses using posix ? It's useful > and rarely documented > substring('Thomas', '...$') > +substring('Email: j

Re: pgsql: Add support for OAUTHBEARER SASL mechanism

2025-04-01 Thread Jacob Champion
On Tue, Apr 1, 2025 at 6:12 AM Daniel Gustafsson wrote: > > > On 1 Apr 2025, at 15:03, Christoph Berg wrote: > > > With the libpq-oauth split, this makes even more sense because > > building a library that always throws an error isn't very useful. > > (Don't build that file at all if the feature

Re: Fix 035_standby_logical_decoding.pl race conditions

2025-04-01 Thread Bertrand Drouvot
Hi, On Tue, Apr 01, 2025 at 04:55:06PM +0530, Amit Kapila wrote: > On Tue, Apr 1, 2025 at 2:02 PM Bertrand Drouvot > wrote: > > > But if we "really" want to produce a "new" WAL record, what about using > > LogLogicalMessage()? > > > > We are using injection points for testing purposes, which me

Re: AIO writes vs hint bits vs checksums

2025-04-01 Thread Nico Williams
On Wed, Oct 30, 2024 at 02:16:51PM +0200, Heikki Linnakangas wrote: > Acquiring the exclusive lock in step 4 is just a way to wait for all the > existing share-lockers to release the lock. You wouldn't need to block new > share-lockers. We have LW_WAIT_UNTIL_FREE, which is almost what we need, but

Re: [PATCH] Fix build on MINGW on ARM64

2025-04-01 Thread Andrew Dunstan
On 2025-04-01 Tu 8:47 AM, vignesh C wrote: On Tue, 1 Apr 2025 at 16:02, Andrew Dunstan wrote: On 2025-04-01 Tu 5:16 AM, vignesh C wrote: On Sun, 2 Feb 2025 at 00:52, Lars Kanis wrote: This patch limits the workaround of using __buildin_setjmp on the Windows MINGW platform. This workaround

Re: Draft for basic NUMA observability

2025-04-01 Thread Bertrand Drouvot
Hi Jakub, On Tue, Apr 01, 2025 at 12:56:06PM +0200, Jakub Wartak wrote: > On Mon, Mar 31, 2025 at 4:59 PM Bertrand Drouvot > wrote: > > > Hi, > > Hi Bertrand, happy to see you back, thanks for review and here's v18 > attached (an ideal fit for PG18 ;)) Thanks for the new version! === About v1

Re: AIO v2.5

2025-04-01 Thread Noah Misch
On Mon, Mar 31, 2025 at 08:41:39PM -0400, Andres Freund wrote: > updated version All non-write patches (1-7) are ready for commit, though I have some cosmetic recommendations below. I've marked the commitfest entry Ready for Committer. > + # Check a page validity error in another blo

Re: AIO writes vs hint bits vs checksums

2025-04-01 Thread Andres Freund
Hi, On 2025-04-01 13:34:53 +0300, Heikki Linnakangas wrote: > Here's a rebase of these patches. Thanks! Curious what made you do this? Do you need any parts of this soon? I've been hacking on this a bit more, btw, just haven't gotten around to the necessary README rephrasings... :( > I went a

Re: Restrict publishing of partitioned table with a foreign table as partition

2025-04-01 Thread Shlok Kyal
On Fri, 28 Mar 2025 at 16:35, Álvaro Herrera wrote: > > On 2025-Mar-28, Shlok Kyal wrote: > > > On Mon, 24 Mar 2025 at 21:17, Álvaro Herrera > > wrote: > > > > Also, surely we should document this restriction in the SGML docs > > > somewhere. > > > > I have added comment in create_publication.sg

Re: add function argument name to substring and substr

2025-04-01 Thread Marcos Pegoraro
Em ter., 1 de abr. de 2025 às 02:00, David G. Johnston < david.g.johns...@gmail.com> escreveu: Wouldn't it be good to add the use of parentheses using posix ? It's useful and rarely documented substring('Thomas', '...$') +substring('Email: johnj...@mymail.com, Name: John' from '@(.

Re: add function argument name to substring and substr

2025-04-01 Thread David G. Johnston
On Tue, Apr 1, 2025 at 6:15 AM Marcos Pegoraro wrote: > Em ter., 1 de abr. de 2025 às 02:00, David G. Johnston < > david.g.johns...@gmail.com> escreveu: > > Wouldn't it be good to add the use of parentheses using posix ? It's > useful and rarely documented > substring('Thomas', '...$') >

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

2025-04-01 Thread Peter Geoghegan
On Tue, Apr 1, 2025 at 9:26 AM Aleksander Alekseev wrote: > Can you think of any tests specifically for 0003, or relying on the > added Asserts() is best we can do? Same question for 0002. There are many more tests than those that are included in the patch. I wrote and debugged all patches using

Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).

2025-04-01 Thread David G. Johnston
On Tue, Apr 1, 2025 at 6:52 AM vignesh C wrote: > > We are not changing the existing behavior. However, since copying data > from large tables can take a significant amount of time, would it be > helpful to add a cautionary note advising users to refresh the > materialized view before running cop

Re: Add partial :-variable expansion to psql \copy

2025-04-01 Thread Fabien Coelho
Hello Corey, If we could do this:     COPY :"myschema".:"mytable" FROM STDIN \g < :"myfilename" that would fit our patterns most cleanly, but we would probably create a parsing hassle for ourselves if we ever wanted to mix pipe-to with pipe-from. It would also require checking on every comma

Re: Make query cancellation keys longer

2025-04-01 Thread Heikki Linnakangas
On 22/02/2025 16:58, Jelte Fennema-Nio wrote: On Mon, 9 Sept 2024 at 17:58, Robert Haas wrote: On Fri, Aug 16, 2024 at 11:29 AM Robert Haas wrote: I'll split this patch like that, to make it easier to compare and merge with Jelte's corresponding patches. That sounds great. IMHO, comparing

Re: Replace IN VALUES with ANY in WHERE clauses during optimization

2025-04-01 Thread Alena Rybakina
Hi, Alexander! On 01.04.2025 15:07, Alexander Korotkov wrote: Hi, Alena! On Tue, Apr 1, 2025 at 2:11 AM Alena Rybakina wrote: 4.1) explain analyze SELECT ten FROM onek t WHERE unique1 IN ( VALUES (0), ((2 IN ( SELECT unique2 FROM onek c WHERE c.unique2 in ((values(0),(2::in

  1   2   >