Small code simplification for REINDEX CONCURRENTLY
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 30 Mar 2019 06:16:24 +0000 (07:16 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 30 Mar 2019 06:16:24 +0000 (07:16 +0100)
This was left over from an earlier code structure.

src/backend/commands/indexcmds.c

index ea07be69dbdf5fa15e7d4c215045d99c1cb0f67f..53971fc7258851ef352844fb4666eee4b7062292 100644 (file)
@@ -3106,13 +3106,13 @@ ReindexRelationConcurrently(Oid relationOid, int options)
                foreach(lc, indexIds)
                {
                        Oid                     oldIndexId = lfirst_oid(lc);
-                       ObjectAddress *object = palloc(sizeof(ObjectAddress));
+                       ObjectAddress object;
 
-                       object->classId = RelationRelationId;
-                       object->objectId = oldIndexId;
-                       object->objectSubId = 0;
+                       object.classId = RelationRelationId;
+                       object.objectId = oldIndexId;
+                       object.objectSubId = 0;
 
-                       add_exact_object_address(object, objects);
+                       add_exact_object_address(&object, objects);
                }
 
                /*