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

2025-05-11 Thread Amit Kapila
On Sun, May 11, 2025 at 8:49 PM Xuneng Zhou wrote: > > Hi, I was able to reproduce the failure by adding a 1-second sleep in the > LogicalRepApplyLoop function > However, I noticed that the tests under src/test/subscription run > significantly slower— is this normal? > Yes, because you made app

Re: Small fixes needed by high-availability tools

2025-05-11 Thread Amit Kapila
On Fri, May 2, 2025 at 6:30 PM Andrey Borodin wrote: > > 3. Allow reading LSN written by walreciever, but not flushed yet > > Problem: if we have synchronous_standby_names = ANY(node1,node2), node2 might > be ahead of node1 by flush LSN, but before by written LSN. If we do a > failover we choose

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

2025-05-11 Thread Tomas Vondra
On 5/11/25 18:07, Peter Geoghegan wrote: > On Sat, May 10, 2025 at 10:59 AM Tomas Vondra wrote: >> But doesn't it also highlight how fragile this memory allocation is? The >> skip scan patch didn't do anything wrong - it just added a couple >> fields, using a little bit more memory. I think we

Re: Why our Valgrind reports suck

2025-05-11 Thread Tom Lane
I wrote: > Okay, here is a patch series that updates the > 0001-Make-memory-contexts-themselves-more-visible-to-valg.patch > patch you posted in that thread, I forgot to mention that I did try to implement the "two-level pool" scheme that the Valgrind documentation talks about, and could not make

Re: Why our Valgrind reports suck

2025-05-11 Thread Tom Lane
I wrote: > And, since there's nothing new under the sun around here, > we already had a discussion about that back in 2021: > https://www.postgresql.org/message-id/flat/3471359.1615937770%40sss.pgh.pa.us > That thread seems to have led to fixing some specific bugs, > but we never committed any of t

Re: FileFallocate misbehaving on XFS

2025-05-11 Thread Pierre Barre
Hello, I was running into the same thing, and the fix for me was mounting xfs with -o inodes64 Best, Pierre On Mon, Dec 9, 2024, at 08:34, Michael Harris wrote: > Hello PG Hackers > > Our application has recently migrated to PG16, and we have experienced > some failed upgrades. The upgrades are

Re: Improve hash join's handling of tuples with null join keys

2025-05-11 Thread Thomas Munro
On Tue, May 6, 2025 at 12:12 PM Tomas Vondra wrote: > On 5/6/25 01:11, Tom Lane wrote: > > The attached patch is a response to the discussion at [1], where > > it emerged that lots of rows with null join keys can send a hash > > join into too-many-batches hell, if they are on the outer side > > of

Proposal: Exploring LSM Tree‑Based Storage Engine for PostgreSQL (Inspired by MyRocks)

2025-05-11 Thread Manish Rai Jain
Hi hackers, I’ve been exploring the idea of integrating an LSM tree–based storage engine into PostgreSQL — similar in spirit to MyRocks for MySQL — by replacing the underlying storage while preserving PostgreSQL’s upper layers (planner, executor, MVCC, etc.). The motivation stems from the well‑kn

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

2025-05-11 Thread Stepan Neretin
On Sun, May 11, 2025 at 7:07 PM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > > On Sat, May 10, 2025 at 8:45 PM ikedarintarof < > ikedarinta...@oss.nttdata.com> wrote: > >> > >> Hi hackers, > >> > >> I would like to suggest adding a new option to pgbench, which enables > >> the cl

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

2025-05-11 Thread Peter Geoghegan
On Sat, May 10, 2025 at 10:59 AM Tomas Vondra wrote: > But doesn't it also highlight how fragile this memory allocation is? The > skip scan patch didn't do anything wrong - it just added a couple > fields, using a little bit more memory. I think we understand allocating > more memory may need more

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

2025-05-11 Thread Xuneng Zhou
Hi, I was able to reproduce the failure by adding a 1-second sleep in the LogicalRepApplyLoop function However, I noticed that the tests under src/test/subscription run significantly slower— is this normal? Also, it looks like the patch mentioned in this thread addresses the issue: https://www.pos

Re: Valgrind - showing memory leaks

2025-05-11 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > On 2025-May-08, Tom Lane wrote: >> So it seems like valgrind is wrong here, or else we're leaking the >> whole rd_att structure later on somehow. > Well, the problem is that if num_check is zero, FreeTupleDesc() doesn't > free ->check. Ah-hah. > Done th

Re: add tab-complete for ALTER DOMAIN ADD...

2025-05-11 Thread Dagfinn Ilmari Mannsåker
On Sun, 11 May 2025, at 15:48, Álvaro Herrera wrote: > So we should also have tab-completion for ALTER TABLE ADD NOT NULL, as > in the attached. Any opinions? LGTM -- - ilmari

Re: add tab-complete for ALTER DOMAIN ADD...

2025-05-11 Thread Álvaro Herrera
So we should also have tab-completion for ALTER TABLE ADD NOT NULL, as in the attached. Any opinions? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Estoy de acuerdo contigo en que la verdad absoluta no existe... El problema es que la mentira sí existe y tu est

Re: add tab-complete for ALTER DOMAIN ADD...

2025-05-11 Thread Álvaro Herrera
On 2025-Apr-29, Dagfinn Ilmari Mannsåker wrote: > jian he writes: > > + /* ALTER DOMAIN ADD */ > > + else if (Matches("ALTER", "DOMAIN", MatchAny, "ADD")) > > + COMPLETE_WITH("CONSTRAINT", "NOT NULL", "CHECK"); > > I think the completion for CHECK should include the opening paren

Re: Trivial comment fix for tsquerysend()

2025-05-11 Thread Álvaro Herrera
Hello, On 2025-Mar-06, Emre Hasegeli wrote: > Patch is attached. Looks correct to me. It's harmless obviously (and nobody appears to have been damanged by it) but I still backpatched to all live branches. Thanks, Emre. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseD

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

2025-05-11 Thread Marcos Pegoraro
Em sáb., 10 de mai. de 2025 às 21:57, David G. Johnston < david.g.johns...@gmail.com> escreveu: > Constraints can be targeted by “comment on”. > So, why not using that COMMENT ON message to raise when that constraint gets violated ? A GUC like Constraint_Exception_Returns_MessageOn = {Never | Alw

Re: Valgrind - showing memory leaks

2025-05-11 Thread Álvaro Herrera
On 2025-May-08, Tom Lane wrote: > Uh ... yeah it is, down at the bottom of the function: > > /* Install array only after it's fully valid */ > relation->rd_att->constr->check = check; > relation->rd_att->constr->num_check = found; > > So it seems like valgrind is wrong here, or

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

2025-05-11 Thread Matthias van de Meent
> 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

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

2025-05-11 Thread Miguel Ferreira
De: David G. Johnston Enviada: 11 de maio de 2025 01:58 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 t

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

2025-05-11 Thread Miguel Ferreira
Tom Lane writes: > Why don't you just choose better names for your constraints? A word versus a sentence. It's a big difference that greatly improves the user experience. > I'd argue that the proposed change might actually be a net loss for usability, if it entirely obscures the fact that what h