Re: Back-patch of: avoid multiple hard links to same WAL file after a crash

2025-04-05 Thread Michael Paquier
On Sat, Apr 05, 2025 at 07:14:27PM +0900, Michael Paquier wrote: > On Wed, Apr 02, 2025 at 05:29:00PM -0700, Noah Misch wrote: >> Your back-patches are correct. Thanks. > > Thanks for double-checking. I'll move on with what I have after a > second look as it's been a few weeks since I've looked

Re: rename pg_log_standby_snapshot

2025-04-05 Thread Michael Paquier
On Sat, Apr 05, 2025 at 10:32:40PM -0400, Andres Freund wrote: > I think this would all be a nice argument to have when introducing a new > function. But I don't think it's a wart sufficiently big to justify breaking > compatibility. Yeah, I would side as well with the compatibility argument on th

Re: Removing unneeded self joins

2025-04-05 Thread Tender Wang
Hi, I find that the postgresql.conf.sample file doesn't contain enable_self_join_elimination guc. If this is necessary, please see the attached patch. -- Thanks, Tender Wang From f27c99aebbd07d4008173492c7913749b149b540 Mon Sep 17 00:00:00 2001 From: Tender Wang Date: Sun, 6 Apr 2025 11:54:49 +0

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

2025-04-05 Thread Álvaro Herrera
Hi I've been giving this some final polish which have me time to think it through, and I think Peter is right. We should not be adding the new column, but instead RelationBuildTupleDesc should use its existing scan of pg_constraint to determine validity status of constraints. We may need in add

Re: Parallel heap vacuum

2025-04-05 Thread Masahiko Sawada
On Sat, Apr 5, 2025 at 1:32 PM Andres Freund wrote: > > Hi, > > On 2025-04-04 14:34:53 -0700, Masahiko Sawada wrote: > > 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

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

2025-04-05 Thread Richard Guo
Currently, we have an optimization that reduces an IS [NOT] NULL qual on a NOT NULL column to constant true or constant false, provided we can prove that the input expression of the NullTest is not nullable by any outer joins. This deduction happens pretty late in planner, during the distribution

Re: Draft for basic NUMA observability

2025-04-05 Thread Jakub Wartak
On Wed, Apr 2, 2025 at 5:27 PM Bertrand Drouvot wrote: > > Hi Jakub, Hi Bertrand, > > OK, but I still fail to grasp why pg_indent doesnt fix this stuff on > > it's own... I believe orginal ident, would fix this on it's own? > > My comment was not about indention but about the fact that I think t

Re: Parallel heap vacuum

2025-04-05 Thread Melanie Plageman
On Sun, Mar 23, 2025 at 4:46 AM Masahiko Sawada wrote: > > If we use ParallelBlockTableScanDesc with streaming read like the > patch did, we would also need to somehow rewind the number of blocks > allocated to workers. The problem I had with such usage was that a > parallel vacuum worker allocate

Re: BTScanOpaqueData size slows down tests

2025-04-05 Thread Peter Geoghegan
On Wed, Apr 2, 2025 at 12:10 PM Tom Lane wrote: > I could get behind the idea of just having enough space in > BTScanOpaqueData for about ten items, and dynamically allocating > a MaxTIDsPerBTreePage-sized array only if we overrun that. > And not allocate any space for mark/restore unless a mark i

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

2025-04-05 Thread Masahiko Sawada
On Sat, Mar 29, 2025 at 1:57 AM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 28 Mar 2025 22:37:03 -0700, > Masahiko Sawada wrote: > > >> I've added the following tests: > >> > >> * Wrong input type handler without n

Re: Draft for basic NUMA observability

2025-04-05 Thread Jakub Wartak
On Mon, Mar 17, 2025 at 5:11 PM Bertrand Drouvot wrote: > Thanks for v13! Rebased and fixes inside in the attached v14 (it passes CI too): > Looking at 0003: > > === 1 > > + NUMA mappings for shared memory allocations > > s/NUMA mappings/NUMA node mappings/ maybe? Done. > === 2 > > + >

Re: Making sslrootcert=system work on Windows psql

2025-04-05 Thread Daniel Gustafsson
> On 3 Apr 2025, at 16:26, Daniel Gustafsson wrote: >> On 3 Apr 2025, at 14:41, George MacKerron wrote: >> Your diff certainly fixes (1b), so it’s definitely an improvement. > > Thanks, unless Jacob objects I propose to apply that backpatched down to when > sslrootcert=system went in. Hearing

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

