Re: Memory context can be its own parent and child in replication command

2025-04-20 Thread Tom Lane
Anthonin Bonnefoy writes: > I've updated the patch with another approach: I got back to looking at this today. I still don't like very much about it. After thinking for awhile, I concur that we want to create the cmd_context under TopMemoryContext, but I think we can make things a great deal si

Re: Typos in the code and README

2025-04-20 Thread David Rowley
On Sun, 20 Apr 2025 at 13:32, David Rowley wrote: > Here are a few more fixes of a similar ilk. All new in 2025, > predominantly from the last few days before feature freeze. I've pushed those ones. David

Re: Memory context can be its own parent and child in replication command

2025-04-20 Thread Tom Lane
I wrote: > ... An obvious candidate is subscription/t/100_bugs.pl, but > the test failed there for lack of access to the test_decoding plugin. > Perhaps we could use another plugin, but I didn't try hard. Ah, I realized we could just use pgoutput, since the test doesn't actually do anything that w

Re: Typos in the code and README

2025-04-20 Thread David Rowley
On Mon, 21 Apr 2025 at 11:21, Michael Paquier wrote: > Thanks for sharing the command able to spot all these. I just pushed a few more. The previous regex didn't account for the duplicate word being on the next line. I dug up the following to find the ones just committed in 78eda9e26. ag "\s([a-

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-20 Thread Steve Chavez
Hello hackers, I've now modified my patch to allow regular users (not just database owners) to create event triggers. As mentioned by Tom before, this now relies on role membership to allowlist the target roles of the event trigger. A summary of the changes: - EventTriggerCacheItem now has an o

[PATCH] Documentation: Fix minor grammatical and formatting issues

2025-04-20 Thread Noboru Saito
Hi PostgreSQL Hackers, I'm a member of the PostgreSQL Japanese documentation translation team. While working on translations, I've identified several minor grammatical and formatting issues in the English documentation. Please review them. 1. Remove unnecessary blank lines (blankline.diff) 2. Fix

RE: Fix slot synchronization with two_phase decoding enabled

2025-04-20 Thread Zhijie Hou (Fujitsu)
On Sat, Apr 19, 2025 at 2:19 AM Masahiko Sawada wrote: > > On Tue, Apr 8, 2025 at 10:14 PM Zhijie Hou (Fujitsu) > wrote: > > > > > > -- > > Approach 2 > > -- > > > > Instead of disallowing the use of two-phase and failover together, a more > > flexible strategy could be only restr

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-20 Thread David G. Johnston
On Sunday, April 20, 2025, Steve Chavez wrote: > > - A new file event_trigger_nosuper.sql is added for the new tests > Expected output for the new script was not included in the commit. Also, this looks unconventional… EventTriggerCacheItem *item = (EventTriggerCacheItem*) lfirst_oid(lc); Da

Re: pipelining in psql, commit 41625ab

2025-04-20 Thread Michael Paquier
On Wed, Apr 16, 2025 at 04:13:10PM -0700, Noah Misch wrote: > Works for me. I have fixed the three defects you have reported with 5ee7bd944ee8, 5743d122fcf3 and 78231baaf967 for respectively the error code of \getresults, the description of \flush[request] and the output of --help=commands with th

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-20 Thread Steve Chavez
Sorry, attached the output file. From 2165513e858a5a6c7a620b1499b2f634c4f2ab44 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Sun, 20 Apr 2025 19:46:00 -0500 Subject: [PATCH] Allow regular users to create event triggers --- src/backend/commands/event_trigger.c | 33 +++-- src/bac

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-20 Thread Steve Chavez
> Also, this looks unconventional… > EventTriggerCacheItem *item = (EventTriggerCacheItem*) lfirst_oid(lc); Just noticed the mistake there, I would have expected a compilation error. New patch attached with the following change: EventTriggerCacheItem *item = lfirst(lc); On Sun, 20 Apr 2025 at

Re: [PATCH] Documentation: Fix minor grammatical and formatting issues

2025-04-20 Thread David Rowley
On Mon, 21 Apr 2025 at 15:06, Noboru Saito wrote: > 1. Remove unnecessary blank lines (blankline.diff) Looks good. > 2. Fix repeated "to to" in several command reference files (toto.diff) -Specifies the name of the database to connect to to discover which +Specifies the name of

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-20 Thread David G. Johnston
On Sunday, April 20, 2025, Steve Chavez wrote: > > Also, this looks unconventional… > > EventTriggerCacheItem *item = (EventTriggerCacheItem*) lfirst_oid(lc); > > Just noticed the mistake there, I would have expected a compilation error. > New patch attached with the following change: > > Event

Re: Add Pipelining support in psql

2025-04-20 Thread Michael Paquier
On Wed, Apr 16, 2025 at 09:18:01AM -0700, Michael Paquier wrote: > On Wed, Apr 16, 2025 at 09:31:59PM +0700, a.kozhemyakin wrote: >> After commit 2cce0fe on master >> >> ERROR:  unexpected message type 0x50 during COPY from stdin >> CONTEXT:  COPY psql_pipeline, line 1 >> Pipeline aborted, command

