Re: Extensible Rmgr for Table AMs
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Andres Freund <andres@anarazel.de>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Robert Haas
<robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org"
<pgsql-hackers@postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>, Tom
Lane <tgl@sss.pgh.pa.us>, Simon Riggs <simon@2ndquadrant.com>
Date: 2022-04-05T00:10:51Z
Lists: 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
Commits
-
Fix off-by-one error in pg_waldump, introduced in 5c279a6d350.
- dad97e0502b4 15.0 landed
-
Fix another buildfarm issue from commit 5c279a6d350.
- 957aa4d87a41 15.0 landed
-
Fix warning introduced in 5c279a6d350.
- 9553b4115f18 15.0 landed
-
Custom WAL Resource Managers.
- 5c279a6d3502 15.0 landed
-
Make logical decoding a part of the rmgr.
- 7a5f6b47488d 15.0 landed