2025-04-05 Thread Ashutosh Bapat
On Thu, Mar 20, 2025 at 10:09 PM Alvaro Herrera wrote: > > On 2025-Mar-20, vignesh C wrote: > > > Will it help the execution time if we use --jobs in case of pg_dump > > and pg_restore wherever supported: > > As I said in another thread, I think we should enable this test to run > without requirin

Re: Statistics Import and Export

2025-04-05 Thread Corey Huinker
> > > Also, why do we need the clause "WHERE s.tablename = ANY($2)"? Isn't > > that already implied by "JOIN unnest($1, $2) ... s.tablename = > > u.tablename"? > > Good question. Corey, do you recall why this was needed? > In my patch, that SQL statement came with the comment: + /* + * The resul

Re: RFC: Additional Directory for Extensions

2025-04-05 Thread Tom Lane
Matheus Alcantara writes: > (Not sure if we should also improve the message to make the test failure less > opaque?) Yeah, I was wondering how to do that. The earlier tests in that script show the whole row from pg_available_extensions, not just a bool ... but that doesn't help if the problem is

Re: split func.sgml to separated individual sgml files

2025-04-05 Thread David G. Johnston
On Wed, Nov 13, 2024 at 1:11 PM Corey Huinker wrote: > The following is step-by-step logic. >> >> > The end result (one file per section) seems good to me. > > I suspect that reviewer burden may be the biggest barrier to going > forward. Perhaps breaking up the changes so that each new sect1 file

Re: Logging which local address was connected to in log_line_prefix

2025-04-05 Thread Tom Lane
Jim Jones writes: > In that case, it LGTM. I looked at 0002 briefly. I don't have any particular objection to the proposed feature, but I'm quite concerned about the potential performance implications of doing a new pg_getnameinfo_all() call for every line of log output. I think that needs to b

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

2025-04-05 Thread Andrei Lepikhov
On 3/23/25 22:16, David Rowley wrote: On Fri, 21 Mar 2025 at 22:02, Andrei Lepikhov wrote: Can you explain why "Estimated Capacity" and "Estimated Distinct Lookup Keys" don't answer that? If there are more distinct lookup keys than there is capacity to store them, then some will be evicted. I w

Re: Reducing the log spam

2025-04-05 Thread Tom Lane
Fujii Masao writes: > Filtering log messages by SQLSTATE might be useful for some users, > but I'm unsure if it should belong in the core. There are also other > potential filtering needs, such as by application name, client host, > database, or roles. Adding only SQLSTATE filtering may not be goo

Re: Using read stream in autoprewarm

2025-04-05 Thread Melanie Plageman
On Mon, Mar 31, 2025 at 2:58 PM Nazir Bilal Yavuz wrote: > > Do you think that I should continue to > attach both approaches? No, for now let's try and get this approach to a good place and then see which one we like. I think there might be another problem with the code. We only set cur_database

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-04-05 Thread Euler Taveira
On Mon, Mar 17, 2025, at 9:34 AM, Shubham Khanna wrote: > I have incorporated the "--remove/-r" parameter in the attached patch, > as it seems more intuitive and straightforward for users. > The attached patch contains the latest changes. There were a lot of discussion around the single vs multipl

Re: Regression test postgres_fdw might fail due to autovacuum

2025-04-05 Thread Andres Freund
Hi, On 2025-03-24 02:26:35 +0900, Fujii Masao wrote: > > With autovacuum = off, all of these fluctuations go away. > > So you are suggesting disabling autovacuum during the postgres_fdw regression > test? I don't think that's a good fix in this case. > Just my idea to stabilize the test with

Re: pg_stat_statements: improve loading and saving routines for the dump file

2025-04-05 Thread m . litsarev
Hi! Thank you for detailed explanations. Respectfully, Mikhail Litsarev, Postgres Professional: https://postgrespro.com

Re: Reducing the log spam

2025-04-05 Thread Fujii Masao
On 2025/03/17 17:12, Jim Jones wrote: On 15.03.25 07:12, Laurenz Albe wrote: ... and here is v7, improved in the spirit of https://postgr.es/m/E132D362-A669-4606-AFE1-B45C9DFCC141%40yesql.se I just revisited this patch and v7 passes all tests from [1,2]. LGTM. Since this patch is marked

Re: Index AM API cleanup

2025-04-05 Thread Peter Eisentraut
I have committed these four patches (squashed into three). I made the error handling change in 0003 that you requested, and also the error handling change in 0002 discussed in an adjacent message. On 12.03.25 16:52, Mark Dilger wrote: On Wed, Mar 12, 2025 at 7:00 AM Peter Eisentraut

Re: BTScanOpaqueData size slows down tests

