Skip to content

2.25.1.0-b333

@andrei-mart andrei-mart tagged this 11 Feb 17:39
Summary:
The ybctid is added to the hardcoded list of Postgres system columns.

That makes ybctid a reserved column name. Newly created tables will
have a pg_attribute table entry with attribute number -7, name 'ybctid'
and bytea type. This column will be fully queryable, that is, it will
be allowed in the SELECT clause, in the WHERE clause, in the ORDER BY
clause, and not a part of a '*' expansion.

The yb_genbki.pl script was also updated to correctly add the ybctid column
to system tables. That may require to reinitdb in existing environments.
A migration script is added to add the ybctid column to existing clusters during
upgrade.

Since ybctid is a system column, Postgres won't allow users to name their columns
'ybctid'. If such a column already exists, the table won't receive system ybctid column
upon migration from older version, but the user-defined one will remain accessible.
If user drops or renames the ybctid column, they will have to manually insert a row
into pg_attribute to access the system ybctid column. It is also may be accomplished
by manual rerun of the migration script.
Jira: DB-2514

Test Plan:
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressYbctid'
./yb_build.sh --java-test 'org.yb.pgsql.TestYsqlUpgrade'

Reviewers: mtakahara, myang, kramanathan

Reviewed By: mtakahara

Subscribers: yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D39893
Assets 2
Loading