Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YSQL] Feature to temporarily disable DDL catalog version bump #23786

Open
1 task done
kai-franz opened this issue Sep 3, 2024 · 0 comments
Open
1 task done

[YSQL] Feature to temporarily disable DDL catalog version bump #23786

kai-franz opened this issue Sep 3, 2024 · 0 comments
Assignees
Labels
2.20 Backport Required 2024.1 Backport Required area/ysql Yugabyte SQL (YSQL) kind/new-feature This is a request for a completely new feature priority/medium Medium priority issue

Comments

@kai-franz
Copy link
Contributor

kai-franz commented Sep 3, 2024

Jira Link: DB-12689

Description

Currently, most DDLs bump the catalog version, forcing all backend processes to stop and refresh their cache.

Sometimes, when we are doing many DDLs in one script, we'd like to be able to have some way of bumping the catalog version once for all the DDLs instead of once per DDL (assuming it is safe to do so).

There is a similar existing feature (SET yb_make_next_ddl_statement_nonbreaking = true;) which makes the next DDL non-breaking.

We would like to have something like SET yb_make_next_ddl_statement_nonincrementing = true;.

Issue Type

kind/new-feature

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@kai-franz kai-franz added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Sep 3, 2024
@yugabyte-ci yugabyte-ci added kind/new-feature This is a request for a completely new feature priority/medium Medium priority issue labels Sep 3, 2024
@sushantrmishra sushantrmishra removed the status/awaiting-triage Issue awaiting triage label Sep 4, 2024
@yugabyte-ci yugabyte-ci added status/awaiting-triage Issue awaiting triage and removed status/awaiting-triage Issue awaiting triage labels Sep 4, 2024
myang2021 added a commit that referenced this issue Sep 16, 2024
Summary:
In a recent customer issue investigation, the customer performed an application
upgrade, which involves running many DDLs (100+) consecutively. Many of these
DDLs cause catalog version to increment. As a result, all the active connections
kept doing catalog cache refreshes continuously that led to PG memory spike and
latency spike. It will be beneficial to reduce the number of DDLs that
increment the catalog version. After analyzing customer's DDL statements that
have caused catalog version to increment, they can be classified as 3 categories:

(1) create index statements that build indexes on a newly created table
(2) create new partition statements and link them to the existing parent partition
(3) create new table but referencing an existing table via foreign key

For (1), because the table itself is newly created, there is no need for the
create index statement to increment the catalog version. To make things worse, a
create index statement by default runs concurrently, and increments the catalog
version by 3.

In this particular customer's situation, more than half of the DDLs belong to
category (1).

One solution is to combine create statement and the create index statement
together. Using an example found online:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text);
CREATE TABLE
yugabyte=# create unique index foo_idx on foo using btree (code, label);
NOTICE:  index method "btree" was replaced with "lsm" in YugabyteDB
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               4 |                     1
  13252 |               1 |                     1
(5 rows)
```

By create table and then create a unique index, the catalog version was
incremented by 3.

On the other hand, we can combine them into one create table statement:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text,
yugabyte(#     constraint foo_uq unique (code, label));
select *CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)
```

We can see that there was no catalog version increment.

However it is not always possible to do these rewrite. The create index
statement does allow more options, such as specifying ASC, DESC which isn't
allowed when declaring a uniqe constraint in the create table statement itself.
It is in such a case we introduce the new GUC
`yb_make_next_ddl_statement_nonincrementing` to help. This is an auto-reset gflag
that is done similar to the existing GUC
`yb_make_next_ddl_statement_nonbreaking`. When set to true, it will suppress the
next DDL statement from incrementing both the `current_version` and the
`last_breaking_version`.

Note that in order for the GUC to work for create index statement, we need to
use the nonconcurrent keyword. By default the create index statement runs
concurrently and its algorithm involves incrementing the catalog version by 3 to
work correctly. A create index noncurrently only bumps up the catalog version by
1. For a newly created table, because it is empty, it is safe and correct to run
create index nonconcurrently.

For example,

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               2 |                     1
  13252 |               1 |                     1
(5 rows)

```

With the new GUC `yb_make_next_ddl_statement_nonincrementing`, the catalog
version will stay the same:

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# set yb_make_next_ddl_statement_nonincrementing = true;
SET
yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

```

A new unit test is added.
Jira: DB-12689

Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NonIncrementingDDLMode

Reviewers: kfranz

Reviewed By: kfranz

Subscribers: svc_phabricator, yql

Differential Revision: https://phorge.dev.yugabyte.com/D37915
myang2021 added a commit that referenced this issue Sep 17, 2024
…nting