2025-04-05 Thread Peter Geoghegan
On Wed, Apr 2, 2025 at 12:08 PM Andres Freund wrote: > > It isn't at all rare for the scan to have to return about 1350 TIDs > > from a page, though. Any low cardinality index will tend to have > > almost that many TIDs to return on any page that only stores > > duplicates. And scan will necessari

Re: BTScanOpaqueData size slows down tests

2025-04-05 Thread Tom Lane
Andres Freund writes: > I'm a bit confused by the "MUST BE LAST" comment: > BTScanPosItem items[MaxTIDsPerBTreePage]; /* MUST BE LAST */ Yeah, me too. It looks like it might've been intended to allow the items[] array to be only partially allocated. But as Peter says, we don't do th

Re: Remove an unnecessary check on semijoin_target_ok() on postgres_fdw.c

2025-04-05 Thread Alexander Korotkov
On Fri, Nov 29, 2024 at 3:39 AM Tender Wang wrote: > Alexander Pyhalov 于2024年11月29日周五 00:02写道: >> >> Tender Wang писал(а) 2024-10-09 10:26: >> > Hi, >> >When I debug FDW join pushdown codes, I found below codes in >> > semijoin_target_ok(): >> > if (bms_is_member(var->varno, innerrel->rel

Re: long-standing data loss bug in initial sync of logical replication

2025-04-05 Thread Amit Kapila
On Mon, Mar 17, 2025 at 4:56 PM Hayato Kuroda (Fujitsu) wrote: > > > Regarding the PG13, it cannot be > > applied > > as-is thus some adjustments are needed. I will share it in upcoming posts. > > Here is a patch set for PG13. Apart from PG14-17, the patch could be created > as-is, > because... >

Re: Add Pipelining support in psql

2025-04-05 Thread Daniel Verite
Anthonin Bonnefoy wrote: > 0002: Allows ';' to send a query using extended protocol when within a > pipeline by using PQsendQueryParams It's a nice improvement! > with 0 parameters. It is not > possible to send parameters with extended protocol this way and > everything will be propagate

Re: Proposal - Allow extensions to set a Plan Identifier

2025-04-05 Thread Andrei Lepikhov
On 3/25/25 00:47, Sami Imseih wrote: I know it was mentioned above by both Michael and Andrei that AppendJumble should not be exposed. I am not sure I agree with that. I think it should be exposed, along with JUMBLE_FIELD, JUMBLE_FIELD_SINGLE and JUMBLE_STRING and _jumbleList. It would be helpful

Re: Using read stream in autoprewarm

2025-04-05 Thread Melanie Plageman
On Mon, Mar 31, 2025 at 12:27 PM Nazir Bilal Yavuz wrote: > > I worked on an alternative approach, I refactored code a bit. It does > not traverse the list two times and I think the code is more suitable > to use read streams now. I simply get how many blocks are processed by > read streams and mo

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

2025-04-05 Thread David G. Johnston
On Sat, Mar 29, 2025 at 11:56 AM Andrew Dunstan wrote: > I don't believe that the premise supports the conclusion. > > > Regardless, I do support this patch and probably any similar ones proposed in the future. Do you have an opinion on that? David J.

RE: Fix slot synchronization with two_phase decoding enabled

2025-04-05 Thread Zhijie Hou (Fujitsu)
On Thu, Mar 27, 2025 at 2:29 PM Amit Kapila wrote: > > On Tue, Mar 25, 2025 at 12:1 PM Amit Kapila > wrote: > > > > On Tue, Mar 25, 2025 at 11:05 AM Zhijie Hou (Fujitsu) > > wrote: > > > > > > Hi, > > > > > > When testing the slot synchronization with logical replication slots that > > > enable

Re: [PATCH] Add sortsupport for range types and btree_gist

2025-04-05 Thread Heikki Linnakangas
On 11/03/2025 20:28, Bernd Helmle wrote: Please find a new rebased version of this patch. Hmm, if we implement sortsupport function for GiST, we can register it for B-tree opfamily as well. The range comparison function has quite high overhead thanks to detoasting, but I'm nevertheless seeing

Re: RFC: Logging plan of the running query

2025-04-05 Thread Sadeq Dousti
Hi, Sergey and I reviewed this patch and have a few comments, listed below. > 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. 1. As rightfully described by the OP above, explain.c has grown too bi

Re: Using read stream in autoprewarm

2025-04-05 Thread Melanie Plageman
On Sun, Mar 30, 2025 at 10:01 AM Nazir Bilal Yavuz wrote: > > > Some review feedback on your v4: I don't think we need the > > rs_have_free_buffer per_buffer_data. We can just check > > have_free_buffers() in both the callback and main loop in > > autoprewarm_database_main(). I also think you want

RE: pg_recvlogical requires -d but not described on the documentation

2025-04-05 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > I've updated the commit messages for both patches and also revised > the code comments in the 0002 patch. The updated patches are attached. > > Unless there are any objections, I'm thinking to commit them. Thanks for updating the patch. LGTM. Best regards, Hayato Kuroda FUJITS

Re: Prune partitions by ScalarArrayOpExpr with an array parameter (partkey = ANY($1))

2025-04-05 Thread Andrei Lepikhov
On 3/17/25 14:28, Andrei Lepikhov wrote: Hi, As I see, initial pruning doesn't work in the case when a ScalarArrayOpExpr contains a parameter as the RHS of the expression, like following: partkey = ANY($1) As colleagues say, it is quite typical to use stored procedures, pass an array of ID

Re: Snapshot related assert failure on skink

2025-04-05 Thread Tomas Vondra
On 3/24/25 16:25, Heikki Linnakangas wrote: > On 24/03/2025 16:56, Tomas Vondra wrote: >> >> >> On 3/23/25 17:43, Heikki Linnakangas wrote: >>> On 21/03/2025 17:16, Andres Freund wrote: Am I right in understanding that the only scenario (when in STANDBY_SNAPSHOT_READY), where ExpireOld

Re: pgsql: pg_upgrade: Preserve default char signedness value from old clus

2025-04-05 Thread Robert Haas
On Tue, Mar 18, 2025 at 12:36 AM Masahiko Sawada wrote: > > Cool. The commit message refers to 003_char_signedness, but the test > > name is 005, not 003. > > Thank you for reviewing the patch. I've pushed the patch after fixing it. Thanks for taking care of it (and so quickly!). -- Robert Haas

Re: Proposal: Progressive explain

2025-04-05 Thread Rafael Thofehrn Castro
> I haven't looked into the code yet, but when I ran below commands during > make installcheck, there was an error and an assertion failure Thanks for the report. I actually made a nasty mistake in the last patch after code refactoring, which is to not properly check that a QueryDesc is already be

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

2025-04-05 Thread jian he
On Wed, Apr 2, 2025 at 11:20 PM Fujii Masao wrote: > > > > if (!RelationIsPopulated(rel)) > > ereport(ERROR, > > errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > > errmsg("cannot copy from unpopulated > > materialized view \"

Re: making EXPLAIN extensible

2025-04-05 Thread Robert Haas
On Thu, Mar 20, 2025 at 3:04 AM Andrei Lepikhov wrote: > I'm sorry, I was confused; previously, the difficulties faced by > extension developers were always attributed to him (refer to the > discussion on the selectivity hook). However, now you're introducing a > hook for a trivial operation that

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-04-05 Thread Amit Kapila
On Thu, Mar 20, 2025 at 9:45 AM Shubham Khanna wrote: > The patch had a bug in dry-run mode such that it was not emitting the drop-related command for publications created by the tool with the new option. I fixed that and pushed the patch. Thanks! -- With Regards, Amit Kapila.

Re: SQLFunctionCache and generic plans

2025-04-05 Thread Alexander Pyhalov
Tom Lane писал(а) 2025-04-02 21:09: I wrote: Anyway, I feel pretty good about this patch now and am quite content to stop here for PG 18. Since feature freeze is fast approaching, I did a tiny bit more cosmetic work on this patchset and then pushed it. (There's still plenty of time for adjust

Re: Using read_stream in index vacuum

2025-04-05 Thread Melanie Plageman
On Sun, Mar 23, 2025 at 1:02 PM Andrey Borodin wrote: > > There's a BF failure with just these changes [0]. But IMO it's unrelated. > There are 2 failed tests: > 1. 'activeslot slot invalidation is logged with vacuum on pg_authid' is very > similar to what is discussed here [1] > 2. '+ERROR: tupl

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

2025-04-05 Thread Ashutosh Bapat
On Wed, Apr 2, 2025 at 1:00 PM Amit Langote wrote: > > I'm feeling good about this version, but let me know if you have any > further thoughts / comments. Thanks for incorporating the changes and fixing initial hash table size. + #define EC_DERIVES_HASH_THRESHOLD 32 Given that the constant is

Re: psql \dh: List High-Level (Root) Tables and Indexes

2025-04-05 Thread Christoph Berg
Re: Sadeq Dousti > > I think this is the wrong way round. > > It should be \dtN instead of \dNt. > > Hi Christoph, > The order does not matter, the user can use \dNt or \dtN, as they do > exactly the same thing. Letters coming after \d can be freely permuted. If > you mean a change to the document

Re: Current master hangs under the debugger after Parallel Seq Scan (Linux, MacOS)

2025-04-05 Thread Vladlen Popolitov
Andres Freund писал(а) 2025-03-27 01:22: Hi, Isn't that to be expected? If I understand correctly, the way your gdb is configured is that it intercepts SIGUSR1 signals *without* passing it on to the application (i.e. postgres). We rely on the signal to be delivered. Which it isn't. Thus a

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

2025-04-05 Thread Robert Haas
On Wed, Apr 2, 2025 at 5:17 AM Alvaro Herrera wrote: > I don't quite love this behavior, but since there have been no > complaints, I suppose it's okay and we should just do the same for > not-nulls. I don't understand the issue. It seems like the pg_dump output shown here would recreate the cata

Re: Draft for basic NUMA observability

2025-04-05 Thread Bertrand Drouvot
Hi, On Sat, Apr 05, 2025 at 03:23:38PM +0200, Tomas Vondra wrote: > Something like that. But I think it should be "align the size of ...", > we're not aligning the start. > > >> - There's a comment at the end which talks about "ignored segments". > >> IMHO that type of information should be in th

Re: pgsql: Add support for OAUTHBEARER SASL mechanism

2025-04-05 Thread Jacob Champion
On Mon, Mar 31, 2025 at 4:09 PM Jacob Champion wrote: > I don't have hurd-amd64 to test, but I'm working on a patch that will > build and pass tests if I manually munge pg_config.h. We were skipping > the useless tests via a $windows_os check; I think I should use > check_pg_config() instead. Pro

Re: Add -k/--link option to pg_combinebackup

2025-04-05 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 18, 2025 at 10:31 AM Andrew Dunstan wrote: >> Just a question if everyone wants to run this. Koel takes about 10s to run >> the indent test. > Well, IMHO, that's pretty cheap insurance against having to push a > second commit to fix indentation. But I guess one

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-04-05 Thread Shubham Khanna
On Tue, Mar 18, 2025 at 12:07 PM David G. Johnston wrote: > > On Monday, March 17, 2025, Shubham Khanna wrote: >> >> >> I have added validation for "all" to address both issues at once. >> > > Usage needs to be changed to refer to object types and we should try and > specify which are valid ther

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-05 Thread Andres Freund
Hi, On 2025-03-20 17:08:54 -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Thu, Mar 20, 2025 at 01:33:26PM -0700, Jacob Champion wrote: > >> So one question for the collective is -- putting Curl itself aside -- > >> is having a basic-but-usable OAuth flow, out of the box, worth the > >> cos

PRI?64 vs Visual Studio (2022)

2025-04-05 Thread Kyotaro Horiguchi
Hello, If you're already aware of this and have taken it into account, please feel free to ignore this. As described in the recent commit a0ed19e0a9e, many %ll? format specifiers are being replaced with %. I hadn’t paid much attention to this before, but I happened to check how this behaves on W

rename pg_log_standby_snapshot

2025-04-05 Thread Sami Imseih
Hi, While looking at [1] which introduces a new function called pg_log_query_plan to write an explain plan to the log file, I noticed that we currently have overloaded the meaning of the "pg_log_" prefix. Currently there is pg_log_backend_memory_contexts which logs memory contexts to the log file

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

2025-04-05 Thread Robin Haberkorn
Hello everybody! I was investigating the item "Allow automatic selection of SSL client certificates from a certificate store" from the Todo list [1]. If I understand Seth Robertson in his initial mail correctly, he wanted libpq to select client certificates automatically based on the host while st

Re: Using read stream in autoprewarm

2025-04-05 Thread Melanie Plageman
On Thu, Apr 3, 2025 at 4:22 PM Daniel Gustafsson 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 like a good change. Thanks for taking a look! > A fe

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-04-05 Thread Shubham Khanna
On Thu, Mar 20, 2025 at 4:53 PM Ashutosh Bapat wrote: > > On Thu, Mar 20, 2025 at 10:25 AM Shubham Khanna > wrote: > > > > > The attached patches contain the suggested changes. > > > > I have started reviewing the patches again. Here are some review comments > > > + > + -a > + --

Re: AIO v2.5

2025-04-05 Thread Andres Freund
Hi, On 2025-03-19 13:20:17 -0400, Melanie Plageman wrote: > On Tue, Mar 18, 2025 at 4:12 PM Andres Freund wrote: > > > > Attached is v2.10, > > I noticed a few comments could be improved in 0011: bufmgr: Use AIO > in StartReadBuffers() > [...] Yep. > Above and in AsyncReadBuffers() > > * T

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

2025-04-05 Thread vignesh C
On Tue, 18 Mar 2025 at 09:26, jian he wrote: > > changed based on this. > > also minor documentation tweaks. Few comments: 1) I felt this is wrong: diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c index 9a4d993e2bc..7980513a9bd 100644 --- a/src/bin/psql/tab-complete.in

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

2025-04-05 Thread Peter Smith
On Thu, Apr 3, 2025 at 10:26 AM Andres Freund wrote: > > 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

Re: Proposal - Allow extensions to set a Plan Identifier

2025-04-05 Thread Michael Paquier
On Thu, Mar 20, 2025 at 09:46:55PM -0400, Sami Imseih wrote: > * For the same reasons as the query identifiers (see above), > > but, I went ahead and commented it similar to how we document > pgstat_report_query_id and pgstat_get_my_query_id routines. > attached is v2-0001 Looks mostly OK from he

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

2025-04-05 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > I think this fix should be backpatched to all supported versions. > Since the issue you found and the one I found seem different, > I'd prefer committing them separately. I have no objections. > If that works for you, > here are the commit log messages I'm considering. LGTM, t

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

2025-04-05 Thread Peter Geoghegan
On Tue, Apr 1, 2025 at 3:08 PM Alena Rybakina wrote: > I think it would be useful to show information that we used an index scan but > at the same time we skipped the "region" column and I assume we should output > how many distinct values the "region" column had. > > For example it will look li

Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions

2025-04-05 Thread Aidar Imamov
Joseph Koshakow 2025-03-21 01:25: Hi I am working with Aidar to give a review and I am also a beginner reviewer. From 813e5ec0da4c65970b4b1ce2ec2918e4652da9ab Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz Date: Fri, 20 Dec 2024 14:06:47 +0300 Subject: [PATCH v1 1/2] Add pg_buffercache_evi

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

2025-04-05 Thread Noah Misch
On Mon, Mar 17, 2025 at 07:52:02PM -0400, Andres Freund wrote: > Here's a proposed patch for this. It turns out that the bug might already be > reachable, even without defining FDDEBUG. There's a debug ereport() in > register_dirty_segment() - but it's hard to reach in practice. > > I don't really

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

2025-04-05 Thread Greg Sabino Mullane
On Thu, Mar 20, 2025 at 4:45 PM Daniel Gustafsson wrote: > Having a watch interval of zero is IMHO somewhat nonsensical, but since it > was done intentionally in 6f9ee74d45 (which I had missed) I agree that the > default should support it as well. Fixed. > Yeah, I forgot about that too. The new

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

2025-04-05 Thread Seth Robertson
Yes, at first glance the service file looks like it should work and is a much more elegant and generic method than my proposed hack. I can't trivially tell if the ssl configuration aspect of it was available in 8.3/8.4, but that isn't overly relevant since it is certainly available now. Thanks

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

2025-04-05 Thread Tom Lane
Fabien COELHO writes: > I've been biten by psql's \copy lack of variable expansion, in a > limited-access docker-inside-VM context where COPY is not a viable option and > hardwired names are not desirable. The attached patch allows \copy to use > variable's values in place of table and file nam

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-04-05 Thread Shubham Khanna
On Thu, Mar 20, 2025 at 5:54 PM Amit Kapila wrote: > > On Thu, Mar 20, 2025 at 4:53 PM Ashutosh Bapat > wrote: > > > > On Thu, Mar 20, 2025 at 10:25 AM Shubham Khanna > > wrote: > > > > > > +# run pg_createsubscriber with '--database' and '--all' without '--dry-run' > > +# and verify the failure

Re: Draft for basic NUMA observability

2025-04-05 Thread Jakub Wartak
On Thu, Apr 3, 2025 at 10:23 AM Bertrand Drouvot wrote: > > Hi, Hi Bertrand, > On Thu, Apr 03, 2025 at 09:01:43AM +0200, Jakub Wartak wrote: [..] > === v21-0002 > While pg_buffercache_build_tuple() is not added (pg_buffercache_save_tuple() > is). Fixed > About v21-0002: > > === 1 > > I can se

Re: Speed up ICU case conversion by using ucasemap_utf8To*()

2025-04-05 Thread vignesh C
On Sun, 30 Mar 2025 at 00:20, Andres Freund wrote: > > On 2025-03-17 12:16:11 +0530, vignesh C wrote: > > On Fri, 20 Dec 2024 at 10:50, Andreas Karlsson wrote: > > > > > > Hi, > > > > > > Jeff pointed out to me that the case conversion functions in ICU have > > > UTF-8 specific versions which mea

Re: making EXPLAIN extensible

2025-04-05 Thread Robert Haas
On Mon, Mar 17, 2025 at 11:54 PM Sami Imseih wrote: > +1 > > I did not think of adding a new hook, because there must be a really good > reason to add a new hook. I think it's justified for this case. It's better > than > my approach since the extension author can just put all their checks in one

Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET

2025-04-05 Thread Michael Paquier
On Tue, Mar 18, 2025 at 05:24:42PM +1300, David Rowley wrote: > I had a look at this and it seems the main difference will be that > this patch will protect against the case that a given node is non-null > but has a custom jumble function which selects to not jumble anything > in some cases. Since

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

2025-04-05 Thread David Rowley
On Mon, 24 Mar 2025 at 22:19, Tender Wang wrote: >> Maybe I was wrong about writing nothing in master's docs. It might >> still be important to detail this. I don't know the best way to phrase >> that, but maybe something along the lines of: "The query planner >> obtains locks for all partitions w

Re: Add Postgres module info

2025-04-05 Thread Yurii Rashkovskii
On Wed, Mar 26, 2025 at 8:17 PM Tom Lane wrote: > Yurii Rashkovskii writes: > >> Can you propose a specific change to clean it up? I wanted to write > >> just "PG_MODULE_MAGIC_DATA()", but I'm not sure that's valid C either. > > > I was thinking about passing `.name = NULL, .version = NULL` ins

Re: Separate GUC for replication origins

2025-04-05 Thread Masahiko Sawada
On Thu, Mar 20, 2025 at 8:38 PM Amit Kapila wrote: > > On Thu, Mar 20, 2025 at 10:37 PM Masahiko Sawada > wrote: > > > > On Wed, Mar 19, 2025 at 8:15 PM Amit Kapila wrote: > > > > > > On Wed, Mar 19, 2025 at 10:43 AM Masahiko Sawada > > > wrote: > > > > > > > > On Mon, Mar 17, 2025 at 6:05 PM

Re: AIO v2.5

2025-04-05 Thread Noah Misch
On Thu, Mar 20, 2025 at 02:54:14PM -0400, Andres Freund wrote: > On 2025-03-19 18:11:18 -0700, Noah Misch wrote: > > On Wed, Mar 19, 2025 at 06:17:37PM -0400, Andres Freund wrote: > > > On 2025-03-19 14:25:30 -0700, Noah Misch wrote: > > > > I see this relies on md_readv_complete having converted "

Re: AIO v2.5

2025-04-05 Thread Andres Freund
Hi, I've pushed fixes for 1) and 2) and am working on 3). On 2025-04-01 17:13:24 -0700, Noah Misch wrote: > 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 > > > CATCA

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

2025-04-05 Thread Alena Rybakina
On 03.04.2025 18:26, Alexander Korotkov wrote: On Thu, Apr 3, 2025 at 5:18 PM Alena Rybakina wrote: Okay, I agree with you. Good. I've reflected this limitation in comments and the commit message. Thank you, it looks fine) Also, I've adjust regression tests by removing excessive ones and ad

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

2025-04-05 Thread Ashutosh Bapat
On Mon, Mar 24, 2025 at 5:44 PM Alvaro Herrera wrote: > > On 2025-Mar-24, Ashutosh Bapat wrote: > > > One concern I have with directory format is the dumped database is not > > readable. This might make investigating a but identified the test a > > bit more complex. > > Oh, it's readable all right

Re: Using read stream in autoprewarm

2025-04-05 Thread Melanie Plageman
On Tue, Apr 1, 2025 at 7:21 AM Nazir Bilal Yavuz wrote: > > On Tue, 1 Apr 2025 at 05:14, Melanie Plageman > wrote: > > > +1 for using the functions. I think it is hard to follow / maintain > this with the do-while loops and goto statements. I'll take a look at your downthread proposal in a bit.

Re: Thread-safe nl_langinfo() and localeconv()

2025-04-05 Thread Peter Eisentraut
On 28.03.25 09:13, Peter Eisentraut wrote: About patch 0003: I had previously pointed out that the canonicalization might have been intentional, and that we have canonicalization of ICU locale names. But we don't have to keep the setlocale()-based locale checking implementation just for that,

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-05 Thread Tom Lane
Thomas Munro writes: > 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. > How feasible/fragile/weird wou

Re: vacuum_truncate configuration parameter and isset_offset

2025-04-05 Thread Nikolay Shaplov
В письме от понедельник, 24 марта 2025 г. 22:11:19 MSK пользователь Robert Haas написал: > I think that the answer here might be that Nikolay doesn't like this > because it interacts badly with his "New [relation] options engine," There is no problem with adding isset_offset into "New [relation]

Re: [RFC] Lock-free XLog Reservation from WAL

2025-04-05 Thread Yura Sokolov
Good day, Andres. 18.03.2025 23:40, Andres Freund wrote: > Reliably fails tests on windows, due to what looks to be a null pointer > dereference. > > E.g. https://cirrus-ci.com/task/6178371937239040 > > That's likely related to EXEC_BACKEND. > > The new status of this patch is: Waiting on Auth

Detach partition with constraint test

2025-04-05 Thread Ashutosh Bapat
Hi, I tested the "not enforced" constraint feature extensively today especially the cases of partitioned table. Everything seems to be working fine. While doing that, I found that foreign_key.sql does not have a test to make sure that a partition continues to have the constraints in the same state

Re: Statistics Import and Export

2025-04-05 Thread Corey Huinker
> > * Changed to use LookupExplicitNamespace() > Seems good. > * Added test for temp tables > +1 > * Doc fixes So this patch swings the pendulum a bit back towards accepting some things as errors. That's understandable, as we're never going to have a situation where we can guarantee that th

Re: RFC: Logging plan of the running query

2025-04-05 Thread Sami Imseih
> > 2/ > > It should be noted that the plan will not print to the log until > > the plan begins executing the next plan node? depending on the > > operation, that could take some time ( i.e.long seq scan of a table, > > etc.) > > Does this behavior need to be called out in docs? > > Seems reasonabl

Re: [18] CREATE SUBSCRIPTION ... SERVER

2025-04-05 Thread Shlok Kyal
On Sat, 1 Mar 2025 at 04:35, Jeff Davis wrote: > > On Mon, 2024-12-16 at 20:05 -0800, Jeff Davis wrote: > > On Wed, 2024-10-30 at 08:08 -0700, Jeff Davis wrote: > > > > Rebased v14. > > The approach has changed multiple times. It starte off with more in- > core code, but in response to review feed

Re: Show WAL write and fsync stats in pg_stat_io

2025-04-05 Thread Ranier Vilela
Hi. Em seg., 3 de fev. de 2025 às 01:07, Michael Paquier escreveu: > On Fri, Jan 31, 2025 at 11:29:31AM +0300, Nazir Bilal Yavuz wrote: > > On Wed, 29 Jan 2025 at 18:16, Bertrand Drouvot > > wrote: > >> I think that's the main reason why ff99918c625 added this new GUC > (looking at > >> the com

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

2025-04-05 Thread Yuya Watari
Hello Tom, Thank you for your detailed review, and apologies for my late response. On Tue, Mar 25, 2025 at 2:49 AM Tom Lane wrote: > > One thing I don't love is putting the children into RelOptInfos. > That seems like an unrelated data structure. Have you thought > about instead having, in each

Re: Modern SHA2- based password hashes for pgcrypto

2025-04-05 Thread Alvaro Herrera
Hello, I have pushed this now, hoping it won't explode. Thanks! -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "No es bueno caminar con un hombre muerto"

Re: New criteria for autovacuum

2025-04-05 Thread Konstantin Knizhnik
On 03/04/2025 6:29 pm, Aleksander Alekseev wrote: I have mixed feelings about addressing this. Although this behavior is somewhat counterintuitive, if the user has a read-only lookup table he/she can always execute VACUUM manually. In order to relieve him of this unbearable burden we are going

Re: RFC: Additional Directory for Extensions

2025-04-05 Thread Matheus Alcantara
On Wed, Mar 19, 2025 at 3:56 PM Tom Lane wrote: > > Peter Eisentraut writes: > > Committed that, thanks. > > Buildfarm member snakefly doesn't like this too much. Since no other > animals have failed, I guess it must be about local conditions on > that machine, but the report is pretty opaque: >

Re: vacuum_truncate configuration parameter and isset_offset

2025-04-05 Thread Nikolay Shaplov
В письме от среда, 26 марта 2025 г. 17:42:23 MSK пользователь Robert Haas написал: > 1. We're talking about a minor deviation resulting in a very small > amount of additional code. It's entirely unclear to me why anyone > thinks this is a big deal either way, even if one accepts that the > patch

Re: Separate GUC for replication origins

2025-04-05 Thread Amit Kapila
On Wed, Mar 19, 2025 at 10:43 AM Masahiko Sawada wrote: > > On Mon, Mar 17, 2025 at 6:05 PM Euler Taveira wrote: > > > > On Mon, Mar 17, 2025, at 8:44 PM, Masahiko Sawada wrote: > > > > I would suggest putting the new max_active_replication_origins after > > max_parallel_apply_workers_per_subscri

  1   2   3   >