Re: Extensible Rmgr for Table AMs
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-hackers@postgresql.org
Cc: Andres Freund <andres@anarazel.de>, Amit Kapila
<amit.kapila16@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Simon Riggs
<simon@2ndQuadrant.com>
Date: 2022-01-17T08:42:06Z
Lists: pgsql-hackers
Attachments
- 0001-Make-logical-decoding-a-part-of-the-rmgr.patch (text/x-patch) patch 0001
- 0002-Add-macro-GetRmgr-in-preparation-for-extensible-rmgr.patch (text/x-patch) patch 0002
- 0003-Custom-Rmgr.patch (text/x-patch) patch 0003
On Mon, 2021-11-08 at 15:36 -0800, Jeff Davis wrote: > The attached patch (against v14, so it's easier to test columnar) is > somewhat like a simplified version of [3] combined with refactoring > to > make decoding a part of the rmgr. New patches attached (v3). Essentially the content as v2, but split into 3 patches and rebased. Review on patch 0001 would be helpful. It makes decoding just another method of rmgr, which makes a lot of sense to me from a code organization standpoint regardless of the other patches. Is there any reason not to do that? The other patches then make rmgr extensible, which in turn makes decoding extensible and solves the logical replication problem for custom table AMs. The most obvious way to make rmgr extensible would be to expand the rmgr table, but I was concerned about making that dynamic (right now the structure is entirely constant and perhaps that's important for some optimizations?). So, at the cost of complexity I made a separate, dynamic rmgr table to hold the custom entries. The custom rmgr API would probably be marked "experimental" for a while, and I don't expect lots of people to use it given the challenges of a production-quality table AM. But it's still important, because without it a table AM has no chance to participate in logical replication. 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