Summary:
In a recent customer issue investigation, the customer performed an application
upgrade, which involves running many DDLs (100+) consecutively. Many of these
DDLs cause catalog version to increment. As a result, all the active connections
kept doing catalog cache refreshes continuously that led to PG memory spike and
latency spike. It will be beneficial to reduce the number of DDLs that
increment the catalog version. After analyzing customer's DDL statements that
have caused catalog version to increment, they can be classified as 3 categories:

(1) create index statements that build indexes on a newly created table
(2) create new partition statements and link them to the existing parent partition
(3) create new table but referencing an existing table via foreign key

For (1), because the table itself is newly created, there is no need for the
create index statement to increment the catalog version. To make things worse, a
create index statement by default runs concurrently, and increments the catalog
version by 3.

In this particular customer's situation, more than half of the DDLs belong to
category (1).

One solution is to combine create statement and the create index statement
together. Using an example found online:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text);
CREATE TABLE
yugabyte=# create unique index foo_idx on foo using btree (code, label);
NOTICE:  index method "btree" was replaced with "lsm" in YugabyteDB
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               4 |                     1
  13252 |               1 |                     1
(5 rows)
```

By create table and then create a unique index, the catalog version was
incremented by 3.

On the other hand, we can combine them into one create table statement:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text,
yugabyte(#     constraint foo_uq unique (code, label));
select *CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)
```

We can see that there was no catalog version increment.

However it is not always possible to do these rewrite. The create index
statement does allow more options, such as specifying ASC, DESC which isn't
allowed when declaring a uniqe constraint in the create table statement itself.
It is in such a case we introduce the new GUC
`yb_make_next_ddl_statement_nonincrementing` to help. This is an auto-reset gflag
that is done similar to the existing GUC
`yb_make_next_ddl_statement_nonbreaking`. When set to true, it will suppress the
next DDL statement from incrementing both the `current_version` and the
`last_breaking_version`.

Note that in order for the GUC to work for create index statement, we need to
use the nonconcurrent keyword. By default the create index statement runs
concurrently and its algorithm involves incrementing the catalog version by 3 to
work correctly. A create index noncurrently only bumps up the catalog version by
1. For a newly created table, because it is empty, it is safe and correct to run
create index nonconcurrently.

For example,

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               2 |                     1
  13252 |               1 |                     1
(5 rows)

```

With the new GUC `yb_make_next_ddl_statement_nonincrementing`, the catalog
version will stay the same:

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# set yb_make_next_ddl_statement_nonincrementing = true;
SET
yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

```

A new unit test is added.
Jira: DB-12689

Original commit: 063dbe5 / D37915

Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NonIncrementingDDLMode

Reviewers: kfranz

Reviewed By: kfranz

Subscribers: yql, svc_phabricator

Differential Revision: https://phorge.dev.yugabyte.com/D38101
myang2021 added a commit that referenced this issue Sep 17, 2024
Summary:
In a recent customer issue investigation, the customer performed an application
upgrade, which involves running many DDLs (100+) consecutively. Many of these
DDLs cause catalog version to increment. As a result, all the active connections
kept doing catalog cache refreshes continuously that led to PG memory spike and
latency spike. It will be beneficial to reduce the number of DDLs that
increment the catalog version. After analyzing customer's DDL statements that
have caused catalog version to increment, they can be classified as 3 categories:

(1) create index statements that build indexes on a newly created table
(2) create new partition statements and link them to the existing parent partition
(3) create new table but referencing an existing table via foreign key

For (1), because the table itself is newly created, there is no need for the
create index statement to increment the catalog version. To make things worse, a
create index statement by default runs concurrently, and increments the catalog
version by 3.

In this particular customer's situation, more than half of the DDLs belong to
category (1).

One solution is to combine create statement and the create index statement
together. Using an example found online:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text);
CREATE TABLE
yugabyte=# create unique index foo_idx on foo using btree (code, label);
NOTICE:  index method "btree" was replaced with "lsm" in YugabyteDB
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               4 |                     1
  13252 |               1 |                     1
(5 rows)
```

By create table and then create a unique index, the catalog version was
incremented by 3.

On the other hand, we can combine them into one create table statement:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text,
yugabyte(#     constraint foo_uq unique (code, label));
select *CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)
```

We can see that there was no catalog version increment.

However it is not always possible to do these rewrite. The create index
statement does allow more options, such as specifying ASC, DESC which isn't
allowed when declaring a uniqe constraint in the create table statement itself.
It is in such a case we introduce the new GUC
`yb_make_next_ddl_statement_nonincrementing` to help. This is an auto-reset gflag
that is done similar to the existing GUC
`yb_make_next_ddl_statement_nonbreaking`. When set to true, it will suppress the
next DDL statement from incrementing both the `current_version` and the
`last_breaking_version`.

Note that in order for the GUC to work for create index statement, we need to
use the nonconcurrent keyword. By default the create index statement runs
concurrently and its algorithm involves incrementing the catalog version by 3 to
work correctly. A create index noncurrently only bumps up the catalog version by
1. For a newly created table, because it is empty, it is safe and correct to run
create index nonconcurrently.

For example,

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               2 |                     1
  13252 |               1 |                     1
(5 rows)

```

With the new GUC `yb_make_next_ddl_statement_nonincrementing`, the catalog
version will stay the same:

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# set yb_make_next_ddl_statement_nonincrementing = true;
SET
yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

```

A new unit test is added.
Jira: DB-12689

Original commit: 063dbe5 / D37915

Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NonIncrementingDDLMode

Reviewers: kfranz

Reviewed By: kfranz

Subscribers: yql, svc_phabricator

Differential Revision: https://phorge.dev.yugabyte.com/D38128
jasonyb pushed a commit that referenced this issue Sep 17, 2024
Summary:
 f97d7d5 [#23770] [#23797] [#23837] YSQL: Fix most non-regress tests when run with Connection Manager
 ee2b108 [docs] reverted PR 23909 changes (#23941)
 bd80f4e [#23924] DocDB: Address recent flakiness of PgGetLockStatusTest.TestGetWaitStart
 Excluded: f0a5db7 [#20908] YSQL: Introduce interface to optimize index non-key column updates
 6556498 [#23897] xClusterDDLRepl: Support create table with partition by primary key
 e2b1d28 [#23363] Changing the default gflags of YSQL memory configuration.
 e717f43 [#23925] DocDB: Address recent regression of test PgWaitQueuesTest.MultiTabletFairness
 09b7702 [#23940] YSQL: Replace copyright string from YugaByteDB to YugabyteDB
 add83ef [#23947] Update callhome URL to use https
 69db717 Update faq page (#23704)
 Excluded: 063dbe5 [#23786] YSQL: yb_make_next_ddl_statement_nonincrementing
 Excluded: a913524 [#23859] YSQL: Remove redundant Bitmap Scan filters on partial indexes
 41f5afd [PLAT-15097]: Delete System platform DB table while disabling ysql
 d6bbf59 [#23890] docdb: Add filtering for bootstrap intent iterators based on min_replay_txn_start_ht
 0b37479 [#23770] YSQL: Stabalize TestPgExplainAnalyze#testExplainAnalyzeOptions the test with ysql connection manager

Test Plan: Jenkins: rebase: pg15-cherrypicks

Reviewers: jason, tfoucher

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D38123
myang2021 added a commit that referenced this issue Sep 18, 2024
…nonincrementing

Summary:
```
- guc.c:
  - yb_plpgsql_disable_prefetch_in_for_query:
    - pg15 commit 91a265a touches GUC
      yb_plpgsql_disable_prefetch_in_for_query (QUERY_TUNING to
      QUERY_TUNING_METHOD)
    - master commit 063dbe5 adds GUC
      yb_make_next_ddl_statement_nonincrementing above that
    - adjacent lines conflict
```

In a recent customer issue investigation, the customer performed an application
upgrade, which involves running many DDLs (100+) consecutively. Many of these
DDLs cause catalog version to increment. As a result, all the active connections
kept doing catalog cache refreshes continuously that led to PG memory spike and
latency spike. It will be beneficial to reduce the number of DDLs that
increment the catalog version. After analyzing customer's DDL statements that
have caused catalog version to increment, they can be classified as 3 categories:

(1) create index statements that build indexes on a newly created table
(2) create new partition statements and link them to the existing parent partition
(3) create new table but referencing an existing table via foreign key

For (1), because the table itself is newly created, there is no need for the
create index statement to increment the catalog version. To make things worse, a
create index statement by default runs concurrently, and increments the catalog
version by 3.

In this particular customer's situation, more than half of the DDLs belong to
category (1).

One solution is to combine create statement and the create index statement
together. Using an example found online:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text);
CREATE TABLE
yugabyte=# create unique index foo_idx on foo using btree (code, label);
NOTICE:  index method "btree" was replaced with "lsm" in YugabyteDB
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               4 |                     1
  13252 |               1 |                     1
(5 rows)
```

By create table and then create a unique index, the catalog version was
incremented by 3.

On the other hand, we can combine them into one create table statement:

```
yugabyte=# create table foo (
yugabyte(#     id serial primary key,
yugabyte(#     code integer,
yugabyte(#     label text,
yugabyte(#     constraint foo_uq unique (code, label));
select *CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)
```

We can see that there was no catalog version increment.

However it is not always possible to do these rewrite. The create index
statement does allow more options, such as specifying ASC, DESC which isn't
allowed when declaring a uniqe constraint in the create table statement itself.
It is in such a case we introduce the new GUC
`yb_make_next_ddl_statement_nonincrementing` to help. This is an auto-reset gflag
that is done similar to the existing GUC
`yb_make_next_ddl_statement_nonbreaking`. When set to true, it will suppress the
next DDL statement from incrementing both the `current_version` and the
`last_breaking_version`.

Note that in order for the GUC to work for create index statement, we need to
use the nonconcurrent keyword. By default the create index statement runs
concurrently and its algorithm involves incrementing the catalog version by 3 to
work correctly. A create index noncurrently only bumps up the catalog version by
1. For a newly created table, because it is empty, it is safe and correct to run
create index nonconcurrently.

For example,

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               2 |                     1
  13252 |               1 |                     1
(5 rows)

```

With the new GUC `yb_make_next_ddl_statement_nonincrementing`, the catalog
version will stay the same:

```
yugabyte=# create table foo(id int);
CREATE TABLE
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

yugabyte=# set yb_make_next_ddl_statement_nonincrementing = true;
SET
yugabyte=# create index nonconcurrently id_idx on foo(id);
CREATE INDEX
yugabyte=# select * from pg_yb_catalog_version;
 db_oid | current_version | last_breaking_version
--------+-----------------+-----------------------
      1 |               1 |                     1
  13248 |               1 |                     1
  13249 |               1 |                     1
  13251 |               1 |                     1
  13252 |               1 |                     1
(5 rows)

```

A new unit test is added.
Jira: DB-12689

Original commit: 063dbe5 / D37915

Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NonIncrementingDDLMode

Reviewers: jason, tfoucher

Reviewed By: jason

Subscribers: yql, svc_phabricator

Differential Revision: https://phorge.dev.yugabyte.com/D38141
myang2021 added a commit that referenced this issue Sep 18, 2024
…AdminVariables

Summary:
The yb_make_next_ddl_statement_nonincrementing has PGC_SUSET and needs to be
added to YbDbAdminVariables in order for yb_db_admin role to set it. Otherwise,
we see permission denied error for yb_db_admin:

```
yugabyte=# set role yb_db_admin;
SET
yugabyte=> set yb_make_next_ddl_statement_nonincrementing to true;
ERROR:  permission denied to set parameter "yb_make_next_ddl_statement_nonincrementing"
```

I added yb_make_next_ddl_statement_nonincrementing to YbDbAdminVariables, and
the above error is gone

```
yugabyte=# set role yb_db_admin;
SET
yugabyte=> set yb_make_next_ddl_statement_nonincrementing to true;
SET
```
Jira: DB-12689

Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NonIncrementingDDLMode

Reviewers: kfranz

Reviewed By: kfranz

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D38135
myang2021 added a commit that referenced this issue Sep 19, 2024
…rementing to YbDbAdminVariables

Summary:
The yb_make_next_ddl_statement_nonincrementing has PGC_SUSET and needs to be
added to YbDbAdminVariables in order for yb_db_admin role to set it. Otherwise,
we see permission denied error for yb_db_admin:

```
yugabyte=# set role yb_db_admin;
SET
yugabyte=> set yb_make_next_ddl_statement_nonincrementing to true;
ERROR:  permission denied to set parameter "yb_make_next_ddl_statement_nonincrementing"
```

I added yb_make_next_ddl_statement_nonincrementing to YbDbAdminVariables, and
the above error is gone

```
yugabyte=# set role yb_db_admin;
SET
yugabyte=> set yb_make_next_ddl_statement_nonincrementing to true;
SET
```
Jira: DB-12689

Original commit: 2beb872 / D38135

Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NonIncrementingDDLMode

Reviewers: kfranz

Reviewed By: kfranz

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D38173
myang2021 added a commit that referenced this issue Sep 19, 2024
…menting to YbDbAdminVariables

Summary:
The yb_make_next_ddl_statement_nonincrementing has PGC_SUSET and needs to be
added to YbDbAdminVariables in order for yb_db_admin role to set it. Otherwise,
we see permission denied error for yb_db_admin:

```
yugabyte=# set role yb_db_admin;
SET
yugabyte=> set yb_make_next_ddl_statement_nonincrementing to true;
ERROR:  permission denied to set parameter "yb_make_next_ddl_statement_nonincrementing"
```

I added yb_make_next_ddl_statement_nonincrementing to YbDbAdminVariables, and
the above error is gone

```
yugabyte=# set role yb_db_admin;
SET
yugabyte=> set yb_make_next_ddl_statement_nonincrementing to true;
SET
```
Jira: DB-12689

Original commit: 2beb872 / D38135

Test Plan: ./yb_build.sh --cxx-test pg_catalog_version-test --gtest_filter PgCatalogVersionTest.NonIncrementingDDLMode

Reviewers: kfranz

Reviewed By: kfranz

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D38175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.20 Backport Required 2024.1 Backport Required area/ysql Yugabyte SQL (YSQL) kind/new-feature This is a request for a completely new feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

4 participants