Remove unused code for unlogged materialized views.
authorFujii Masao <[email protected]>
Fri, 18 Oct 2024 08:18:57 +0000 (17:18 +0900)
committerFujii Masao <[email protected]>
Fri, 18 Oct 2024 08:18:57 +0000 (17:18 +0900)
Commit 3bf3ab8c56 initially introduced support for unlogged
materialized views, but this was later disallowed by commit 3223b25ff7.
Additionally, commit d25f519107 added more code for handling
unlogged materialized views. This commit cleans up all unused
code related to them.

If unlogged materialized views had been supported in any official
release, psql would need to retain code to handle them for compatibility
with older servers. However, since they were never included in
an official release, this code is no longer necessary.

Author: Pixian Shi
Reviewed-by: Yugo Nagata, Fujii Masao
Discussion: https://postgr.es/m/CAAccyYKRZ=OvAvgowiSH+OELbStLP=p2Ht=R3CgT=OaNSH5DAA@mail.gmail.com

src/backend/access/heap/heapam_handler.c
src/bin/psql/describe.c

index 1c6da286d4370ba215e0b38e729b081cabf0f1e2..8c59b77b64f14fe19bbde9f77d96a4590c9410c6 100644 (file)
@@ -610,7 +610,6 @@ heapam_relation_set_new_filelocator(Relation rel,
    if (persistence == RELPERSISTENCE_UNLOGGED)
    {
        Assert(rel->rd_rel->relkind == RELKIND_RELATION ||
-              rel->rd_rel->relkind == RELKIND_MATVIEW ||
               rel->rd_rel->relkind == RELKIND_TOASTVALUE);
        smgrcreate(srel, INIT_FORKNUM, false);
        log_smgrcreate(newrlocator, INIT_FORKNUM);
index 6a36c9108332b6b000d9e298e383fc2e96dda283..363a66e7185ca64436d57b64ec293b08ee74410c 100644 (file)
@@ -1970,12 +1970,8 @@ describeOneTableDetails(const char *schemaname,
                              schemaname, relationname);
            break;
        case RELKIND_MATVIEW:
-           if (tableinfo.relpersistence == 'u')
-               printfPQExpBuffer(&title, _("Unlogged materialized view \"%s.%s\""),
-                                 schemaname, relationname);
-           else
-               printfPQExpBuffer(&title, _("Materialized view \"%s.%s\""),
-                                 schemaname, relationname);
+           printfPQExpBuffer(&title, _("Materialized view \"%s.%s\""),
+                             schemaname, relationname);
            break;
        case RELKIND_INDEX:
            if (tableinfo.relpersistence == 'u')