Re: Non-reproducible AIO failure

2025-06-05 Thread Konstantin Knizhnik
On 06/06/2025 2:31 am, Tom Lane wrote: Matthias van de Meent writes: I have a very wild guess that's probably wrong in a weird way, but here goes anyway: Did anyone test if interleaving the enum-typed bitfield fields of PgAioHandle with the uint8 fields might solve the issue? Ugh. I think y

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Amit Kapila
On Thu, Jun 5, 2025 at 7:24 PM Feike Steenbergen wrote: > > On Thu, 5 Jun 2025 at 12:49, Peter Eisentraut wrote: > > I propose to address this by not allowing the use of user-defined > > functions in generation expressions for now. The attached patch > > implements this. This assumes that all b

Re: Conflict detection for update_deleted in logical replication

2025-06-05 Thread shveta malik
On Wed, Jun 4, 2025 at 4:12 PM Zhijie Hou (Fujitsu) wrote: > > Here is the V33 patch set which includes the following changes: > Thank You for the patches, please find few comments for patch003: 1) + /* + * Skip the track_commit_timestamp check by passing it as + * true, since it has already bee

Re: Avoid orphaned objects dependencies, take 3

2025-06-05 Thread Bertrand Drouvot
Hi, On Tue, Jun 03, 2025 at 01:27:29PM -0400, Robert Haas wrote: > On Mon, Jun 2, 2025 at 10:02 AM Bertrand Drouvot > wrote: > > So, we currently have 2 patterns: > > > > P1: permission checks on a referenced object is done before we call > > recordMultipleDependencies() > > P2: permission check

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-06-05 Thread Peter Eisentraut
On 05.06.25 12:42, Thomas Munro wrote: I think on your C11 thread I might have been confused about that, since there was an implication that 2019 might support , but it looks like 2019 added language stuff while 2022 added the library stuff. But yeah, given your proposal that MSVC 2019 should be

Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2025-06-05 Thread Amit Kapila
On Tue, Jun 3, 2025 at 6:51 PM Alexander Korotkov wrote: > > > > > As per my understanding, for logical slots, effective_xmin is only set > > during the initial copy phase (or say if one has to export a > > snapshot), after that, its value won't change. Please read the > > comments in CreateInitDe

Re: Remaining dependency on setlocale()

2025-06-05 Thread Jeff Davis
On Tue, 2024-12-17 at 13:14 +0100, Peter Eisentraut wrote: > > > > +1 to this approach. It makes things more consistent across > > > > platforms > > > > and avoids surprising dependencies on the global setting. > > > > > > > > I think this is the best way, and I haven't seen anyone supporting > >

Re: What's our minimum supported Python version?

2025-06-05 Thread Peter Eisentraut
On 29.04.25 22:27, Jacob Champion wrote: On Tue, Apr 29, 2025 at 8:57 AM Jacob Champion wrote: Cool, I will plan to push this Sometime Soon, then. This is now committed. Thanks everybody! Since we now require Python 3.6, we can also remove PL/Python test alternative expected files for earl

Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2025-06-05 Thread Amit Kapila
On Thu, Jun 5, 2025 at 8:51 PM Vitaly Davydov wrote: > > Dear Alexander, Amit > > Alexander Korotkov wrote: > > Also, I've changed ReplicationSlotsComputeRequiredLSN() call to > > CheckPointReplicationSlots() to update required LSN after > > SaveSlotToPath() updated last_saved_restart_lsn. This h

Re: Foreign key validation failure in 18beta1

2025-06-05 Thread Amul Sul
On Thu, Jun 5, 2025 at 10:31 PM Alvaro Herrera wrote: > > On 2025-Jun-04, jian he wrote: > > > On Tue, Jun 3, 2025 at 12:14 PM Amul Sul wrote: > > > > > > v7 is way more intuitive compared with v5, v6. > > Agreed, this version is better than the previous ones. I split it as > two commits, for NO

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

2025-06-05 Thread David G. Johnston
On Thu, Jun 5, 2025 at 7:32 PM Robert Treat wrote: > I'm not saying there isn't any possible use case that could be solved with > the above (although mind my example of people running with all indexes and > the guc always enabled; I don't think thats a sceanrio that anyone thinks > should be reco

Re: Non-reproducible AIO failure

2025-06-05 Thread Alexander Lakhin
Hello, 05.06.2025 22:00, Alexander Lakhin wrote: Thank you for your attention to this and for the tip! Today I tried the following: --- a/src/include/storage/aio.h +++ b/src/include/storage/aio.h @@ -89,8 +89,8 @@ typedef enum PgAioOp     /* intentionally the zero value, to help catch zeroed

Re: We should lazy-initialize the deadlock checker state memory

2025-06-05 Thread Tom Lane
Andres Freund writes: > ISTM that we could move the call to InitDeadLockChecking() to the start of > CheckDeadLock(), before it acquires all the locks. That'd require making it > safe to call InitDeadLockChecking() multiple times, but that's obviously > trivial. Hmph. Do we even need that to be

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

2025-06-05 Thread Robert Treat
On Thu, Jun 5, 2025 at 8:16 PM Sami Imseih wrote: > > Thanks for weighing in. > +1 > > > In my mind, this feature is for "I'm almost 100% certain this index > > isn't needed, I want to make sure I'm 100% right in a way that I can > > quickly fix the ensuing chaos if I'm wrong". > > This is the pr

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2025-06-05 Thread jian he
hi. one more patch for regress tests. ALTER TABLE salespeople MERGE PARTITIONS (salespeople10_20, salespeople20_30, salespeople30_40) INTO salespeople10_40; the trigger on the merged partition will be dropped. For example, here, trigger on salespeople10_20 will be dropped. I am surprised that pa

Re: Improve explicit cursor handling in pg_stat_statements

2025-06-05 Thread Michael Paquier
On Thu, Jun 05, 2025 at 07:42:48AM -0500, Sami Imseih wrote: > v5 attached. I'm OK with this version, so switching that as ready for committer. -- Michael signature.asc Description: PGP signature

Re: Partitioned tables and [un]loggedness

2025-06-05 Thread Michael Paquier
On Thu, Jun 05, 2025 at 03:04:45PM -0500, Nathan Bossart wrote: > IMHO a case can be reasonably made that this is an oversight in the related > commit. I've added the rest of the RMT here in case they see it > differently. > > The patch LGTM, too. Okay, thanks. Let's wait for a couple of days i

Re: Retiring some encodings?

2025-06-05 Thread Michael Paquier
On Thu, Jun 05, 2025 at 08:05:20PM -0400, Andres Freund wrote: > There has been plenty discussion about GB18030, and it seems we aren't likely > to be able to drop that. Yes, as per upthread. > I think there are a lot easier cases though. The easiest probably is > MULE_INTERNAL - all discussions

CREATE DATABASE command for non-libc providers

2025-06-05 Thread Jeff Davis
>From the discussion here: https://www.postgresql.org/message-id/cafcrh--rtqbobpjyfdmpd9kycyxsxkplw7lhxymyhhxa2xo...@mail.gmail.com the CREATE DATABASE command has a tendency to throw errors in confusing ways when using non-libc providers. I have attached a patch 0001 that fixes a misleading hint

Re: PG 18 release notes draft committed

2025-06-05 Thread Bruce Momjian
On Wed, Jun 4, 2025 at 05:53:38PM -0400, Bruce Momjian wrote: > On Wed, Jun 4, 2025 at 02:29:46PM -0700, Noah Misch wrote: > > I agree with David G. Johnston's feedback on this. My draft didn't mention > > SECURITY DEFINER, because I consider it redundant from a user's perspective. > > If a func

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

2025-06-05 Thread Sami Imseih
> Thanks for weighing in. +1 > In my mind, this feature is for "I'm almost 100% certain this index > isn't needed, I want to make sure I'm 100% right in a way that I can > quickly fix the ensuing chaos if I'm wrong". This is the primary use-case. A user performs an ALTER INDEX... INVISIBLE, and t

Re: Retiring some encodings?

2025-06-05 Thread Andres Freund
Hi, On 2025-05-22 14:54:22 +0900, Michael Paquier wrote: > All the encodings supported are documented here: > https://www.postgresql.org/docs/devel/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED There has been plenty discussion about GB18030, and it seems we aren't likely to be able to drop that. I

We should lazy-initialize the deadlock checker state memory

2025-06-05 Thread Andres Freund
Hi, While looking at [1] I noticed that a decent amount of CPU usage was spent allocating memory in InitDeadLockChecking(), which we do very early during backend startup. With values of max_connections (et al) that are common today, each backend allocates a surprisingly large amount of memory for

Re: Retiring some encodings?

2025-06-05 Thread Tatsuo Ishii
>> Agreed that the so-said "state" level requirement would be a >> non-starter. > > Or maybe support for using these as server encodings could be > removed, keeping the client_encoding part intact? GB18030 is already client encoding only, and cannot be used as a server encoding. The only way to s

Re: Non-reproducible AIO failure

2025-06-05 Thread Tom Lane
Matthias van de Meent writes: > I have a very wild guess that's probably wrong in a weird way, but > here goes anyway: > Did anyone test if interleaving the enum-typed bitfield fields of > PgAioHandle with the uint8 fields might solve the issue? Ugh. I think you probably nailed it. IMO all thos

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

2025-06-05 Thread David Rowley
On Fri, 6 Jun 2025 at 08:14, Robert Treat wrote: > I know this thread is rather old and there doesn't seem to be full > agreement on the ALTER vs GUC implementation idea, and even though I > agree with the sentiment that the GUC system is little more than the > "half-baked take on planner hints",

Re: pg_get_multixact_members not documented

2025-06-05 Thread Sami Imseih
Thanks for the review! > +1. PFA diff of some edits. Please incorporate them in > your patch if you find them correct. sure, the diff looks fine to me. will fix. > We developers may understand the mode text "sh", "keysh" etc. But it may not > be user friendly. yes, I can see that being a point

Re: sslinfo extension - add notbefore and notafter timestamps

2025-06-05 Thread Cary Huang
On Mon, 10 Mar 2025 12:29:28 -0700 Cary Huang wrote --- > The attached v14 is the rebased patch that updated the OpenSSL API calls to > be compatible in > version 1.1.1 (and beyond), which is the new minimum OpenSSL version > supported in PostgreSQL. > > > Cary Huang > --

Re: Non-reproducible AIO failure

2025-06-05 Thread Matthias van de Meent
On Thu, 5 Jun 2025 at 21:00, Alexander Lakhin wrote: > > Hello Thomas and Andres, > > 04.06.2025 23:32, Thomas Munro wrote: > > On Thu, Jun 5, 2025 at 8:02 AM Andres Freund wrote: > >> On 2025-06-03 08:00:01 +0300, Alexander Lakhin wrote: > >>> 2025-06-03 00:19:09.282 EDT [25175:1] LOG: !!!pgaio_

Re: Support tid range scan in parallel?

2025-06-05 Thread Cary Huang
Hello Sorry David and all who have reviewed the patch, it's been awhile since the patch was last worked on :(. Thank you all for the reviews and comments! Attached is the rebased patch that adds support for parallel TID range scans. This feature is particularly useful scanning large tables wher

Re: Question Regarding Merge Append and Parallel Execution of Index Scans on Partitioned Table

2025-06-05 Thread David Rowley
On Fri, 6 Jun 2025 at 07:49, Ayush Vatsa wrote: > That said, I’m wondering if this might not be necessary, given that > Gather Merge already accomplishes similar functionality. Would > love to hear your thoughts on whether there’s a distinct advantage to > adding parallelism to Merge Append or if

Re: track generic and custom plans in pg_stat_statements

2025-06-05 Thread Sami Imseih
> Thanks for your work on this. > > Since we've changed the placement of these parameters > between parallel_workers and stats_since, we should also update > the documentation to reflect their new location. Absolutely. My miss. Here is v9 with the doc updated. Thanks! -- Sami v9-0001-Add-plan_

Re: [19] Proposal: function markers to indicate collation/ctype sensitivity

2025-06-05 Thread Jeff Davis
On Tue, 2025-06-03 at 20:22 -0700, Jeff Davis wrote: > EQUALITY marker: indicates that the function or index AM depends on > CollOid for the equality semantics of the input expression. Examples: > texteq(), btree AM, hash AM. (Note: EQUALITY is only important for > non- > deterministic collations a

Re: track generic and custom plans in pg_stat_statements

2025-06-05 Thread Ilia Evdokimov
On 03.06.2025 06:31, Sami Imseih wrote: See v8 with the field names reorganized. Apologies if you received two identical emails. Since we've changed the placement of these parameters between parallel_workers and stats_since, we should also update the documentation to reflect their new loca

Re: track generic and custom plans in pg_stat_statements

2025-06-05 Thread Ilia Evdokimov
On 03.06.2025 06:31, Sami Imseih wrote: See v8 with the field names reorganized. Thanks for your work on this. Since we've changed the placement of these parameters between parallel_workers and stats_since, we should also update the documentation to reflect their new location. -- Best re

Re: [19] Proposal: function markers to indicate collation/ctype sensitivity

2025-06-05 Thread Jeff Davis
On Thu, 2025-06-05 at 10:12 +0200, Peter Eisentraut wrote: > But I would consider making this one setting > with multiple values instead of multiple boolean settings. While we're at it, CTYPE is not very descriptive for a user-facing name. And COLLATE has become overloaded (expression clause, pg_

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

2025-06-05 Thread Robert Treat
On Mon, Apr 28, 2025 at 7:23 AM Shayon Mukherjee wrote: > On Thu, Apr 24, 2025 at 12:45 AM jian he wrote: >> > Thank you for the feedback. I have also updated the feedback from [1] as > well. Few extra notes: > > - Attached v18 > - Rebased against master > - Updated the commit message > - Update

Unnecessary connection overhead due copy-on-write (mainly openssl)

2025-06-05 Thread Andres Freund
Hi, Looking at [1] I, again, noticed that a decent portion of our connection overhead is due to openssl's atexit handler. On my older workstation (with a few noisy things running): c=16;pgbench -n -M prepared -c$c -j$c -P1 -T10 -f <(echo 'select') -C -> 3057 TPS If I change the exit() in proc_e

Re: Partitioned tables and [un]loggedness

2025-06-05 Thread Nathan Bossart
On Thu, Jun 05, 2025 at 01:57:30PM +0900, Michael Paquier wrote: > How does the RMT feel about this change? Nathan, would you be OK with > that? It's not a big problem, as well, if the code is kept as-is, but > as it's a simple change.. IMHO a case can be reasonably made that this is an oversigh

Re: postmaster uses more CPU in 18 beta1 with io_method=io_uring

2025-06-05 Thread Nathan Bossart
On Thu, Jun 05, 2025 at 12:47:52PM -0400, Tom Lane wrote: > Andres Freund writes: >> I think this is a big enough pitfall that it's, obviously assuming the patch >> has a sensible complexity, worth fixing this in 18. RMT, anyone, what do you >> think? > > Let's see the patch ... but yeah, I'd rat

Re: [19] Proposal: function markers to indicate collation/ctype sensitivity

2025-06-05 Thread Jeff Davis
On Thu, 2025-06-05 at 10:12 +0200, Peter Eisentraut wrote: > The reason we don't do it at parse time is that we don't have the > information which functions care about collations, which is exactly > what > you are proposing here to add. Currently, we have: create table c(x text collate "C",

Re: gcc 15 "array subscript 0" warning at level -O3

2025-06-05 Thread Tom Lane
Andres Freund writes: >> I've been wondering about adding wrapping something like that in a >> pg_assume(expr) or such. > I've been once more annoyed by this warning. Here's a prototype for the > approach outlined above. Looks plausible by eyeball. I did notice a typo in the comment: + * pg_as

Re: Question Regarding Merge Append and Parallel Execution of Index Scans on Partitioned Table

2025-06-05 Thread Ayush Vatsa
> The input node to the Gather Merge needs to be sorted by > something, and the output of the Gather Merge will be sorted by the > same thing. Ok now I got that. Thanks for the clarification. Last small question: As of now parallelism in merge append is not supported, but it could be something we

Re: add function for creating/attaching hash table in DSM registry

2025-06-05 Thread Nathan Bossart
On Thu, Jun 05, 2025 at 01:38:25PM -0500, Sami Imseih wrote: > I have a few early comments, but I plan on trying this out next. Thanks for reviewing. >> > +typedef struct NamedDSMHashState >> > +{ >> > + dsa_handle dsah; >> > + dshash_table_handle dshh; >> > + int

Re: Some questions about gin index

2025-06-05 Thread Tom Lane
Andy Fan writes: > When reading the code for Gin Index, there are lots of confusion about > some concepts, so here are some questions in my mind. At least some of these things are explained in gin.sgml. regards, tom lane

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Robert Haas
On Thu, Jun 5, 2025 at 11:19 AM jian he wrote: > I think it will work. > because we already require the generated column expression to be > immutable functions. > > The above functions you mentioned are all not immutable. Hmm. I guess I have no evidence that we have built-in immutable functions t

Re: Non-reproducible AIO failure

2025-06-05 Thread Alexander Lakhin
Hello Thomas and Andres, 04.06.2025 23:32, Thomas Munro wrote: On Thu, Jun 5, 2025 at 8:02 AM Andres Freund wrote: On 2025-06-03 08:00:01 +0300, Alexander Lakhin wrote: 2025-06-03 00:19:09.282 EDT [25175:1] LOG: !!!pgaio_io_before_start| ioh: 0x104c3e1a0, ioh->op: 1, ioh->state: 1, ioh->resul

Re: add function for creating/attaching hash table in DSM registry

2025-06-05 Thread Sami Imseih
Thanks for this patch! I have implemented this pattern several times, so this is really helpful. I have a few early comments, but I plan on trying this out next. 1/ > > +typedef struct NamedDSMHashState > > +{ > > + dsa_handle dsah; > > + dshash_table_handle dshh; > > + int

Re: postmaster uses more CPU in 18 beta1 with io_method=io_uring

2025-06-05 Thread Andres Freund
Hi, On 2025-06-05 12:47:52 -0400, Tom Lane wrote: > Andres Freund writes: > > I think this is a big enough pitfall that it's, obviously assuming the patch > > has a sensible complexity, worth fixing this in 18. RMT, anyone, what do you > > think? > > Let's see the patch ... but yeah, I'd rather

Re: macos exported symbols list not used for loadable modules

2025-06-05 Thread Jacob Champion
On Tue, Jun 3, 2025 at 12:48 AM Peter Eisentraut wrote: > > On macOS, when building with the make system, the exported symbols list > (SHLIB_EXPORTS) is ignored. I don't think that is intentional. It was > probably just forgotten, since that combination has never actually been > used until now (

Re: ABI Compliance Checker GSoC Project

2025-06-05 Thread Álvaro Herrera
On 2025-Jun-04, Mankirat Singh wrote: > Here's the workflow I tried to compile > $ ./configure CFLAGS="-Og -g -fvisibility=hidden" > --prefix=/home/mankirat/install/REL_17_4 > $ make -j$(nproc) > > /usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1154: > undefined referenc

Re: Foreign key validation failure in 18beta1

2025-06-05 Thread Alvaro Herrera
On 2025-Jun-04, jian he wrote: > On Tue, Jun 3, 2025 at 12:14 PM Amul Sul wrote: > > > I found a third approach that requires only a few changes. The key > > idea is to determine the root referenced table and pass it to > > QueueFKConstraintValidation(). We would then enqueue phase 3 > > validati

Re: postmaster uses more CPU in 18 beta1 with io_method=io_uring

2025-06-05 Thread Tom Lane
Andres Freund writes: > I think this is a big enough pitfall that it's, obviously assuming the patch > has a sensible complexity, worth fixing this in 18. RMT, anyone, what do you > think? Let's see the patch ... but yeah, I'd rather not ship 18 like this. regards, tom la

Re: Wrong security context for deferred triggers?

2025-06-05 Thread Tom Lane
Noah Misch writes: > In postgr.es/m/1071973.1749075...@sss.pgh.pa.us of yesterday's release notes > discussion, you wrote "Execute AFTER triggers as the role that was active at > the moment the trigger event was queued." That's a good direction, since it's > correct for the mid-query case without

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2025-06-05 Thread Dmitry Koval
Hi, jian he! Thank you very much for your emails! Unfortunately, due to urgent tasks at my work, I do not have time to look through your notes today and tomorrow. But I will definitely do it at the beginning of next week. -- With best regards, Dmitry Koval Postgres Professional: http://postgr

Re: Wrong security context for deferred triggers?

2025-06-05 Thread Noah Misch
On Thu, Jun 05, 2025 at 11:10:04AM -0400, Tom Lane wrote: > Noah Misch writes: > > Phrase "the role that executed the statement" doesn't match what happens if > > the role changes mid-statement. Example of a statement that does so: > > > select set_config('role', rolname, true), current_user f

Re: postmaster uses more CPU in 18 beta1 with io_method=io_uring

2025-06-05 Thread Andres Freund
Hi, On 2025-06-03 12:24:38 -0700, MARK CALLAGHAN wrote: > When measuring the time to create a connection, it is ~2.3X longer with > io_method=io_uring then with io_method=sync (6.9ms vs 3ms), and the > postmaster process uses ~3.5X more CPU to create connections. I can reproduce that - the reason

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Christoph Berg
Re: Tom Lane > > Extending the idea, perhaps the check could be moved to run-time and > > recursively check that only immutable functions are called, including > > user-defined immutable functions? > > I don't think I'd trust that. UDFs can claim to be immutable but > be lying about it. That's w

Possibly hard-to-read message

2025-06-05 Thread David G. Johnston
On Thursday, June 5, 2025, Peter Eisentraut wrote: > On 07.04.25 02:55, Daniel Gustafsson wrote: > >> On 7 Apr 2025, at 02:43, David G. Johnston >>> wrote: >>> >> >> How about: >>> >>> + "if set to a number, overrides the default two second \\watch >>> interval\n" >>> >>> I do like the consi

Re: pg_get_multixact_members not documented

2025-06-05 Thread Ashutosh Bapat
On Thu, Jun 5, 2025 at 2:11 AM Sami Imseih wrote: > v2 addresses the comments. > > Adds a new section called "Multixact Information Functions" and a reference > to pg_get_multixact_members after the description of what multixact members > are in maintenance.sgml. > > As I spent some time looking

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Tom Lane
Christoph Berg writes: > So the question is, are all built-in *immutable* functions safe? Perhaps. > Extending the idea, perhaps the check could be moved to run-time and > recursively check that only immutable functions are called, including > user-defined immutable functions? I don't think I'd

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Christoph Berg
Re: Robert Haas > I don't think this is sufficient to fix the problem. We have built-in > functions that are unsafe. These include LO functions like loread(), > lowrite(), lo_unlink(); functions that change session state like > set_config() and setseed(); functions that allow arbitrary query > exec

Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2025-06-05 Thread Vitaly Davydov
Dear Alexander, Amit Alexander Korotkov wrote: > Also, I've changed ReplicationSlotsComputeRequiredLSN() call to > CheckPointReplicationSlots() to update required LSN after > SaveSlotToPath() updated last_saved_restart_lsn. This helps to pass > checks in 001_stream_rep.pl without additional hacks

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread jian he
On Thu, Jun 5, 2025 at 10:39 PM Robert Haas wrote: > > On Thu, Jun 5, 2025 at 6:49 AM Peter Eisentraut wrote: > > I propose to address this by not allowing the use of user-defined > > functions in generation expressions for now. The attached patch > > implements this. This assumes that all buil

Re: Retiring some encodings?

2025-06-05 Thread Ken Marshall
On Thu, Jun 05, 2025 at 03:35:19PM +0200, Christoph Berg wrote: > Re: Michael Paquier > > On Mon, May 26, 2025 at 06:54:49PM +0200, Daniel Gustafsson wrote: > > > Agreed, it seems very unappealing to remove something so important to > > > such a > > > large userbase. > > > > Agreed that the so-sa

Re: Wrong security context for deferred triggers?

2025-06-05 Thread Tom Lane
Noah Misch writes: > commit 01463e1 wrote: >> +NOTICE: I am regress_groot > Let's not incur trivially-avoidable trademark risks > (https://google.com/search?q=%22i+am+groot%22) in the source tree. Good point, done. > Phrase "the role that executed the statement" doesn't match what happens if >

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Robert Haas
On Thu, Jun 5, 2025 at 6:49 AM Peter Eisentraut wrote: > I propose to address this by not allowing the use of user-defined > functions in generation expressions for now. The attached patch > implements this. This assumes that all built-in functions are > trustworthy, for this purpose, which seem

Re: Question Regarding Merge Append and Parallel Execution of Index Scans on Partitioned Table

2025-06-05 Thread David Rowley
On Fri, 6 Jun 2025 at 01:47, Ayush Vatsa wrote: > A small follow-up question - Gather merge won't gather and merge the > output from child in sorted order, but will always need an explicit Sort > node beneath it to do so. Correct? Incorrect. The input node to the Gather Merge needs to be sorted b

Re: Adding pg_dump flag for parallel export to pipes

2025-06-05 Thread Nitin Motiani
Hi, Apologies for the delay on this thread. On Mon, Apr 28, 2025 at 1:52 PM Nitin Motiani wrote: > > Thanks for the feedback, Thomas. > > > Do I understand correctly that > > the problem you encountered is in some other tests that you haven't > > attached yet? Could you post what you have so th

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Feike Steenbergen
On Thu, 5 Jun 2025 at 12:49, Peter Eisentraut wrote: > I propose to address this by not allowing the use of user-defined > functions in generation expressions for now. The attached patch > implements this. This assumes that all built-in functions are > trustworthy, for this purpose, which seems

Re: Question Regarding Merge Append and Parallel Execution of Index Scans on Partitioned Table

2025-06-05 Thread Ayush Vatsa
> Merge Append does not support parallelism. Thanks for the confirmation. > We have Gather Merge, which handles executing some sub-nodes and making sure the results get output in the correct order A small follow-up question - Gather merge won't gather and merge the output from child in sorted orde

Re: Retiring some encodings?

2025-06-05 Thread Christoph Berg
Re: Michael Paquier > On Mon, May 26, 2025 at 06:54:49PM +0200, Daniel Gustafsson wrote: > > Agreed, it seems very unappealing to remove something so important to such a > > large userbase. > > Agreed that the so-said "state" level requirement would be a > non-starter. Or maybe support for using

Re: Improve explicit cursor handling in pg_stat_statements

2025-06-05 Thread Sami Imseih
> + * If an direction_keyword (i.e., FETCH FORWARD) is used, set this field > + * to distinguish it from its numeric counterpart (i.e., FETCH 1). This > + * value is set only within gram.y. > > One nitpick comment here is that I would have mentioned that this > matters for query jumbling. Done

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2025-06-05 Thread jian he
hi. When using ALTER TABLE ... MERGE PARTITIONS, some of the new partition's properties will not be inherited from to be merged partitions; instead, they will be directly copied from the root partitioned table. so we need to test this behavior. The attached test file is for test table properties:

Re: [PATCH] Split varlena.c into varlena.c and bytea.c

2025-06-05 Thread Peter Eisentraut
On 31.03.25 17:29, Aleksander Alekseev wrote: The proposed patch extracts the code dealing with bytea from varlena.c into a separate file, as proposed previously [1]. It merely changes the location of the existing functions. There are no other changes. Rebased. I think this is reasonable. va

Re: Possibly hard-to-read message

2025-06-05 Thread Peter Eisentraut
On 07.04.25 02:55, Daniel Gustafsson wrote: On 7 Apr 2025, at 02:43, David G. Johnston wrote: How about: + "if set to a number, overrides the default two second \\watch interval\n" I do like the consistency of "if set" even though most of the others are booleans. Ah yes, number is be

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Pavel Stehule
čt 5. 6. 2025 v 12:49 odesílatel Peter Eisentraut napsal: > On 23.05.25 10:43, Feike Steenbergen wrote: > > Attached is a sample exploit, that achieves this, key components: > > > > - the GENERATED column uses a user defined immutable function > > - this immutable function cannot ALTER ROLE (need

Re: add function for creating/attaching hash table in DSM registry

2025-06-05 Thread Dagfinn Ilmari Mannsåker
Nathan Bossart writes: > +typedef struct NamedDSMHashState > +{ > + dsa_handle dsah; > + dshash_table_handle dshh; > + int dsa_tranche; > + chardsa_tranche_name[68]; /* name + "_dsa" */ > + int dsh_tranche; > + cha

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Peter Eisentraut
On 23.05.25 10:43, Feike Steenbergen wrote: Attached is a sample exploit, that achieves this, key components: - the GENERATED column uses a user defined immutable function - this immutable function cannot ALTER ROLE (needs volatile) - therefore this immutable function calls a volatile function -

