Re: Restrict publishing of partitioned table with a foreign table as partition

2025-05-10 Thread Álvaro Herrera
Hello, I think reimplementing list_member_oid() under a different name (is_ancestor_member_relids) is pointless and should not be done. It also appears to me that we haven't nailed the error messages just yet. I tried to fix it upthread, but didn't really get it correct. For instance, consider

Re: Request for Implementation of Custom Error Messages for CHECK Constraints

2025-05-10 Thread David G. Johnston
On Saturday, May 10, 2025, Miguel Ferreira wrote: > ALTER TABLE table_name > > ADD CONSTRAINT constraint_name > > CHECK (condition) > > MESSAGE 'Custom error message when the condition is not met.'; > > I’m seeing some value here but, odds are, there is not enough obvious benefit or design to con

Re: Request for Implementation of Custom Error Messages for CHECK Constraints

2025-05-10 Thread Tom Lane
"Miguel Ferreira" writes: > I propose extending the syntax of the ALTER TABLE ADD CONSTRAINT > statement (and potentially CREATE TABLE) to allow for the > specification of a custom error message for each CHECK constraint. Why don't you just choose better names for your constraints? I'd argue tha

Request for Implementation of Custom Error Messages for CHECK Constraints

2025-05-10 Thread Miguel Ferreira
PostgreSQL Project Leaders, Currently, when a CHECK constraint is violated, PostgreSQL returns a generic error message that includes the constraint name. While informative for developers familiar with the database schema, this message can be less clear for other team members, end-users, or i

Re: Statistics Import and Export

2025-05-10 Thread Greg Sabino Mullane
On Tue, Apr 1, 2025 at 10:24 PM Robert Haas wrote: > On Tue, Apr 1, 2025 at 4:24 PM Jeff Davis wrote: > > On Tue, 2025-04-01 at 09:37 -0400, Robert Haas wrote: > > > I don't think I was aware of the open item; I was just catching up on > > > email. > > > > I lean towards making it opt-in for pg_

Re: Accessing an invalid pointer in BufferManagerRelation structure

2025-05-10 Thread Stepan Neretin
On Mon, Apr 14, 2025 at 1:10 PM Daniil Davydov <3daniss...@gmail.com> wrote: > Hi, > > On Wed, Mar 26, 2025 at 2:14 PM Stepan Neretin wrote: > > > > The first thing we both noticed is that the macro calls a function that > won't be available without an additional header. This seems a bit > inconv

Re: Inval reliability, especially for inplace updates

2025-05-10 Thread Noah Misch
On Sun, Nov 03, 2024 at 10:29:25AM -0800, Noah Misch wrote: > On Fri, Nov 01, 2024 at 04:38:29PM -0700, Noah Misch wrote: > > This was a near miss to having a worst-in-years regression in a minor > > release, > > so I'm proposing this sequence: > > > > - Revert from non-master branches commits 8e

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-05-10 Thread Stepan Neretin
On Sat, May 10, 2025 at 8:45 PM ikedarintarof wrote: > Hi hackers, > > I would like to suggest adding a new option to pgbench, which enables > the client to continue processing transactions even if some errors occur > during a transaction. > Currently, a client stops sending requests when its tra

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

2025-05-10 Thread Tomas Vondra
On 5/10/25 13:14, Matthias van de Meent wrote: > ... > > I've attached a patch that makes IndexAmRoutine a static const*, > removing it from rd_indexcxt, and returning some of the index ctx > memory usage to normal: > > count (patch 1) | total_bytes | combined_size > -+--

Suggestion to add --continue-client-on-abort option to pgbench

2025-05-10 Thread ikedarintarof
Hi hackers, I would like to suggest adding a new option to pgbench, which enables the client to continue processing transactions even if some errors occur during a transaction. Currently, a client stops sending requests when its transaction is aborted due to reasons other than serialization fa

Re: Add an option to skip loading missing publication to avoid logical replication failure

2025-05-10 Thread Amit Kapila
On Tue, May 6, 2025 at 5:17 PM Amit Kapila wrote: > > On Tue, May 6, 2025 at 3:33 PM Xuneng Zhou wrote: > > > > A clear benefit of addressing this in code is to ensure that the user sees > > the log message, which can be valuable for trouble-shooting—even under race > > conditions. > > > > I do

Re: Fix slot synchronization with two_phase decoding enabled

2025-05-10 Thread Amit Kapila
On Tue, May 6, 2025 at 4:52 PM Zhijie Hou (Fujitsu) wrote: > > On Mon, May 5, 2025 at 6:59 PM Amit Kapila wrote: > > > > > > Yes, this is possible. Here is my theory as to how it can happen in the > > current > > case. In the failed test, after the primary has prepared a transaction, the > > tran

Re: Proposal for enabling auto-vectorization for checksum calculations

2025-05-10 Thread Stepan Neretin
On Thu, May 8, 2025 at 6:57 AM Matthew Sterrett wrote: > Hello! I'm still trying to figure out those CI failures, I just wanted > to update things. > > From my testing, with this patch repeatedly disabling/enabling > checksums is about 12.4% on an approximately 15 GB database. > > By the way, I'd

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

2025-05-10 Thread Matthias van de Meent
On Sat, 10 May 2025 at 00:54, Tomas Vondra wrote: > > On 5/9/25 23:30, Matthias van de Meent wrote: > > ... > >> The difference shown by your flame graph is absolutely enormous -- > >> that's *very* surprising to me. btbeginscan and btrescan go from being > >> microscopic to being very prominent.

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-05-10 Thread Amit Kapila
On Sat, May 10, 2025 at 1:05 PM Masahiko Sawada wrote: > > On Sat, May 10, 2025 at 12:00 AM Amit Kapila wrote: > > > > > > Right, but to an extent, this is also similar to having a requirement > > of a logical slot on the primary. Now, it seems to me that the point > > you are trying to make is t

Re: Proposal for enabling auto-vectorization for checksum calculations

2025-05-10 Thread Stepan Neretin
On Sat, May 10, 2025 at 6:01 PM Stepan Neretin wrote: > > > On Thu, May 8, 2025 at 6:57 AM Matthew Sterrett < > matthewsterre...@gmail.com> wrote: > >> Hello! I'm still trying to figure out those CI failures, I just wanted >> to update things. >> >> From my testing, with this patch repeatedly dis

is there any query that can cover these statements in join_is_legal()?

2025-05-10 Thread g l
Hi: In join_is_legal(), i wonder wether the 2 "return false" statements can be covered by any query. /* * If one input contains min_lefthand and the other contains * min_righthand, then we can perform the SJ at this join. * * Reject

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-05-10 Thread Masahiko Sawada
On Sat, May 10, 2025 at 12:00 AM Amit Kapila wrote: > > On Thu, May 8, 2025 at 1:06 AM Masahiko Sawada wrote: > > > > On Tue, May 6, 2025 at 11:59 PM Amit Kapila wrote: > > > > > > On Thu, Apr 24, 2025 at 11:14 PM Masahiko Sawada > > > wrote: > > > > > > > > On Thu, Apr 24, 2025 at 5:30 AM Ami

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-05-10 Thread Amit Kapila
On Thu, May 8, 2025 at 1:06 AM Masahiko Sawada wrote: > > On Tue, May 6, 2025 at 11:59 PM Amit Kapila wrote: > > > > On Thu, Apr 24, 2025 at 11:14 PM Masahiko Sawada > > wrote: > > > > > > On Thu, Apr 24, 2025 at 5:30 AM Amit Kapila > > > wrote: > > > > > > > > On Wed, Apr 23, 2025 at 9:35 PM