diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-10-02 21:14:11 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-10-02 21:14:11 +0000 |
commit | c3110e49b1601941e0173e8d75378f943b4ca6fd (patch) | |
tree | 3cb0a453fe9e193f38e8796e9281c8274bc96f28 /src/backend/access/nbtree/nbtinsert.c | |
parent | ac317a8474e7c2e2c67ee37f8cb1a6511eb662d9 (diff) |
Make sure that GIN fast-insert and regular code paths enforce the same
tuple size limit. Improve the error message for index-tuple-too-large
so that it includes the actual size, the limit, and the index name.
Sync with the btree occurrences of the same error.
Back-patch to 8.4 because it appears that the out-of-sync problem
is occurring in the field.
Teodor and Tom
Diffstat (limited to 'src/backend/access/nbtree/nbtinsert.c')
-rw-r--r-- | src/backend/access/nbtree/nbtinsert.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index a06faa20203..ac2b13f5aa7 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.170 2009/06/11 14:48:54 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.170.2.1 2009/10/02 21:14:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -418,9 +418,10 @@ _bt_findinsertloc(Relation rel, if (itemsz > BTMaxItemSize(page)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %lu exceeds btree maximum, %lu", + errmsg("index row size %lu exceeds maximum %lu for index \"%s\"", (unsigned long) itemsz, - (unsigned long) BTMaxItemSize(page)), + (unsigned long) BTMaxItemSize(page), + RelationGetRelationName(rel)), errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n" "Consider a function index of an MD5 hash of the value, " "or use full text indexing."))); |