Re: Align memory context level numbering in pg_log_backend_memory_contexts()

2025-04-20 Thread Fujii Masao
On 2025/04/18 18:45, Fujii Masao wrote: On 2025/04/18 18:23, David Rowley wrote: On Fri, 18 Apr 2025 at 20:54, Fujii Masao wrote: Shouldn't the example output of pg_log_backend_memory_contexts() in the documentation also be updated to use 1-based numbering for consistency? Patch attached.

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-04-20 Thread Frédéric Yhuel
On 4/20/25 00:42, Sami Imseih wrote: (In my testing, the "temporary file:" message comes out without any attached STATEMENT most of the time already, so this isn't losing much as far as that's concerned.) Indeed, this happens when using autocommit / implicit transactions. But if you disabl

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

2025-04-20 Thread Noah Misch
On Mon, Apr 14, 2025 at 09:19:35AM +0900, Michael Paquier wrote: > On Sun, Apr 13, 2025 at 11:51:57AM -0400, Tom Lane wrote: > > Noah Misch writes: > > > Tom and Michael, do you still object to the test addition, or not? If > > > there > > > are no new or renewed objections by 2025-04-20, I'll p

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

2025-04-20 Thread Noah Misch
On Sun, Apr 20, 2025 at 02:53:39PM -0700, Noah Misch wrote: > On Mon, Apr 14, 2025 at 09:19:35AM +0900, Michael Paquier wrote: > > On Sun, Apr 13, 2025 at 11:51:57AM -0400, Tom Lane wrote: > > > Noah Misch writes: > > > > Tom and Michael, do you still object to the test addition, or not? If > >

Re: Typos in the code and README

2025-04-20 Thread Michael Paquier
On Mon, Apr 21, 2025 at 10:42:19AM +1200, David Rowley wrote: > On Sun, 20 Apr 2025 at 13:32, David Rowley wrote: >> Here are a few more fixes of a similar ilk. All new in 2025, >> predominantly from the last few days before feature freeze. > > I've pushed those ones. Thanks for sharing the comm

Re: Recent pg_rewind test failures in buildfarm

2025-04-20 Thread Michael Paquier
On Tue, Apr 15, 2025 at 05:50:32AM +, Bertrand Drouvot wrote: > Sorry, can't look at the details right now but it might be linked to > 039549d70f6 which is recent enough and in this area. Will give it a look once > I've time. Playing catch-up with various things this week, and I have been loo

Re: type cache cleanup improvements

2025-04-20 Thread Alexander Korotkov
Hi, Noah! On Sat, Apr 12, 2025 at 12:43 AM Alexander Korotkov wrote: > > On Fri, Apr 11, 2025 at 11:32 PM Noah Misch wrote: > > > > On Tue, Oct 22, 2024 at 08:33:24PM +0300, Alexander Korotkov wrote: > > > On Tue, Oct 22, 2024 at 6:10 PM Pavel Borisov > > > wrote: > > > > On Tue, 22 Oct 2024 a

bug: virtual generated column can be partition key

2025-04-20 Thread jian he
hi. While trying to make the virtual generated column be part of the partition key, I found this bug. it also influences the stored generated column, i added a test on generated_stored.sql. CREATE TABLE gtest_part_key ( f1 date NOT NULL, f2 bigint, f3 bigint GENERATED ALWAYS AS (f2 * 2) VI

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-20 Thread Ivan Kush
Hello! I'm testing OAuth Device Flow implementation on Google. Met several problems. Postgres from master branch, commit 764d501d24b Google Device Flow API https://developers.google.com/identity/protocols/oauth2/limited-input-device 1) In Device Authorization Request Google returns 428 code o

Re: Unicode full case mapping: PG_UNICODE_FAST, and standard-compliant UCS_BASIC

2025-04-20 Thread Noah Misch
On Sat, Apr 19, 2025 at 12:30:57PM -0700, Jeff Davis wrote: > On Thu, 2025-04-17 at 06:58 -0700, Noah Misch wrote: > > Should initcap_wbnext() pass in a locale-dependent "bool posix" > > argument like > > the others calls the commit changed? > > Yes, I believe you are correct. Patch and tests atta

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-04-20 Thread Guillaume Lelarge
Hi, On 20/04/2025 00:42, Sami Imseih wrote: [...] I'm frankly inclined to do nothing, but if we must do something, the way to fix it here would be to transiently set debug_query_string to NULL so that the actions of PortalDrop aren't blamed on any particular query. I think this is better, bec

Re: AIO v2.5

2025-04-20 Thread Alexander Lakhin
Hello Andres, 31.03.2025 02:46, Andres Freund wrote: I've pushed most of these after some very light further editing. Yay. Thanks a lot for all the reviews! So far the buildfarm hasn't been complaining, but it's early days. I found one complaint against commit 12ce89fd0, expressed as: https