Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix the parameters order for TableAmRoutine.relation_copy_for_cluster()
authorAlexander Korotkov <akorotkov@postgresql.org>
Wed, 3 Apr 2024 18:29:18 +0000 (21:29 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Wed, 3 Apr 2024 18:31:06 +0000 (21:31 +0300)
Specify OldTable first, NewTable second as used by
table_relation_copy_for_cluster() and as implemented in
heapam_relation_copy_for_cluster().

Backpatch to PostgreSQL 12, where TableAmRoutine was introduced.

Discussion: https://postgr.es/m/ME3P282MB3166860D4911AE82F92DF7C5B63F2%40ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM
Author: Japin Li
Reviewed-by: Pavel Borisov
Backpatch-through: 12

src/include/access/tableam.h

index 5d0431a21b54bef6aaf76746a325c9b60c80abc1..6a7b4a547255f715b2b8a8808e180ff74891345a 100644 (file)
@@ -601,8 +601,8 @@ typedef struct TableAmRoutine
                                       const RelFileNode *newrnode);
 
    /* See table_relation_copy_for_cluster() */
-   void        (*relation_copy_for_cluster) (Relation NewTable,
-                                             Relation OldTable,
+   void        (*relation_copy_for_cluster) (Relation OldTable,
+                                             Relation NewTable,
                                              Relation OldIndex,
                                              bool use_sort,
                                              TransactionId OldestXmin,