Skip to content

PG17 regress sanity: fix error unrecognized alter database option tablespace seen in database vanilla test - #7764

Merged
Colm (colm-mchugh) merged 1 commit into
release-13.0from
7763-fix-error-unrecognized-alter-database-option-tablespace-seen-in-database-vanilla-test
Nov 25, 2024
Merged

PG17 regress sanity: fix error unrecognized alter database option tablespace seen in database vanilla test#7764
Colm (colm-mchugh) merged 1 commit into
release-13.0from
7763-fix-error-unrecognized-alter-database-option-tablespace-seen-in-database-vanilla-test

Conversation

@colm-mchugh

@colm-mchugh Colm (colm-mchugh) commented Nov 22, 2024

Copy link
Copy Markdown
Contributor

Disable DDL propagation for the vanilla test suite. This enables the vanilla database test to pass, where previously it was correctly returning ERROR: unrecognized ALTER DATABASE option: tablespace because release-13.0 does not propagate this ALTER DATABASE variant.

We (Citus team) discussed cherry picking #7253 from main to release-13.0 because it does propagate ALTER DATABASE tablespace option (as well as a couple of others) but decided fixing the regress test was not the proper context for that. The fix disables citus.enable_metadata_sync when running vanilla, we discussed disabling citus.enable_create_database_propagation but this is not in release-13.0.

@codecov

codecov Bot commented Nov 22, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-13.0@1d0111a). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             release-13.0    #7764   +/-   ##
===============================================
  Coverage                ?   89.59%           
===============================================
  Files                   ?      274           
  Lines                   ?    59584           
  Branches                ?     7436           
===============================================
  Hits                    ?    53387           
  Misses                  ?     4052           
  Partials                ?     2145           

@colm-mchugh Colm (colm-mchugh) changed the title 7763 fix error unrecognized alter database option tablespace seen in database vanilla test PG17 regress sanity: fix error unrecognized alter database option tablespace seen in database vanilla test Nov 22, 2024

@naisila Naisila Puka (naisila) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
(Reminder to drop configure commit before merging to release-13.0)

