You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feature: let the listelement index apply the fragment reuse index on stable row ID tables #11010
The experimental listelement scalar index (#10949, #10950) doesn't apply the fragment reuse index. On a table with stable row IDs, every index must apply it. So while a listelement index exists on such a table:
compact_files with defer_index_remap is refused: "a ListElement index, which does not apply the fragment reuse index";
committing a version that carries both a fragment reuse index and a listelement index fails.
All other built-in scalar indexes except JSON support this. Fragment reuse on stable-row-ID tables is still debug-only (frag_reuse_with_stable_row_ids_enabled()), so released builds aren't affected yet. It needs to land before that becomes the default.
Proposal
listelement stores its entries in a BTree, its target index, which already supports batch row-ID remapping. The plugin can:
return true from supports_batch_row_id_remapping;
implement load_index_with_remapping by loading its target through the BTree plugin and wrapping the result;
handle the cache and rebind paths as BTree does.
Tests: on a stable-row-ID table compacted with defer_index_remap, indexed results match a scan, including NOT and NULL rows. The incompatibility check no longer lists the index.
Spec: add a section on stable row IDs and the fragment reuse index to docs/src/format/index/scalar/list_element.md.
Activity