citusdata / citus

Distributed PostgreSQL as an extension
https://www.citusdata.com
GNU Affero General Public License v3.0
10.65k stars 670 forks source link

PG17 compatibility: Check whether table AM is default #7747

Closed naisila closed 1 week ago

naisila commented 1 week ago

PG 17 added support for DEFAULT in ALTER TABLE .. SET ACCESS METHOD

Relevant PG commit: d61a6cad6418f643a5773352038d0dfe5d3535b8 https://github.com/postgres/postgres/commit/d61a6cad6418f643a5773352038d0dfe5d3535b8

In that case, name in AlterTableCmd->name would be null. Add a null check here to avoid crash.

Note to reviewer: I have opened the pull request against naisila/pg17_columnar_issue as the fix from that PR is necessary to see what this PR is fixing. Naturally, this fix will be merged after https://github.com/citusdata/citus/pull/7738 has been merged

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-13.0 #7747 +/- ## =============================================== Coverage ? 89.64% =============================================== Files ? 274 Lines ? 59582 Branches ? 7436 =============================================== Hits ? 53413 Misses ? 4038 Partials ? 2131 ```