Re: global / super barriers (for checksums) - Mailing list pgsql-hackers

From Andres Freund
Subject Re: global / super barriers (for checksums)
Date
Msg-id 20191211173851.t2pbxxdgltnhftok@alap3.anarazel.de
Whole thread Raw
In response to Re: global / super barriers (for checksums)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: global / super barriers (for checksums)
List pgsql-hackers
Hi,

On 2019-12-11 09:12:49 -0500, Robert Haas wrote:
> On Mon, Dec 9, 2019 at 7:37 PM Daniel Gustafsson <daniel@yesql.se> wrote:
> > I sort of like the callback idea conceptually, but Andres is making a good
> > point about the extensibility actually making it harder to reason about.
> 
> That objection doesn't hold any water for me, because this is open
> source. People can always patch the core.

I just don't buy this argument. There's a difference in between an
unpatched version of postgres suddenly potentially running hooks
everywhere CFI() etc is called, and some user patching postgres to
behave differently. In the former case we'll have to ask to reproduce
problems without extension in a lot more cases.  For me code like this
that runs in pretty low level situations that we've gotten wrong more
than once, doesn't benefit by being extensible. We just make things more
fragile, and provide traps for extension authors.


> If we don't add hooks, then we make life easier for fork maintainers
> (including my employer) and harder for extension authors. I think
> that's *definitely* the wrong bet for the community to be making; we
> should be trying very hard to help extension authors and minimize the
> need for forks. If you install an extension that uses a hook, any
> hook, and it breaks things, then you get to keep both pieces.

But that's just not how it ends up working in a lot of cases? People
still report bugs to the list, and the debugging experience of problems
where an extension causes crashes-at-a-distance is pretty bad.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: error context for vacuum to include block number
Next
From: Ranier Vilela
Date:
Subject: RE: [Proposal] Level4 Warnings show many shadow vars