-
Notifications
You must be signed in to change notification settings - Fork 744
Remove pg_depend entries from columnar metadata indexes to columnar-am (inserted in #5456) #6628
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
Conversation
| 2 | 0 | 1 | table_with_orphaned_shards_102011 | 0 | 0 | ||
| (2 rows) | ||
|
|
||
| -- TODO: Looks like citus_columnar doesn't get auto-updated when updating Citus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, but at least open an issue for this
149318d to
bac5409
Compare
Codecov Report
@@ Coverage Diff @@
## main #6628 +/- ##
==========================================
+ Coverage 93.15% 93.16% +0.01%
==========================================
Files 259 259
Lines 55962 55960 -2
==========================================
+ Hits 52130 52137 +7
+ Misses 3832 3823 -9 |
bac5409 to
79bd16b
Compare
47a2130 to
4611fed
Compare
4611fed to
31c78e3
Compare
src/backend/columnar/sql/udfs/columnar_ensure_am_depends_catalog/11.2-1.sql
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,43 @@ | |||
| CREATE OR REPLACE FUNCTION columnar_internal.columnar_ensure_am_depends_catalog() | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when do we call this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
via citus_finish_pg_upgrade()
marcocitus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have some kind of pg_dump test to confirm we fixed the original issue?
642f61c to
c282ec8
Compare
I see that we have some pg_dump tests for columnar in pg_dump.sql but apparently they don't report warnings etc., so not sure if there is way to do that. |
26b101e to
e7aff54
Compare
When run_test.py is run for an upgrade_.*_after.sql then, then automatically run the corresponding uprade_.*_before.sql file first. This is because all those upgrade_.*_after.sql files depend on the objects created in upgrade_.*_before.sql files by definition.
This commit hides port numbers in upgrade_columnar_after because the port numbers assigned to nodes in upgrade schedule differ from the ones that flaky test detector assigns.
…le times So that flaky test detector can run upgrade_columnar_before.sql multiple times.
In the past, having columnar tables in the cluster was causing pg upgrades to fail when attempting to access columnar metadata. This is because, pg_dump doesn't see objects that we use for columnar-am related booking as the dependencies of the tables using columnar-am. To fix that; in #5456, we inserted some "normal dependency" edges (from those objects to columnar-am) into pg_depend. This helped us ensuring the existency of a class of metadata objects --such as columnar.storageid_seq-- and helped fixing #5437. However, the normal-dependency edges that we added for indexes on columnar metadata tables --such columnar.stripe_pkey-- didn't help at all because they were indeed causing dependency loops (#5510) and pg_dump was not able to take those dependency edges into the account. For this reason, this commit deletes those dependency edges so that pg_dump stops complaining about them. Note that it's not critical to delete those edges from pg_depend since they're not breaking pg upgrades but were triggering some warning messages. And given that backporting a sql change into older versions is hard a lot, we skip backporting this.
e7aff54 to
9550ebd
Compare
DESCRIPTION: Fixes (pg_dump/pg_upgrade) dependency loop warnings caused by pg_depend entries inserted by citus_columnar
Fixes #5510.
In the past, having columnar tables in the cluster was causing pg
upgrades to fail when attempting to access columnar metadata. This is
because, pg_dump doesn't see objects that we use for columnar-am related
booking as the dependencies of the tables using columnar-am.
To fix that; in #5456, we inserted some "normal dependency" edges (from
those objects to columnar-am) into pg_depend.
This helped us ensuring the existency of a class of metadata objects
--such as columnar.storageid_seq-- and helped fixing #5437.
However, the normal-dependency edges that we added for indexes on
columnar metadata tables --such columnar.stripe_pkey-- didn't help at
all because they were indeed causing dependency loops (#5510) and
pg_dump was not able to take those dependency edges into the account.
For this reason, this commit deletes those dependency edges so that
pg_dump stops complaining about them. Note that it's not critical to
delete those edges from pg_depend since they're not breaking pg upgrades
but were triggering some warning messages. And given that backporting
a sql change into older versions is hard a lot, we skip backporting
this.