all Postgres DDL commands to compelte without being propagated by
Citus.
@colm-mchugh
Colm (colm-mchugh) force-pushed the 7763-fix-error-unrecognized-alter-database-option-tablespace-seen-in-database-vanilla-test branch from 1d338b6 to 1cc62a2 Compare November 25, 2024 20:39
@colm-mchugh
Colm (colm-mchugh) merged commit d5f067a into release-13.0 Nov 25, 2024
@colm-mchugh
Colm (colm-mchugh) deleted the 7763-fix-error-unrecognized-alter-database-option-tablespace-seen-in-database-vanilla-test branch November 25, 2024 21:11
Mehmet YILMAZ (m3hm3t) pushed a commit that referenced this pull request Nov 28, 2024
…lespace seen in database vanilla test (#7764)

Disable DDL propagation for the vanilla test suite. This enables the
vanilla `database ` test to pass, where previously it was correctly
returning `ERROR: unrecognized ALTER DATABASE option: tablespace`
because release-13.0 does not propagate this ALTER DATABASE variant.

We (Citus team) discussed cherry picking
[#7253](#7253) from main to
release-13.0 because it does propagate ALTER DATABASE tablespace option
(as well as a couple of others) but decided fixing the regress test was
not the proper context for that. The fix disables
`citus.enable_metadata_sync` when running vanilla, we discussed
disabling `citus.enable_create_database_propagation` but this is not in
release-13.0.
Mehmet YILMAZ (m3hm3t) pushed a commit that referenced this pull request Nov 28, 2024
…lespace seen in database vanilla test (#7764)

Disable DDL propagation for the vanilla test suite. This enables the
vanilla `database ` test to pass, where previously it was correctly
returning `ERROR: unrecognized ALTER DATABASE option: tablespace`
because release-13.0 does not propagate this ALTER DATABASE variant.

We (Citus team) discussed cherry picking
[#7253](#7253) from main to
release-13.0 because it does propagate ALTER DATABASE tablespace option
(as well as a couple of others) but decided fixing the regress test was
not the proper context for that. The fix disables
`citus.enable_metadata_sync` when running vanilla, we discussed
disabling `citus.enable_create_database_propagation` but this is not in
release-13.0.
@naisila

Copy link
Copy Markdown
Contributor

Unfortunately we cannot disable the metadata sync during the vanilla tests. The point of the vanilla test is to see that Postgres vanilla commands behave as they are expected after running "CREATE EXTENSION citus" in the database. So, we cannot disable things that would be enabled by default in the extension. Especially we cannot disable metadata sync which is one of the main mechanisms of Citus. If you check the metadata_sync guc, it has the following definition:

DefineCustomBoolVariable(
		"citus.enable_metadata_sync",
		gettext_noop("Enables object and metadata syncing."),
		NULL,
		&EnableMetadataSync,
		true, // this means it is enabled by default
		PGC_USERSET,
		GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE,
		NULL, NULL, NULL);

When I approved this PR, I thought that we are disabling enable_create_database_propagation, which is false by default. Apologies for not double checking from my side.

	DefineCustomBoolVariable(
		"citus.enable_create_database_propagation",
		gettext_noop("Enables propagating CREATE DATABASE "
					 "and DROP DATABASE statements to workers."),
		NULL,
		&EnableCreateDatabasePropagation,
		false, // this means it is disabled by default
		PGC_USERSET,
		GUC_STANDARD,
		NULL, NULL, NULL);

So, we need to revert this commit.

@colm-mchugh

Copy link
Copy Markdown
Contributor Author

When I approved this PR, I thought that we are disabling enable_create_database_propagation, which is false by default. Apologies for not double checking from my side.

	DefineCustomBoolVariable(
		"citus.enable_create_database_propagation",
		gettext_noop("Enables propagating CREATE DATABASE "
					 "and DROP DATABASE statements to workers."),
		NULL,
		&EnableCreateDatabasePropagation,
		false, // this means it is disabled by default
		PGC_USERSET,
		GUC_STANDARD,
		NULL, NULL, NULL);

So, we need to revert this commit.

Sure, opened #7775 for reverting. The release-13.0 branch does not have CREATE | DROP database propagation (#7249), so does not have the GUC enable_create_database_propagation, we may need to ignore the error until #7253 is in release-13.0.

Colm (colm-mchugh) added a commit that referenced this pull request Dec 2, 2024
…tion tablespace seen in database vanilla test (#7764)"

PG17 compatibility: revert commit d5f067a.

We need to have default `enable_metadata_sync` value for vanilla regress tests.
Need to determine another way to manage the vanilla database regress
test failure.
Colm (colm-mchugh) added a commit that referenced this pull request Dec 3, 2024
Revert PG17 compatibility fix #7764
Naisila Puka (naisila) pushed a commit that referenced this pull request Mar 11, 2025
…lespace seen in database vanilla test (#7764)

Disable DDL propagation for the vanilla test suite. This enables the
vanilla `database ` test to pass, where previously it was correctly
returning `ERROR: unrecognized ALTER DATABASE option: tablespace`
because release-13.0 does not propagate this ALTER DATABASE variant.

We (Citus team) discussed cherry picking
[#7253](#7253) from main to
release-13.0 because it does propagate ALTER DATABASE tablespace option
(as well as a couple of others) but decided fixing the regress test was
not the proper context for that. The fix disables
`citus.enable_metadata_sync` when running vanilla, we discussed
disabling `citus.enable_create_database_propagation` but this is not in
release-13.0.
Naisila Puka (naisila) pushed a commit that referenced this pull request Mar 11, 2025
Revert PG17 compatibility fix #7764
Naisila Puka (naisila) pushed a commit that referenced this pull request Mar 12, 2025
…lespace seen in database vanilla test (#7764)

Disable DDL propagation for the vanilla test suite. This enables the
vanilla `database ` test to pass, where previously it was correctly
returning `ERROR: unrecognized ALTER DATABASE option: tablespace`
because release-13.0 does not propagate this ALTER DATABASE variant.

We (Citus team) discussed cherry picking
[#7253](#7253) from main to
release-13.0 because it does propagate ALTER DATABASE tablespace option
(as well as a couple of others) but decided fixing the regress test was
not the proper context for that. The fix disables
`citus.enable_metadata_sync` when running vanilla, we discussed
disabling `citus.enable_create_database_propagation` but this is not in
release-13.0.
Naisila Puka (naisila) pushed a commit that referenced this pull request Mar 12, 2025
Revert PG17 compatibility fix #7764
Naisila Puka (naisila) pushed a commit that referenced this pull request Mar 12, 2025
…lespace seen in database vanilla test (#7764)

Disable DDL propagation for the vanilla test suite. This enables the
vanilla `database ` test to pass, where previously it was correctly
returning `ERROR: unrecognized ALTER DATABASE option: tablespace`
because release-13.0 does not propagate this ALTER DATABASE variant.

We (Citus team) discussed cherry picking
[#7253](#7253) from main to
release-13.0 because it does propagate ALTER DATABASE tablespace option
(as well as a couple of others) but decided fixing the regress test was
not the proper context for that. The fix disables
`citus.enable_metadata_sync` when running vanilla, we discussed
disabling `citus.enable_create_database_propagation` but this is not in
release-13.0.
Naisila Puka (naisila) pushed a commit that referenced this pull request Mar 12, 2025
Revert PG17 compatibility fix #7764
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants