2.25.1.0-b99
tagged this
27 Dec 20:00
Summary: This change's main objective is to allow DocDB to detect the existence of an indexable vector column in a particular schema. This change achieves that by creating a new DocDB DataType called Vector. This change facilitates the detection of the PG Vector type for its subsequent translation into a DataType::Vector during DocDB schema formation. This is done by making sure that the created Vector type will have a predefined OID. This OID is kept reserved before the Vector type is created by an extension. This reservation is done in code by incrementing `YB_LAST_USED_OID` and making sure that VECTOROID (8078) doesn't show up in `src/postgres/src/include/catalog/unused_oids`. During Vector extension creation, `binary_upgrade_set_next_pg_type_oid` is used to ensure the added vector type gets added with this reserved OID. A followup change is needed to tell users on the legacy Vector type to recreate their Vector extension. **Upgrade/Rollback safety:** This change adds a new DataType called 'Vector'. This change adds an autoflag `yb_enable_vector_type` to ensure `Vector` columns can only be created when all nodes have this change. The following error is emitted if a user tries to create a vector table with this flag turned off: "All nodes in the cluster need to upgrade before creating a vector table." Test Plan: ./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressThirdPartyExtensionsPgVector' Reviewers: arybochkin, kramanathan, jason Reviewed By: arybochkin, jason Subscribers: hsunder, yql, ybase Differential Revision: https://phorge.dev.yugabyte.com/D39202