cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

Feature: Introduce extra tableam hook routinue for catalog to replace direct heap function calls

Open foreyes opened this issue 2 years ago • 5 comments

Change logs

CloudBerry does not assume that the catalog use heap. Our approch uses tableam interfaces instead of heap function calls.

These heap functions currently widely used within the catalog include: heap_getnext, simple_heap_insert, simple_heap_delete, simple_heap_update, frozen_heap_insert, and heap_inplace_update.

In order to replace these functions, we introduce necessary new simple tableam interfaces: scan_getnext, tuple_insert_direct, tuple_insert_frozen, tuple_update_direct, tuple_inplace_update.

All access methods that can used for catalog must implement these new interfaces.

Why are the changes needed?

Describe why the changes are necessary.

Does this PR introduce any user-facing change?

If yes, please clarify the previous behavior and the change this PR proposes.

How was this patch tested?

Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

  • [ ] Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • [ ] Sign the Contributor License Agreement as prompted for your first-time contribution.
  • [ ] List your communication in the GitHub Issues or Discussions (if has or needed).
  • [ ] Document changes.
  • [ ] Add tests for the change
  • [ ] Pass make installcheck
  • [ ] Pass make -C src/test installcheck-cbdb-parallel
  • [ ] Feel free to @cloudberrydb/dev team for review and approval when your PR is ready🥳

foreyes avatar Aug 09 '23 01:08 foreyes

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 09 '23 01:08 CLAassistant

this change will affect other extension like: https://github.com/erthalion/timescaledb/blob/77d1267eb1ae01bb503c38b5f2ab8b21601e04a8/src/copy.c#L727

yjhjstz avatar Aug 09 '23 05:08 yjhjstz

@foreyes Hi, plz use rebase instead of merge for your commits to catch up with the main branch IIRC. Also plz clean up your commit history. /cc @my-ship-it

tuhaihe avatar Aug 14 '23 02:08 tuhaihe

Please take a look again. Thx a lot! @yjhjstz @my-ship-it

foreyes avatar Aug 15 '23 01:08 foreyes

I have changed commit author email from hashdata email into github email (in order to meet CLA requirement), so the branch is overwritten.

foreyes avatar Aug 15 '23 08:08 foreyes

After discussion with @foreyes, let's close the PR.

my-ship-it avatar Jul 26 '24 01:07 my-ship-it