Re: RFC: Logging plan of the running query

2025-04-04 Thread Atsushi Torikoshi
On Thu, Apr 3, 2025 at 11:10 PM Robert Haas 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 output

Re: New criteria for autovacuum

2025-04-04 Thread Konstantin Knizhnik
On 04/04/2025 10:41 pm, Melanie Plageman wrote: On Fri, Apr 4, 2025 at 3:27 PM Konstantin Knizhnik wrote: From logical point of view I agree with you: taken in account number of inserted tuples makes sense if it allows to mark page as all-visible. So `ins_since_vacuum` should be better rename

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

2025-04-04 Thread Alvaro Herrera
On 2025-Apr-02, Ashutosh Bapat wrote: > I have closed the CF entry > https://commitfest.postgresql.org/patch/4564/ committed. I will > create another CF entry to park --no-statistics reversal change. That > way, we will know when statistics dump/restore has become stable. No commitfest entry ple

Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote

2025-04-04 Thread Mahendra Singh Thalor
On Thu, 30 Jan 2025 at 16:47, Srinath Reddy wrote: > > > > On Wed, Jan 29, 2025 at 9:55 PM Mahendra Singh Thalor wrote: >> >> Hi, >> While doing some testing with pg_dumpall, I noticed one weird behaviour. >> >> While we create the database, we are allowing the database name with a new line (if n

Re: Proposal: Adding compression of temporary files

2025-04-04 Thread Tomas Vondra
On 3/15/25 11:40, Alexander Korotkov wrote: > On Sun, Jan 5, 2025 at 1:43 AM Filip Janus wrote: >> >> I apologize for multiple messages, but I found a small bug in the previous >> version. >> >> -Filip- > > Great, thank you for your work. > > I think the patches could use a pgindent run. >

Re: Making sslrootcert=system work on Windows psql

2025-04-04 Thread Jacob Champion
On Wed, Apr 2, 2025 at 7:15 AM George MacKerron wrote: > > But happily, I don’t think we need to choose. Can’t we just use the Windows > > system store if neither of the relevant environment variables is set? > > Thinking about this a little more, I guess the remaining concern is about > people

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

2025-04-04 Thread torikoshia
On 2025-04-01 01:12, Fujii Masao wrote: On 2025/03/31 22:45, Yugo Nagata wrote: I prefer this approach clarifying that consistency and subtransaction overflow are separate concepts in the documentation. Here are minor comments on the patch: Thanks for the review! - case CAC_NOTC

Re: general purpose array_sort

2025-04-04 Thread Junwang Zhao
On Tue, Apr 1, 2025 at 1:11 AM Tom Lane wrote: > > Junwang Zhao writes: > > On Mon, Mar 31, 2025 at 5:58 AM Tom Lane wrote: > >> In v18, it's somewhat annoying that the typcache doesn't cache > >> the typarray field; we would not need a separate get_array_type() > >> lookup if it did. I doubt t

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

2025-04-04 Thread Rushabh Lathia
Hi Alvaro, Thank you for the offline discussion. As we all agree, changing the attnotnull datatype would not be a good idea since it is a commonly used catalog column, and many applications and extensions depend on it. Attached is another version of the patch (WIP), where I have introduced a new

Re: [PoC] Reducing planning time when tables have many partitions

2025-04-04 Thread David Rowley
On Sat, 5 Apr 2025 at 04:05, Tom Lane wrote: > This patchset has a distinct whiff of unseemly haste. hmm, yes. I would like to give this patch as good a chance at making v18 as I can, and I admit to having optimised for that. Seemingly, we've got a few other good partitioning performance patches

Re: AIO v2.5

2025-04-04 Thread Andres Freund
Hi, On 2025-04-04 14:18:02 -0700, Noah Misch wrote: > On Fri, Apr 04, 2025 at 03:16:18PM -0400, Andres Freund wrote: > > > - Make DEFINED in completor before verifying page. It might be cleaner > > > to > > > do this when the completor first retrieves a return value from > > > io_uring, >

Re: Use XLOG_CONTROL_FILE macro everywhere?

2025-04-04 Thread Fujii Masao
On 2025/04/05 8:27, Anton A. Melnikov wrote: Hi! On 04.04.2025 19:32, Fujii Masao wrote: I'm not sure there's clear consensus yet on the changes in the 0001 and 0002 patches, and it might not be worth rushing them in right before the feature freeze. So for now, I reviewed and updated only th

Re: Statistics Import and Export

2025-04-04 Thread Nathan Bossart
On Fri, Apr 04, 2025 at 07:32:48PM -0400, Corey Huinker wrote: > This patch shrinks the array size to 1 for versions < 9.4, which keeps the > modern code fairly elegant. Committed. -- nathan

Re: [PoC] Reducing planning time when tables have many partitions

2025-04-04 Thread Yuya Watari
Hello David, Thank you for your prompt reply, and apologies for my late response. On Mon, Mar 24, 2025 at 2:38 PM David Rowley wrote: > > I understand Ashutosh would like to handle the RestrictInfo speedup > another way, so there's additional review work to do there to > determine the merits of

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-04 Thread Jacob Champion
On Thu, Apr 3, 2025 at 12:50 PM Daniel Gustafsson wrote: > Thanks, both LGTM so pushed. Thank you! On Tue, Apr 1, 2025 at 3:40 PM Jacob Champion wrote: > Maybe a better idea would be to ship an SONAME of > `libpq-oauth.so.0.`, without any symlinks, so that there's > never any ambiguity about wh

Re: New criteria for autovacuum

2025-04-04 Thread Sami Imseih
> I think this enables us to update the VM > during on-access pruning. This is something I plan to work on in 19. > It seems like it would alleviate situations like this. IMO, index-only scans hitting the heap have always caught users off guard, especially because scan performance fluctuates betw

Re: Statistics Import and Export

2025-04-04 Thread Corey Huinker
On Fri, Apr 4, 2025 at 6:25 PM Nathan Bossart wrote: > On Fri, Apr 04, 2025 at 03:58:53PM -0500, Nathan Bossart wrote: > > I pushed commit 8ec0aae to fix this. > > And now I'm seeing cross-version test failures due to our use of WITH > ORDINALITY, which wasn't added until v9.4. Looking into it..

Re: Use XLOG_CONTROL_FILE macro everywhere?

2025-04-04 Thread Anton A. Melnikov
Hi! On 04.04.2025 19:32, Fujii Masao wrote: I'm not sure there's clear consensus yet on the changes in the 0001 and 0002 patches, and it might not be worth rushing them in right before the feature freeze. So for now, I reviewed and updated only the 0003 patch, since there seems to be agreement o

Re: BTScanOpaqueData size slows down tests

2025-04-04 Thread Andres Freund
Hi, On 2025-04-03 11:26:08 +1300, David Rowley wrote: > On Thu, 3 Apr 2025 at 04:21, Andres Freund wrote: > > I was mildly > > surprised to see how expensive the new compact attribute checks are. > > Is this a fairly deform-heavy workload? It was our regression tests, although I was playing aro

Re: Not-terribly-safe checks for CRC intrinsic support

2025-04-04 Thread Tom Lane
John Naylor writes: > On Sat, Mar 15, 2025 at 6:04 AM Tom Lane wrote: >> In short, I think we ought to apply and perhaps back-patch something >> like the attached. > Seems like reasonable defensive coding and consistency. Thanks for looking at it. > I'd be okay with keeping the original commen

Some problems regarding the self-join elimination code

2025-04-04 Thread Richard Guo
While working on another patch, I looked at ChangeVarNodes() and found some issues introduced by the self-join elimination commit. I think it'd better to fix or improve them. * ChangeVarNodes_walker includes special handling for RestrictInfo nodes. And it adjusts RestrictInfo.orclause only if th

Re: doc: Mention clock synchronization recommendation for hot_standby_feedback

2025-04-04 Thread Peter Eisentraut
On 24.03.25 10:24, Jakub Wartak wrote: On Fri, Mar 14, 2025 at 11:31 AM vignesh C wrote: On Wed, 5 Mar 2025 at 11:46, Amit Kapila wrote: On Tue, Mar 4, 2025 at 4:44 PM Jakub Wartak I can go with the last patch as you observed that in a real-world case, and we can look at others (if any) on

Re: Statistics Import and Export

2025-04-04 Thread Nathan Bossart
On Fri, Apr 04, 2025 at 03:58:53PM -0500, Nathan Bossart wrote: > I pushed commit 8ec0aae to fix this. And now I'm seeing cross-version test failures due to our use of WITH ORDINALITY, which wasn't added until v9.4. Looking into it... -- nathan

Re: Improve CRC32C performance on SSE4.2

2025-04-04 Thread Nathan Bossart
On Wed, Apr 02, 2025 at 02:10:40PM +0700, John Naylor wrote: > Thanks for looking, I plan to commit this over the weekend unless > there are objections. I noticed that autoconf is defining USE_AVX512_CRC_WITH_RUNTIME_CHECK, but everywhere else expects USE_AVX512_CRC32C_WITH_RUNTIME_CHECK (with the

Re: vacuum_truncate configuration parameter and isset_offset

2025-04-04 Thread Nathan Bossart
On Mon, Mar 24, 2025 at 11:27:15PM +0300, Nikolay Shaplov wrote: > В письме от понедельник, 24 марта 2025 г. 23:04:39 MSK пользователь Nathan > Bossart написал: >> But again, I don't see any strong reason why we must change all such >> reloptions. > > Because code of the engine should be consiste

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-04-04 Thread Masahiko Sawada
On Mon, Mar 31, 2025 at 3:29 PM Masahiko Sawada wrote: > > On Mon, Mar 31, 2025 at 3:12 PM Melanie Plageman > wrote: > > > > On Mon, Mar 31, 2025 at 6:03 PM Masahiko Sawada > > wrote: > > > > > > With commit c120550edb86, If we got the cleanup lock on the page, > > > lazy_scan_prune() marks dea

Proposal for enabling auto-vectorization for checksum calculations

2025-04-04 Thread Matthew Sterrett
Hello, This patch enables more compiler autovectorization for the checksum calculations. This code is particularly well suited for autovectorization, so just adding pg_attribute_target and some simple dynamic dispatch logic we can get improved vectorization. This gives about a 2x speedup in a synth

Re: SQLFunctionCache and generic plans

2025-04-04 Thread Alexander Lakhin
05.04.2025 00:47, Tom Lane wrote: Alexander Lakhin writes: I've stumbled upon another defect introduced with 0dca5d68d: CREATE FUNCTION f(VARIADIC ANYARRAY) RETURNS ANYELEMENT AS $$ SELECT x FROM generate_series(1,1) g(i) $$ LANGUAGE SQL IMMUTABLE; SELECT f(1); SELECT f(1); Hmm, I see regress

Re: [PATCH] Add CANONICAL option to xmlserialize

2025-04-04 Thread Jim Jones
While reviewing another patch, I noticed that the keep_comments argument was missing a default value. To allow calling the function with only the XML argument, I've added DEFAULT true to keep_comments. SELECT xmlcanonicalize(xmldoc); Updated patch (v16) attached. Best, JimFrom 28f7c62de548468c8f

Re: SQLFunctionCache and generic plans

2025-04-04 Thread Tom Lane
Alexander Lakhin writes: > I've stumbled upon another defect introduced with 0dca5d68d: > CREATE FUNCTION f(VARIADIC ANYARRAY) RETURNS ANYELEMENT AS $$ SELECT x FROM > generate_series(1,1) g(i) $$ LANGUAGE SQL > IMMUTABLE; > SELECT f(1); > SELECT f(1); Hmm, I see regression=# CREATE FUNCTION f

Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?

2025-04-04 Thread Matthias van de Meent
On Sun, 16 Mar 2025 at 13:58, vignesh C wrote: > > On Sat, 8 Mar 2025 at 08:06, Matthias van de Meent > wrote: > > > > Here's a patchset that uses that approach. Naming of functions, types, > > fields and arguments TBD. The patch works and passes the new > > VACUUM-conflict tests, though I suspec

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-04-04 Thread Masahiko Sawada
On Sat, Mar 29, 2025 at 9:49 AM David G. Johnston wrote: > > On Wed, Mar 26, 2025 at 8:28 PM Sutou Kouhei wrote: >> >> >> The attached v39 patch set uses the followings: >> >> 0001: Create copyto_internal.h and change COPY_XXX to >> COPY_SOURCE_XXX and COPY_DEST_XXX accordingly. >> (S

Re: Parallel heap vacuum

2025-04-04 Thread Masahiko Sawada
On Fri, Apr 4, 2025 at 11:05 AM Melanie Plageman wrote: > > On Tue, Apr 1, 2025 at 5:30 PM Masahiko Sawada wrote: > > > > > > I've attached the new version patch. There are no major changes; I > > fixed some typos, improved the comment, and removed duplicated codes. > > Also, I've updated the com

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2025-04-04 Thread Masahiko Sawada
On Fri, Apr 4, 2025 at 4:55 AM jian he wrote: > > On Tue, Mar 25, 2025 at 2:31 PM vignesh C wrote: > > > > 2) Here in error we say column c1 violates not-null constraint and in > > the context we show column c2, should the context also display c2 > > column: > > postgres=# create table t3(c1 int

Re: In-placre persistance change of a relation

2025-04-04 Thread Thom Brown
On Fri, 27 Dec 2024 at 08:26, Kyotaro Horiguchi wrote: > > Hello. This is the updated version. > > (Sorry for the delay; I've been a little swamped.) > > - Undo logs are primarily stored in a fixed number of fixed-length > slots and are spilled into files under some conditions. > > The number

Re: Proposal: Limitations of palloc inside checkpointer

2025-04-04 Thread Heikki Linnakangas
On 12/03/2025 13:00, Maxim Orlov wrote: On Wed, 12 Mar 2025 at 10:27, Xuneng Zhou > wrote: The patch itself looks ok to me. I'm curious about the trade-offs between this incremental approach and the alternative of using palloc_extended() with the MCXT_ALLOC_HUGE fla

Re: AIO v2.5

2025-04-04 Thread Noah Misch
On Fri, Apr 04, 2025 at 03:16:18PM -0400, Andres Freund wrote: > On 2025-04-03 12:40:23 -0700, Noah Misch wrote: > > On Thu, Apr 03, 2025 at 02:19:43PM -0400, Andres Freund wrote: > > In the general case, we could want client requests as follows: > > > > - If completor==definer and has not droppe

Re: Incorrect result of bitmap heap scan.

2025-04-04 Thread Andres Freund
Hi, Matthias, any chance you can provide a rebased version for master? If not, I'll do the rebase. Either way I'm planning to push this fairly soon. Greetings, Andres Freund

Fundamental scheduling bug in parallel restore of partitioned tables

2025-04-04 Thread Tom Lane
Looking into the complaint at [1], I find that pg_restore really gets it quite wrong when trying to do a parallel restore of partitioned tables with foreign key constraints. The historical way that we got parallel restore to work correctly with FK constraints is: 1. The dump file shows dependenci

Re: pgsql: Add support for OAUTHBEARER SASL mechanism

2025-04-04 Thread Christoph Berg
> Add support for OAUTHBEARER SASL mechanism Debian still has this experimental port with a GNU userland and a FreeBSD kernel called kfreebsd. I don't expect anyone to particularly care about it, but it found an actual bug: /build/reproducible-path/postgresql-18-18~~devel.20250331/build/../src/in

Re: Statistics Import and Export

2025-04-04 Thread Nathan Bossart
On Fri, Apr 04, 2025 at 03:06:45PM -0500, Nathan Bossart wrote: > I see the buildfarm failure and am working on a fix. I pushed commit 8ec0aae to fix this. -- nathan

Re: dblink: Add SCRAM pass-through authentication

2025-04-04 Thread Matheus Alcantara
On Wed, Mar 19, 2025 at 4:21 PM Jacob Champion wrote: > > On Tue, Mar 18, 2025 at 12:32 PM Peter Eisentraut > wrote: > > Yeah, I think option (2) is enough for now. If someone wants to enable > > the kinds of things you describe, they can always come back and > > implement option (1) later. > >

Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote

2025-04-04 Thread Mahendra Singh Thalor
On Thu, 27 Mar 2025 at 16:16, Andrew Dunstan wrote: > > > On 2025-03-26 We 8:52 AM, Srinath Reddy wrote: > > sorry for the noise ,previous response had my editor's formatting,just > resending without that formatting. > > ./psql postgres > > Hi, > > On Wed, Mar 26, 2025 at 5:55 PM Andrew Dunstan

Re: md.c vs elog.c vs smgrreleaseall() in barrier

2025-04-04 Thread Noah Misch
On Thu, Mar 20, 2025 at 03:53:11PM -0400, Andres Freund wrote: > I updated the patch with the following changes: > > - Remove the assertion from smgrtruncate() - it would need to assert that it's > called in a critical section. > > Not sure why it's not already asserting that? > > The func

Re: Allow default \watch interval in psql to be configured

2025-04-04 Thread Daniel Gustafsson
> On 17 Mar 2025, at 13:37, Ashutosh Bapat wrote: > 0 is an accepted value for interval, even though it might look insensible. > > The behaviour should be same in both cases \watch i= and > \set WATCH_INTERVAL \watch. In this case it's not. Having a watch interval of zero is IMHO somewhat nons

Re: AIX support

2025-04-04 Thread Heikki Linnakangas
On 04/04/2025 22:31, Srirama Kucherlapati wrote: > - src/backend/port/aix/mkldexport.sh>   - When building shared libraries from various archives on AIX, we encounter a situation where symbols are not exported. To resolve this, we require an export file. For instance, the command is

Re: Disabling vacuum truncate for autovacuum

2025-04-04 Thread David G. Johnston
On Thu, Mar 20, 2025 at 8:18 AM Nathan Bossart wrote: > Committed. > > We added isset_offset to the public struct to introduce this new general behavior of tracking whether any table reloption has been set (not just vacuum_truncate) without any comments. I get the need for this kind of logic, si

Re: Conflict detection for multiple_unique_conflicts in logical replication

2025-04-04 Thread Nisha Moond
On Fri, Mar 21, 2025 at 3:38 PM Amit Kapila wrote: > > On Fri, Mar 21, 2025 at 1:48 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Fri, Mar 21, 2025 at 12:50 PM Nisha Moond wrote: > > > > > Thanks, Hou-san, for the review and fix patches. I’ve incorporated > > > your suggestions. > > > Attached are

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-04 Thread Thomas Munro
On Thu, Mar 20, 2025 at 2:38 AM Daniel Gustafsson wrote: > > On 19 Mar 2025, at 05:57, Tom Lane wrote: > > > > BTW, I was pretty seriously disheartened just now to realize that > > this feature was implemented by making libpq depend on libcurl. > > I'd misread the relevant commit messages to say

Re: Non-text mode for pg_dumpall

2025-04-04 Thread Andrew Dunstan
On 2025-04-04 Fr 5:12 AM, Mahendra Singh Thalor wrote: On Fri, 4 Apr 2025 at 13:52, Mahendra Singh Thalor wrote: On Fri, 4 Apr 2025 at 01:17, Andrew Dunstan wrote: On 2025-04-01 Tu 1:59 AM, Mahendra Singh Thalor wrote: On Mon, 31 Mar 2025 at 23:43, Álvaro Herrera wrote: Hi FWIW I don't thi

Re: Statistics Import and Export

2025-04-04 Thread Nathan Bossart
On Fri, Apr 04, 2025 at 02:56:54PM -0500, Nathan Bossart wrote: > Committed. I see the buildfarm failure and am working on a fix. -- nathan

Re: New criteria for autovacuum

2025-04-04 Thread Sami Imseih
> From logical point of view I agree with you: taken in account number of > inserted tuples makes sense if it allows to mark page as all-visible. > So `ins_since_vacuum` should be better renamed to > `ins_all_visible_since_vacuum` and count only all-visible tuples. > If newly inserted tuple is no

Re: Memoize ANTI and SEMI JOIN inner

2025-04-04 Thread Alena Rybakina
I realized that I uploaded my diff file with a small mistake - sorry about that. I've corrected it with this message so your tests can pass in the CI. On 31.03.2025 05:33, Alena Rybakina wrote: Hi! On 21.03.2025 18:56, Andrei Lepikhov wrote: On 20/3/2025 07:02, David Rowley wrote: On Thu, 2

Re: Statistics Import and Export

2025-04-04 Thread Nathan Bossart
On Thu, Apr 03, 2025 at 09:19:51PM -0500, Nathan Bossart wrote: > Great. I'm planning to commit the attached patch set tomorrow morning. Committed. -- nathan

Re: New criteria for autovacuum

2025-04-04 Thread Melanie Plageman
On Fri, Apr 4, 2025 at 3:27 PM Konstantin Knizhnik wrote: > > From logical point of view I agree with you: taken in account number of > inserted tuples makes sense if it allows to mark page as all-visible. > So `ins_since_vacuum` should be better renamed to > `ins_all_visible_since_vacuum` and c

Re: Using read stream in autoprewarm

2025-04-04 Thread Melanie Plageman
On Fri, Apr 4, 2025 at 4:17 AM Nazir Bilal Yavuz wrote: > > Same on my end, v14 LGTM. Cool. Pushed and marked as such in the CF app. - Melanie

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

2025-04-04 Thread Ilia Evdokimov
On 02.04.2025 00:06, David Rowley wrote: I tried to move things along to address Tom's concern about not wanting to show this in EXPLAIN's standard output. I suggested in [1] that we could use EXPLAIN ANALYZE, but nobody commented on that. EXPLAIN ANALYZE is much more verbose than EXPLAIN alread

Re: Update Unicode data to Unicode 16.0.0

2025-04-04 Thread Robert Haas
On Tue, Mar 18, 2025 at 10:33 PM Jeff Davis wrote: > If we compare the following two problems: > > A. With glibc or ICU, every text index, including primary keys, are > highly vulnerable to inconsistencies after an OS upgrade, even if > there's no Postgres upgrade; vs. > > B. With the builtin

Re: Draft for basic NUMA observability

2025-04-04 Thread Jakub Wartak
On Wed, Apr 2, 2025 at 6:40 PM Tomas Vondra wrote: Hi Tomas, > OK, so you agree the commit messages are complete / correct? Yes. > OK. FWIW if you disagree with some of my proposed changes, feel free to > push back. I'm sure some may be more a matter of personal preference. No, it's all fine.

Re: Fix 035_standby_logical_decoding.pl race conditions

2025-04-04 Thread Bertrand Drouvot
Hi, On Wed, Apr 02, 2025 at 03:04:07PM +0530, Amit Kapila wrote: > I have changed it based on your suggestions and made a few other > changes in the comments. Please see attached. Thanks! > * > +  if (IS_INJECTION_POINT_ATTACHED("log-running-xacts")) > > It is better to name the injection point

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

2025-04-04 Thread vignesh C
On Wed, 2 Apr 2025 at 13:49, Ashutosh Bapat wrote: > > On Tue, Apr 1, 2025 at 10:31 PM Alvaro Herrera > wrote: > > > > 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

RE: Some codes refer slot()->{'slot_name'} but it is not defined

2025-04-04 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > -is($node_primary->slot('dropme_slot')->{'slot_name'}, > - undef, 'logical slot was actually dropped on standby'); > +is($node_primary->slot('dropme_slot')->{'plugin'}, > + '', 'logical slot was actually dropped on standby'); > > This seems like a separate issue from wha

Re: Update LDAP Protocol in fe-connect.c to v3

2025-04-04 Thread Andrew Jackson
Hi, Added some tests for the LDAP connection parameters lookup functionality with the attached patch. It is based off of the tests that were added recently that cover the connection service file libpq functionality as well as the existing ldap test framework. Thanks, Andrew Jackson On Wed, Mar 2

RE: AIX support

2025-04-04 Thread Srirama Kucherlapati
Hi Heikki and team, Thank you for considering our request. As discussed, we have revised the patch to incorporate all the review comments provided. Please find the attached patch, which focuses solely on the gmake changes. As discussed the meson specific changes would be provided as different pat

Re: Question -- why is there no errhint_internal function?

2025-04-04 Thread Andres Freund
Hi, On 2025-04-03 09:58:30 +1100, Peter Smith wrote: > I saw that a new errhint_internal() function was recently committed > [1]. I had also posted above asking about this same missing function a > month ago [2]. > > But, your patch only added the new function -- it does not make any > use of it

Re: SQL:2011 application time

2025-04-04 Thread Paul Jungwirth
On 3/3/25 02:05, Peter Eisentraut wrote: > In the theory of the SQL standard, executing referential actions and checking the foreign-key > constraint are two separate steps. So it kind of goes like this: > > 1. run command > 2. run any referential actions > 3. check that foreign key is still sat

Re: Memoize ANTI and SEMI JOIN inner

2025-04-04 Thread Andrei Lepikhov
On 3/31/25 11:03, Richard Guo wrote: On Thu, Mar 20, 2025 at 3:02 PM David Rowley wrote: For making this work, I think the attached should be about the guts of the code changes. I didn't look at the comments. Right now I can't think of any reason why this can't be done, but some experimentation

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-04-04 Thread Dean Rasheed
> > On 3/4/25 10:24 AM, Andreas Karlsson wrote: > > Rebased the patch to add support for OLD.* and NEW.*. > I took a closer look at this, and I have a number of comments: * The changes for RLS look correct. However, in get_row_security_policies(), it's not necessary to add WCO_RLS_UPDATE_CHECK ch

Re: Fix infinite loop from setting scram_iterations to INT_MAX

2025-04-04 Thread Michael Paquier
On Wed, Mar 26, 2025 at 03:41:10PM +0900, Richard Guo wrote: > I plan to go ahead and push Kevin's fix, barring any objections. Thanks, Richard. -- Michael signature.asc Description: PGP signature

Re: New criteria for autovacuum

2025-04-04 Thread Konstantin Knizhnik
On 04/04/2025 7:10 pm, Melanie Plageman wrote: On Fri, Apr 4, 2025 at 1:53 AM Konstantin Knizhnik wrote: What is needed to reproduce the problem? 1. Table with populated data 2. Presence of transaction with assigned XID which prevents vacuum from marking pages of this table as all visible 3. Va

Re: Draft for basic NUMA observability

2025-04-04 Thread Tomas Vondra
OK, here's v25 after going through the patches once more, fixing the issues mentioned by Bertrand, etc. I think 0001 and 0002 are fine, I have a couple minor questions about 0003. 0002 - Adds the new types to typedefs.list, to make pgindent happy. - Improves comment for pg_buffercache_numa_p

Re: Vacuuming the free space map considered harmful?

2025-04-04 Thread Christophe Pettus
> On Mar 19, 2025, at 15:06, Christophe Pettus wrote: > > From an (admittedly somewhat naïve) look at the code, it appears that having > it honor the cost delay wouldn't introduce excessive blocking, as long as the > delay wasn't implemented at a really dumb place. Specifically, it looks li

Re: md.c vs elog.c vs smgrreleaseall() in barrier

2025-04-04 Thread Thomas Munro
On Thu, Mar 20, 2025 at 12:06 PM Andres Freund wrote: > Ah - it effectively is already in a critical section, just a weirdly spelled > one: > > 2025-03-19 19:00:06.398 EDT [2156613][client backend][0/3:0][psql] LOG: > statement: DROP TABLE foo; > 2025-03-19 19:00:06.404 EDT [2156613][client bac

Re: query_id: jumble names of temp tables for better pg_stat_statement UX

2025-04-04 Thread Michael Paquier
On Sat, Mar 22, 2025 at 10:43:00AM +0100, Christoph Berg wrote: > Are we at the point where the patch is already Ready for Committer? I'll think a bit more about how to document all that. Anyway, yes, I'm OK with the per-field custom_query_jumble, so let's move on with that, so I will do somethin

Re: Index AM API cleanup

2025-04-04 Thread Peter Eisentraut
On 12.03.25 17:08, Mark Dilger wrote: On Wed, Mar 12, 2025 at 7:25 AM Tom Lane > wrote: Peter Eisentraut mailto:pe...@eisentraut.org>> writes: > 0002: Add get_opfamily_member_for_cmptype().  This was called > get_opmethod_member() in your patch set, bu

Re: pg_recvlogical cannot create slots with failover=true

2025-04-04 Thread Michael Banck
Hi, On Tue, Apr 01, 2025 at 08:01:32AM +, Hayato Kuroda (Fujitsu) wrote: > Attached patch implements it. Since -f/-F option has already been used, -O was > chosen for the short-version. Better idea is very welcomed. Maybe we don't need a short option at all for this, at least initially? Mic

Re: AIO v2.5

2025-04-04 Thread Andres Freund
Hi, Sorry for the slow work on this. The cycle times are humonguous due to valgrind being so slow... On 2025-04-03 12:40:23 -0700, Noah Misch wrote: > On Thu, Apr 03, 2025 at 02:19:43PM -0400, Andres Freund wrote: > > The best fix for that one would, I think, be to have method_io_uring() > > it

Re: Using read stream in autoprewarm

2025-04-04 Thread Daniel Gustafsson
> On 3 Apr 2025, at 21:25, Melanie Plageman wrote: > > On Thu, Apr 3, 2025 at 11:17 AM Heikki Linnakangas wrote: >> >> I had a quick look at this. Looks good overall Same here, this seemed like a good piece to bite into with my limited AIO knowledge to learn more, and reading it over it seems

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

2025-04-04 Thread Robert Haas
On Tue, Apr 1, 2025 at 10:14 PM Richard Guo wrote: > The attnotnull catalog information being discussed here is intended > for use during constant folding (and possibly sublink pull-up), which > occurs long before partition pruning. Am I missing something? Hmm, OK, so you think that we need to g

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

2025-04-04 Thread Peter Geoghegan
On Tue, Apr 1, 2025 at 4:16 PM Matthias van de Meent wrote: > While I agree that there is such a cost, I don't think that this is > too far fetched. They are not just added when we have SAOP scankeys, > and I think the non-SAOP case is one of the most important areas where > this patch improves pe

Re: support virtual generated column not null constraint

2025-04-04 Thread Xuneng Zhou
Hi, response from ChatGPT, seems correct: "Consing up" is an informal term derived from Lisp terminology. In this context, it means dynamically creating (allocating and constructing) a new NullTest node. Instead of reusing an existing node, the code allocates a fresh node—using PostgreSQL’s memor

Doc: Fixup misplaced filelist.sgml entities and add some commentary

2025-04-04 Thread David G. Johnston
Hi. Having been in filelist.sgml a bit recently I've noticed that the original alphabetical ordering of the entities therein hasn't been adhered to. Partly, I suspect, because there is no guidance about these files and how they are organized. The attached puts things back into alphabetical order

Re: System views for versions reporting

2025-04-04 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: > Thanks for checking this out. Here is the updated version with applied > changes. The tests were failing due to injection_points library > apparently linking something twice, triggering a duplication error I > didn't expect. Since apparently it can ha

Re: A small correction to doc and comment of FSM for indexes

2025-04-04 Thread Michael Paquier
On Tue, Feb 25, 2025 at 07:24:14PM +0200, Alex Friedman wrote: > However, as what is tracked is entirely-unused pages, the values > mean whether a page is "in-use or empty", rather than "full or > empty". Ah, right, you are obviously right here. Applied and backpatched doen to 13 as the docs of p

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-04-04 Thread David G. Johnston
On Friday, March 28, 2025, Masahiko Sawada wrote: > > > One problem in the following chunk I can see is: > > + qualified_format = stringToQualifiedNameList(format, NULL); > + DeconstructQualifiedName(qualified_format, &schema, &fmt); > + if (!schema || strcmp(schema,

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

2025-04-04 Thread Alena Rybakina
On 12.03.2025 23:50, Peter Geoghegan wrote: On Wed, Mar 12, 2025 at 4:28 PM Alena Rybakina wrote: Thank you for the explanation! Now I see why these changes were made. After your additional explanations, everything really became clear and I fully agree with the current code regarding this p

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

2025-04-04 Thread Yugo Nagata
On Mon, 31 Mar 2025 12:51:06 +0900 Fujii Masao wrote: > > > On 2025/03/28 0:13, torikoshia wrote: > > On 2025-03-27 11:06, torikoshia wrote: > >> Hi, > >> > >> I had another off-list discussion with Fujii-san, and according to the > >> following manual[1], it seems that a transaction with an ov

Re: RFC: Logging plan of the running query

2025-04-04 Thread torikoshia
On 2025-04-02 03:52, Robert Haas wrote: Thank you for review! 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 leav

Re: SQLFunctionCache and generic plans

2025-04-04 Thread Alexander Lakhin
Hello Tom, 03.04.2025 22:13, Tom Lane wrpte: Drat. I thought I'd tested the empty-function-body case, but evidently that was a few changes too far back. Will fix, thanks for catching it. I've stumbled upon another defect introduced with 0dca5d68d: CREATE FUNCTION f(VARIADIC ANYARRAY) RETURNS

Re: Disabling vacuum truncate for autovacuum

2025-04-04 Thread Nathan Bossart
On Thu, Mar 20, 2025 at 02:18:33PM -0700, David G. Johnston wrote: > So my concern about dump/restore seems to be alleviated but then, why can > we not just do whatever pg_dump is doing to decide whether the current > value for vacuum_truncate is its default (and thus would not be dumped) or > not

Re: Using read stream in autoprewarm

2025-04-04 Thread Melanie Plageman
On Mon, Mar 31, 2025 at 3:27 PM Melanie Plageman wrote: > > I think there might be another problem with the code. We only set > cur_database in the loop in autoprewarm_databas_main() when it is 0 > > if (cur_database != blk->database) > { > if (cur_database == 0) >

Re: Statistics Import and Export

2025-04-04 Thread Nathan Bossart
On Tue, Apr 01, 2025 at 10:44:19PM -0700, Jeff Davis wrote: > On Tue, 2025-04-01 at 22:21 -0500, Nathan Bossart wrote: >> We might be able to improve this by inventing a new callback that fails for >> all formats except for custom with feesko() available.  That would at least >> ensure hard failure

Re: Proposal: Progressive explain

2025-04-04 Thread Robert Haas
On Fri, Mar 28, 2025 at 12:09 PM Rafael Thofehrn Castro wrote: > I am definitely not the authority here to talk about the best way forward. > If there is an agreement in turning this into an extension, it can be a new > feature in auto_explain. I'm not against adding some more hooks to explain.c,

Re: [PATCH] Automatic client certificate selection support for libpq v1

2025-04-04 Thread Jacob Champion
On Mon, Mar 31, 2025 at 9:01 AM Seth Robertson wrote: > Third, the only real use case where this feature would be critical is > a client which needs to have connections to two different PostgreSQL > servers at the same time. Those applications are likely fairly rare > and doing custom programming

Re: index prefetching

2025-04-04 Thread Tomas Vondra
On 4/2/25 18:05, Andres Freund wrote: > Hi, > > Since the patch has needed a rebase since mid February and is in Waiting on > Author since mid March, I think it'd be appropriate to mark this as Returned > with Feedback for now? Or at least moved to the next CF? > Yes, I agree. regards -- To

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

2025-04-04 Thread Andrew Dunstan
On 2025-03-29 Sa 10:40 AM, David G. Johnston wrote: On Saturday, March 29, 2025, Kirill Reshke wrote: On Sat, 29 Mar 2025 at 09:47, jian he wrote: > > will use {table_beginscan, table_scan_getnextslot, table_endscan} > to output the data. > but views don't have storage

Re: making EXPLAIN extensible

2025-04-04 Thread Sami Imseih
> On Tue, Mar 18, 2025 at 11:21 PM Sami Imseih wrote: > > > > Do you want to propose a patch? > > > > > > yes, will attach a patch shortly. > > > > Attached is a patch to add a hook to allow extensions > > to add additional option validations. The hook takes > > in the ExplainState as an argument

Re: vacuum_truncate configuration parameter and isset_offset

2025-04-04 Thread Nathan Bossart
On Mon, Mar 24, 2025 at 10:12:05PM +0300, Nikolay Shaplov wrote: > And second general idea: changing engine is bad, at least when you can manage > without changing it. You have asserted this a couple of times without providing any reasons why. I know of no general project policy about changing th

Re: 002_pg_upgrade is broken for custom install

2025-04-04 Thread Álvaro Herrera
On 2025-Apr-04, Ashutosh Bapat wrote: > # test failed > stderr: > # Tests were run but no plan was declared and done_testing() was not seen. > # Looks like your test exited with 29 just after 4. > > Doesn't look like it's expected. Nope. Please have a look at the tmp_check/log/regress_002* log

Re: Allow default \watch interval in psql to be configured

2025-04-04 Thread Pavel Stehule
st 26. 3. 2025 v 13:24 odesílatel Daniel Gustafsson napsal: > > On 26 Mar 2025, at 10:12, Pavel Stehule wrote: > > > yes, it is ok after this change > > Thanks for confirming, committed. > Thank you Pavel > > -- > Daniel Gustafsson > >

  1   2   3   >