Re: global / super barriers (for checksums)

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Magnus Hagander <magnus(at)hagander(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: global / super barriers (for checksums)
Date: 2019-12-11 17:38:51
Message-ID: 20191211173851.t2pbxxdgltnhftok@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)yesql(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2019-12-11 17:46:02 RE: [Proposal] Level4 Warnings show many shadow vars
Previous Message Andres Freund 2019-12-11 17:21:01 Re: logical decoding bug: segfault in ReorderBufferToastReplace()