Fix possible failure in parallel index build.
authorRobert Haas <[email protected]>
Fri, 6 Apr 2018 23:28:48 +0000 (19:28 -0400)
committerRobert Haas <[email protected]>
Fri, 6 Apr 2018 23:28:48 +0000 (19:28 -0400)
Report and proposed fix by David Rowley, put in patch form by
Peter Geoghegan.

Discussion: http://postgr.es/m/CAKJS1f91kq1wfYR8rnRRfKtxyhU2woEA+=whd640UxMyU+O0EQ@mail.gmail.com

src/backend/catalog/index.c

index bc99a60d347f35ff100dd2e1b272d983514098c7..b8e9f9f9c7aa9c94943a07921e032fd516bd0160 100644 (file)
@@ -4064,8 +4064,7 @@ RemoveReindexPending(Oid indexOid)
 static void
 ResetReindexPending(void)
 {
-       if (IsInParallelMode())
-               elog(ERROR, "cannot modify reindex state during a parallel operation");
+       /* This may be called in leader error path */
        pendingReindexedIndexes = NIL;
 }