]> granicus.if.org Git - postgresql/commitdiff
Remove unused struct member, enforce multi_insert callback presence.
authorAndres Freund <andres@anarazel.de>
Fri, 5 Apr 2019 00:36:45 +0000 (17:36 -0700)
committerAndres Freund <andres@anarazel.de>
Fri, 5 Apr 2019 00:39:39 +0000 (17:39 -0700)
Author: David Rowley, Andres Freund
Discussion: https://postgr.es/m/CAKJS1f9=9phmm66diAji4gvHnWSrK7BGFoNct+mEUT_c8pPOjw@mail.gmail.com

src/backend/access/table/tableamapi.c
src/backend/commands/copy.c

index 6f3f638965bb25a0ed8d47174ba2f5f74adf7c49..bfd713f3af1240b1717e0b2f11f845054bf46f1f 100644 (file)
@@ -72,6 +72,7 @@ GetTableAmRoutine(Oid amhandler)
        Assert(routine->tuple_insert_speculative != NULL);
        Assert(routine->tuple_complete_speculative != NULL);
 
+       Assert(routine->multi_insert != NULL);
        Assert(routine->tuple_delete != NULL);
        Assert(routine->tuple_update != NULL);
        Assert(routine->tuple_lock != NULL);
index 3f63ba4caaca354ce9d19592acd6e5ea1dfebc4b..c39218f8dbb59c29a068184cc21d237e1311557f 100644 (file)
@@ -277,7 +277,6 @@ typedef struct CopyMultiInsertInfo
        List       *multiInsertBuffers; /* List of tracked CopyMultiInsertBuffers */
        int                     bufferedTuples; /* number of tuples buffered over all buffers */
        int                     bufferedBytes;  /* number of bytes from all buffered tuples */
-       int                     nbuffers;               /* number of buffers we're tracking */
        CopyState       cstate;                 /* Copy state for this CopyMultiInsertInfo */
        EState     *estate;                     /* Executor state used for COPY */
        CommandId       mycid;                  /* Command Id used for COPY */
@@ -2393,7 +2392,6 @@ CopyMultiInsertInfoInit(CopyMultiInsertInfo *miinfo, ResultRelInfo *rri,
        miinfo->multiInsertBuffers = NIL;
        miinfo->bufferedTuples = 0;
        miinfo->bufferedBytes = 0;
-       miinfo->nbuffers = 0;
        miinfo->cstate = cstate;
        miinfo->estate = estate;
        miinfo->mycid = mycid;