Skip to content

Undo#21

Draft
gburd wants to merge 7 commits into
masterfrom
undo
Draft

Undo#21
gburd wants to merge 7 commits into
masterfrom
undo

Conversation

@gburd
Copy link
Copy Markdown
Owner

@gburd gburd commented Mar 26, 2026

No description provided.

@github-actions github-actions Bot force-pushed the master branch 30 times, most recently from 9355586 to 9cbf7e6 Compare March 30, 2026 18:18
@github-actions github-actions Bot force-pushed the master branch 23 times, most recently from c08b44f to 7c5c2d3 Compare April 2, 2026 22:10
gburd added 7 commits May 17, 2026 11:06
Nix-based development environment for PostgreSQL hacking.  Not for
merge; staged here so per-commit build/test runs can share a single
toolchain.

Changes from v34:

- Drop the .idea/ and .vscode/ editor directories.  Editor state is
  personal and should not live in the repository.

- Re-introduce glibc-no-fortify-warning.patch and the patchedGlibc
  overlay in shell.nix.  Without this, meson's libcurl thread-safety
  probe fails under our default -D_FORTIFY_SOURCE=1 -O0 -Werror
  combination because features.h emits a -Wcpp warning that becomes a
  fatal error.  The patch is scoped to the dev shell only and does not
  leak into system glibc or release builds.
Sparsemap is a memory-efficient data structure for maintaining sparse
sets of integers using hierarchical bitmaps.  It supports O(1) set/get
operations and efficient iteration over set bits while using far less
memory than a dense bitmap for sparse populations.

The implementation provides:
  - sparsemap_set/get/is_set for individual bit manipulation
  - sparsemap_scan for efficient forward iteration
  - sparsemap_select for rank-based selection
  - Configurable initial capacity with automatic growth

Used by the UNDO subsystem for tracking allocated pages and by RECNO
for free-space management within relation forks.

Includes a TAP regression test module (test_sparsemap) exercising all
public API operations.
Header-only implementation of a probabilistic skip list providing
O(log n) insert, delete, and lookup operations with O(n) space.
Compared to rbtree, skip lists offer simpler implementation, better
cache locality for sequential scans, and lock-free read potential.

The implementation provides:
  - Type-safe macros for defining typed skip lists (DEFINE_SKIPLIST)
  - Configurable maximum height (up to 32 levels)
  - Forward iteration via SKIPLIST_FOREACH
  - Range queries and nearest-neighbor lookup
  - Memory allocation via palloc (TopMemoryContext by default)

Used by the UNDO subsystem for maintaining ordered transaction
metadata and by RECNO for HLC-ordered page directories.

Includes a TAP regression test module (test_skiplist) exercising
insertion, deletion, iteration, and edge cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant