diff --git a/src/backend/executor/tqueue.c b/src/backend/executor/tqueue.c
index f465b1db8bc611df8617ebcab51c5df6a0048752..206894df1bd5c5823873f49c765b7bca82475f7c 100644
--- a/src/backend/executor/tqueue.c
+++ b/src/backend/executor/tqueue.c
@@ -661,6 +661,8 @@ TupleQueueRemap(TupleQueueReader *reader, RemapClass remapclass, Datum value)
 		case TQUEUE_REMAP_RECORD:
 			return TupleQueueRemapRecord(reader, value);
 	}
+
+	elog(ERROR, "unknown remap class: %d", (int) remapclass);
 }
 
 /*