pgsql: Fix relpersistence setting in reindex_index

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Fix relpersistence setting in reindex_index
Дата
Msg-id E1XqNED-00047v-Uf@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix relpersistence setting in reindex_index

Buildfarm members with CLOBBER_CACHE_ALWAYS advised us that commit
85b506bbfc2937 was mistaken in setting the relpersistence value of the
index directly in the relcache entry, within reindex_index.  The reason
for the failure is that an invalidation message that comes after mucking
with the relcache entry directly, but before writing it to the catalogs,
would cause the entry to become rebuilt in place from catalogs with the
old contents, losing the update.

Fix by passing the correct persistence value to
RelationSetNewRelfilenode instead; this routine also writes the updated
tuple to pg_class, avoiding the problem.  Suggested by Tom Lane.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0f9692b40d1292f1b2640f026561908fd37b7407

Modified Files
--------------
src/backend/catalog/index.c        |    5 +----
src/backend/commands/sequence.c    |    4 ++--
src/backend/commands/tablecmds.c   |    6 ++++--
src/backend/utils/cache/relcache.c |   14 +++++++++-----
src/include/utils/relcache.h       |    2 +-
5 files changed, 17 insertions(+), 14 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Translation updates
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix WAL-logging of B-tree "unlink halfdead page" operation.