Re: Extensible Rmgr for Table AMs - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Extensible Rmgr for Table AMs
Date
Msg-id adb007e9e69b150ad6f04eaa11dabd6673c7710b.camel@j-davis.com
Whole thread Raw
In response to Re: Extensible Rmgr for Table AMs  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Sun, 2022-04-03 at 21:33 -0700, Andres Freund wrote:
> I still think the easiest and fastest would be to just make RmgrTable
> longer,
> and not const. When registering, copy the caller provided struct into
> the
> respective RmgrData element.  Yes, we'd waste a bit of space at the
> end of the
> array, but it's typically not going to be touched and thus not be
> backed by
> "actual" memory.

Sounds good to me. I tried to break down the performance between these
approaches and didn't get a clear signal, so I'll go with your
intuition here.

Posting new patch in response to Bharath's review, which will include
this change.

Note that GetRmgr() also has an unlikely branch where it tests for the
validity of the rmgr before using it, so that it can throw a nice error
message if someone forgot to include the module in
shared_preload_libraries. I expect this will be highly predictable and
therefore not a problem.

Regards,
    Jeff Davis





pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Window Function "Run Conditions"
Next
From: Tom Lane
Date:
Subject: Re: Granting SET and ALTER SYSTE privileges for GUCs