Files
Vinod Sridharan 739bdfb1aa Merged PR 1780627: A few API changes & RUM changes for performance
### Does this PR have any customer impact?
Yes

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Features

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes

### Are you introducing any new config? If yes, do you have tests with and without them being set?
Yes
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description

1) Port a few more changes into the public documentdb_rum to reduce diff to internal RUM
2) Add more inlining of computation of RumItem from the pages (behind a GUC defaulted on)
3) Add option for bson_build_document and fix bson_get_value_text to not quote strings unnecessarily to be compatible with `::text` casts

----
#### AI description  (iteration 1)
#### PR Classification
This PR implements API updates and performance improvements by introducing a new item pointer decoding mechanism in RUM indexes and extending BSON UDF functionalities.

#### PR Summary
The pull request refactors core RUM index scan routines and enhances BSON API functions to improve performance and API consistency. Key changes include:
- **`oss/internal/pg_documentdb_extended_rum` and `pgmongo_rum`**: Introduced new macros and inline functions (e.g., `decode_varbyte_blocknumber`, `rumDataPageLeafReadWithBlockNumberIncr`) along with the boolean flag `RumUseNewItemPtrDecoding` to optimize item pointer decoding.
- **`rumget.c`, `rumentrypage.c`, and `rumdatapage.c`**: Updated the posting tree scan logic to conditionally apply the new decoding approach, streamlining data page processing.
- **`pg_documentdb_core/sql/udfs/bson_io`**: Added new BSON UDFs (such as `bson_build_document`) and overloads (e.g., a three-argument version of `bson_get_value_text`) to expand API capabilities.
- **`pgbson.c` and `bson_io.c`**: Enhanced BSON logging functions with optional quoting support for JSON conversion, improving logging clarity and consistency.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-08-25 11:39:17 +08:00
..