Skip to content

Commit 16ea51a

Browse files
committed
Pin the built-in index access methods.
This was overlooked in commit 473b932, which introduced DROP ACCESS METHOD. Although that command is restricted to superusers, we don't want even superusers dropping the built-in methods; "DROP ACCESS METHOD btree" in particular is unrecoverable from. Pin these objects in the same way that other initdb-created objects are pinned. I chose to bump catversion for this fix. That's not absolutely necessary perhaps, but it will ensure that no 9.6 production systems are missing the pin entries.
1 parent e13ac55 commit 16ea51a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/bin/initdb/initdb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,6 +1664,8 @@ setup_depend(FILE *cmdfd)
16641664
"INSERT INTO pg_depend SELECT 0,0,0, tableoid,oid,0, 'p' "
16651665
" FROM pg_opfamily;\n\n",
16661666
"INSERT INTO pg_depend SELECT 0,0,0, tableoid,oid,0, 'p' "
1667+
" FROM pg_am;\n\n",
1668+
"INSERT INTO pg_depend SELECT 0,0,0, tableoid,oid,0, 'p' "
16671669
" FROM pg_amop;\n\n",
16681670
"INSERT INTO pg_depend SELECT 0,0,0, tableoid,oid,0, 'p' "
16691671
" FROM pg_amproc;\n\n",

src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 201605051
56+
#define CATALOG_VERSION_NO 201605191
5757

5858
#endif

0 commit comments

Comments
 (0)