Re: Fix slot synchronization with two_phase decoding enabled

2025-06-05 Thread Nisha Moond
On Wed, Jun 4, 2025 at 11:16 PM Masahiko Sawada wrote: > > On Sun, Jun 1, 2025 at 10:25 PM Amit Kapila wrote: > > > > The one more combination to consider is when someone takes a dump of > > an older version and loads it into a newer version. For example, where > > users dump from 17.5 and then r

Re: Fix slot synchronization with two_phase decoding enabled

2025-06-05 Thread Dilip Kumar
On Thu, Jun 5, 2025 at 3:59 PM Amit Kapila wrote: > > On Thu, Jun 5, 2025 at 2:53 PM Dilip Kumar wrote: > > > > On Tue, Jun 3, 2025 at 11:05 AM Nisha Moond > > wrote: > > > > > > > > > Attached v17 patches. Added a top-up patch 0002 implementing the idea > > > suggested by Amit above. > > > > I

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-06-05 Thread Thomas Munro
On Thu, Jun 5, 2025 at 8:48 PM Nazir Bilal Yavuz wrote: > > Hmm, for the purposes of [0], I think it might be better to keep the > > image at VS 2019 for now. Unless there are specific reasons why VS 2022 > > would be of use now? > > Thomas was thinking of trying some new APIs which are available

Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable

