Fix incorrect code in new REINDEX CONCURRENTLY code

Peter Eisentraut <peter@eisentraut.org>

Commit: bb76134b08aa46cdeb0ff1e6d7b392d315529a8c
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2019-03-29T09:53:40Z
Releases: 12.0
Fix incorrect code in new REINDEX CONCURRENTLY code

The previous code was adding pointers to transient variables to a
list, but by the time the list was read, the variable might be gone,
depending on the compiler.  Fix it by making copies in the proper
memory context.

Files

PathChange+/−
src/backend/commands/indexcmds.c modified +16 −12