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: 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: 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: 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: 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: 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: 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: CREATE SUBSCRIPTION - add missing test case

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

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: 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: [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: 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: 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: 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: Fix 035_standby_logical_decoding.pl race conditions

2025-04-01 Thread Bertrand Drouvot
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/? > > Fixed. hmm, not sure as I still can see: +# Note that injection_

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

2025-04-01 Thread Alexander Korotkov
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::integer)) ); > > QUERY PLAN >

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

2025-04-01 Thread Daniel Verite
Christoph Berg wrote: > Perhaps this form could be improved by changing `\copy (select) to file` > to something like `select \gcopy (to file)`. That might make :expansion > in the "select" part easier to handle. In this direction (COPY TO), it was already taken care of by commit 6d3ede5f1

Re: Improve CRC32C performance on SSE4.2

2025-04-01 Thread John Naylor
On Thu, Mar 27, 2025 at 2:55 AM Devulapalli, Raghuveer wrote: > > Hello John, > > v15 LGTM. Couple of minor comments: > > > I'm leaning towards a length limit for v15-0001 so that inlined > > instructions are > > likely to be unrolled. Aside from lack of commit message, I think that one > > is r

Re: [PATCH] Fix build on MINGW on ARM64

2025-04-01 Thread Andrew Dunstan
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 is only necessary for legacy MSVCRT based toolchain, but not for UCRT based. It is not available

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

2025-04-01 Thread Kirill Reshke
On Tue, 1 Apr 2025 at 15:52, vignesh C wrote: > > On Tue, 1 Apr 2025 at 15:49, Kirill Reshke wrote: > > > > On Tue, 1 Apr 2025, 11:45 vignesh C, wrote: > >> > >> > >> One thing I noticed was that if the materialized view is not refreshed > >> user will get stale data > >> > >> Should we document

Re: Better HINT message for "unexpected data beyond EOF"

2025-04-01 Thread Andres Freund
Hi, On 2025-04-01 09:49:12 -0400, Robert Haas wrote: > On Tue, Apr 1, 2025 at 7:13 AM Jakub Wartak > wrote: > > Thread bump. So we have the following candidates: > > > > 1. remove it as Andres stated: > > ERROR: unexpected data beyond EOF in block 1472 of relation base/5/16387 > > > > 2a. Robert

Re: Proposal: Progressive explain

2025-04-01 Thread torikoshia
On 2025-04-01 15:23, Rafael Thofehrn Castro wrote: Hello again, ERROR: could not attach to dynamic shared area In addition to that refactoring issue, the current patch had a race condition in pg_stat_progress_explain to access the DSA of a process running a query that gets aborted. While di

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

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: 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

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: 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: 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: 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

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: 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: 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: 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: 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: 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

<    1   2