diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2012-03-21 14:09:39 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2012-03-21 14:09:39 -0400 |
commit | f70f095c9096d5e2689e8d79172b37b57a84e51b (patch) | |
tree | f58199614f96bd8a52054439ea141bdcbc1410a2 /src | |
parent | 99081c63e40ac6e33c83406b0958aa9426193fea (diff) | |
download | postgresql-f70f095c9096d5e2689e8d79172b37b57a84e51b.tar.gz postgresql-f70f095c9096d5e2689e8d79172b37b57a84e51b.zip |
Allow new relmapper entries when allow_system_table_mods is true.
This restores the pre-9.0 situation that it's possible to add new indexes
on pg_class and other mapped-but-not-shared catalogs, so long as you broke
the glass and flipped the big red Dont-Touch-Me switch. As before, there
are a lot of gotchas, and you'd have to be pretty desperate to try this
on a production database; but there doesn't seem to be a reason for
relmapper.c to be preventing such things all by itself. Per
experimentation with a case suggested by Cody Cutrer.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/cache/relmapper.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c index 306832eb24b..6f214957bf8 100644 --- a/src/backend/utils/cache/relmapper.c +++ b/src/backend/utils/cache/relmapper.c @@ -837,8 +837,11 @@ perform_relmap_update(bool shared, const RelMapFile *updates) else memcpy(&newmap, &local_map, sizeof(RelMapFile)); - /* Apply the updates to newmap. No new mappings should appear. */ - merge_map_updates(&newmap, updates, false); + /* + * Apply the updates to newmap. No new mappings should appear, unless + * somebody is adding indexes to system catalogs. + */ + merge_map_updates(&newmap, updates, allowSystemTableMods); /* Write out the updated map and do other necessary tasks */ write_relmap_file(shared, &newmap, true, true, true, |