2025-06-05 Thread Etsuro Fujita
On Thu, Jun 5, 2025 at 3:39 AM Robert Haas wrote: > On Tue, Jun 3, 2025 at 6:45 AM Etsuro Fujita wrote: > > No, this is a fix, not a feature, as discussed in the thread; as > > mentioned in the commit message, the previous version of postgres_fdw > > could cause surprising behaviors that would ne

Re: Enable data checksums by default

2025-06-05 Thread Christoph Berg
Re: Heikki Linnakangas > 1. Have pg_upgrade run initdb for you. It's always felt silly that you need > to run initdb with the new version yourself, when there's really only one > correct way to do it. Fwiw, Debian's pg_upgradecluster script would be happy if that problem would be solved. Currently

Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION

2025-06-05 Thread Yugo Nagata
On Thu, 5 Jun 2025 16:26:08 +0900 Yugo Nagata wrote: > On Tue, 3 Jun 2025 17:39:50 +0900 > Yugo Nagata wrote: > > > On Tue, 27 May 2025 09:00:01 +0300 > > Alexander Lakhin wrote: > > > I know there are other scenarios where the same is raises and I agree that > > it would be better to conside

Re: Fix slot synchronization with two_phase decoding enabled

2025-06-05 Thread Amit Kapila
On Thu, Jun 5, 2025 at 2:53 PM Dilip Kumar wrote: > > On Tue, Jun 3, 2025 at 11:05 AM Nisha Moond wrote: > > > > > > Attached v17 patches. Added a top-up patch 0002 implementing the idea > > suggested by Amit above. > > I have started reviewing this, although I haven't done a complete > review ye

