cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

Add a flag for table access method to force exclusive write

Open gfphoenix78 opened this issue 10 months ago • 3 comments

This commit adds a flag in table access method to force exclusive write. The feature allows writing of a table, i.e. insert/delete/ update, to be not concurrently safe.

What does this PR do?

Type of Change

  • [ ] Bug fix (non-breaking change)
  • [ ] New feature (non-breaking change)
  • [ ] Breaking change (fix or feature with breaking changes)
  • [ ] Documentation update

Breaking Changes

Test Plan

  • [ ] Unit tests added/updated
  • [ ] Integration tests added/updated
  • [ ] Passed make installcheck
  • [ ] Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


gfphoenix78 avatar Feb 27 '25 01:02 gfphoenix78

what's scenario need ?

yjhjstz avatar Feb 27 '25 21:02 yjhjstz

what's scenario need ?

Concurrently INSERT/DELETE/UPDATE tuples in a table is considered safe in heap/AO/CO. But it's not always true. For some implementations, concurrently write that is unsafe requires to hold a big lock for exclusive write.

gfphoenix78 avatar Mar 31 '25 06:03 gfphoenix78

The PR is mandatory if pax_storage uses manifest file, i.e. USE_MANIFEST_API=ON USE_PAX_CATALOG=OFF, or concurrent write will corrupt the internal metadata of pax tables.

gfphoenix78 avatar Jun 06 '25 01:06 gfphoenix78