From 9b403ac2c3fcf11d44711a07a54f10fb8d408814 Mon Sep 17 00:00:00 2001
From: shipixian <shipixian_yewu@cmss.chinamobile.com>
Date: Fri, 11 Oct 2024 10:18:29 +0800
Subject: [PATCH] Remove unlogged materialized view persistence handling

Signed-off-by: shipixian <shipixian_yewu@cmss.chinamobile.com>
---
 src/backend/access/heap/heapam_handler.c | 1 -
 src/bin/psql/describe.c                  | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 1c6da286d4..8c59b77b64 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -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);
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 6a36c91083..363a66e718 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -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')
-- 
2.39.3 (Apple Git-145)