Re: Fix slot synchronization with two_phase decoding enabled

2025-06-05 Thread Dilip Kumar
On Thu, Jun 5, 2025 at 2:53 PM Dilip Kumar wrote: > > On Tue, Jun 3, 2025 at 11:05 AM Nisha Moond wrote: > > > > > > Attached v17 patches. Added a top-up patch 0002 implementing the idea > > suggested by Amit above. > > I have started reviewing this, although I haven't done a complete > review ye

Re: Fix slot synchronization with two_phase decoding enabled

2025-06-05 Thread Dilip Kumar
On Tue, Jun 3, 2025 at 11:05 AM Nisha Moond wrote: > > > Attached v17 patches. Added a top-up patch 0002 implementing the idea > suggested by Amit above. I have started reviewing this, although I haven't done a complete review yet, but I have a question on the fix we are trying to do, IIUC we are

Re: synchronized_standby_slots used in logical replication

2025-06-05 Thread Fabrice Chapuis
Thank you very much for the detailed response. I will proceed with the native implementation for synchronizing logical replication slots. In a maintenance context, when standby is shutdown, it's possible to temporarily disable the synchronized_standby_slots parameter to avoid blocking logical repl

Re: [PATCH] Proposal: Improvements to PDF stylesheet and table column widths

2025-06-05 Thread Peter Eisentraut
On 30.05.25 01:06, Noboru Saito wrote: I suggest setting both body.start.indent and body.end.indent to 0 in stylesheet-fo.xsl as follows: 0 0 This change maximizes the usable width of each page in the generated PDF documentation. As a result, the total number of pages is reduced from 3095 to 29

