Re: oat_post_create expected behavior - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: oat_post_create expected behavior
Date
Msg-id 199291fc276c0540a02d20167fe618b5cb6d710b.camel@j-davis.com
Whole thread Raw
In response to Re: oat_post_create expected behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: oat_post_create expected behavior
List pgsql-hackers
On Mon, 2022-06-06 at 17:11 -0400, Tom Lane wrote:
> Right, same thing I'm saying.  I also think we should discourage
> people from doing cowboy CCIs inside their OAT hooks, because that
> makes the testability problem even worse.  Maybe that means we
> need to uniformly move the CREATE hooks to after a system-provided
> CCI, but I've not thought hard about the implications of that.

Uniformly moving the post-create hooks after CCI might not be as
convenient as I thought at first. Many extensions using post-create
hooks will also want to use post-alter hooks, and it would be difficult
to reuse extension code between those two hooks. It's probably better
to just always specify the snapshot unless you're sure you won't need a
post-alter hook.

It would be nice if it was easier to enforce that these hooks do the
right thing, though.

Regards,
    Jeff Davis





pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: First draft of the PG 15 release notes
Next
From: Robert Haas
Date:
Subject: Re: replacing role-level NOINHERIT with a grant-level option