Re: Potential issue in listExtensions()

2025-06-05 Thread Suraj Kharage
Thanks, Magnus and Dilip. -- Thanks & Regards, Suraj kharage, enterprisedb.com On Thu, Jun 5, 2025 at 1:34 PM Magnus Hagander wrote: > > > On Thu, Jun 5, 2025 at 9:50 AM Dilip Kumar wrote: > >> On Thu, Jun 5, 2025 at 5:53 AM Suraj Kharage >> wrote: >> > >>

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-06-05 Thread Nazir Bilal Yavuz
Hi, On Thu, 5 Jun 2025 at 11:27, Peter Eisentraut wrote: > > On 05.06.25 10:04, Nazir Bilal Yavuz wrote: > > Thomas Munro off-list mentioned that the Windows CI image is actually > > running on Server 2022, even though the task name still refers to > > Server 2019. He also suggested upgrading the

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-06-05 Thread Peter Eisentraut
On 05.06.25 10:04, Nazir Bilal Yavuz wrote: Thomas Munro off-list mentioned that the Windows CI image is actually running on Server 2022, even though the task name still refers to Server 2019. He also suggested upgrading the compiler from Visual Studio 2019 to Visual Studio 2022. Some of the ta

Re: [19] Proposal: function markers to indicate collation/ctype sensitivity

2025-06-05 Thread Peter Eisentraut
On 04.06.25 17:53, Jeff Davis wrote: On Wed, 2025-06-04 at 11:33 -0400, David E. Wheeler wrote: I understand the need to trace these dependencies, but as a function developer with relatively modest understanding of collation nuances, I’m wondering how I’d know I needed these markers. It seems co

Re: [19] Proposal: function markers to indicate collation/ctype sensitivity

2025-06-05 Thread Peter Eisentraut
On 04.06.25 05:22, Jeff Davis wrote: This proposal would add that dependency information, and importantly, would be careful about which dependency entries are required for particular expressions and which are not. Introduce three new options when creating or altering a function, operator or in

Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM

2025-06-05 Thread Yugo Nagata
On Thu, 5 Jun 2025 10:08:35 +0900 Yugo Nagata wrote: > Hi, > > Currently, tab completion for COPY only suggests filenames after TO or > FROM, even though STDIN, STDOUT, and PROGRAM are also valid syntax options. > > I'd like to propose improving the tab completion behavior as described in > the

Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-06-05 Thread Nazir Bilal Yavuz
Hi, Thomas Munro off-list mentioned that the Windows CI image is actually running on Server 2022, even though the task name still refers to Server 2019. He also suggested upgrading the compiler from Visual Studio 2019 to Visual Studio 2022. A PR [1] to upgrade the compiler to VS 2022 is ready in

Re: Potential issue in listExtensions()

2025-06-05 Thread Magnus Hagander
On Thu, Jun 5, 2025 at 9:50 AM Dilip Kumar wrote: > On Thu, Jun 5, 2025 at 5:53 AM Suraj Kharage > wrote: > > > > Hi, > > > > Upstream commit d696406a9b255546bc1716d07199103abd8bb785 [1] added the > support for default extension version in \dx output and changed the query > that fetches the exte

Re: Missing program_XXX calling in pgbench tests

2025-06-05 Thread Peter Eisentraut
On 05.06.25 05:00, Hayato Kuroda (Fujitsu) wrote: Dear Fujii-san, A bit similar discussion came up before regarding pgbench and program_xxx_ok in [1], but it seems that change was never applied. I didn't know that, thanks for sharing. ISTM, it tried to extend function to test the shorter opt

Re: Potential issue in listExtensions()

2025-06-05 Thread Dilip Kumar
On Thu, Jun 5, 2025 at 5:53 AM Suraj Kharage wrote: > > Hi, > > Upstream commit d696406a9b255546bc1716d07199103abd8bb785 [1] added the > support for default extension version in \dx output and changed the query > that fetches the extension list. > The changed query seems problematic and might di

  1   2   >