|
26 | 26 | * |
27 | 27 | * |
28 | 28 | * IDENTIFICATION |
29 | | - * $PostgreSQL: pgsql/src/backend/utils/hash/dynahash.c,v 1.75 2007/04/26 23:24:44 tgl Exp $ |
| 29 | + * $PostgreSQL: pgsql/src/backend/utils/hash/dynahash.c,v 1.76 2007/09/11 16:17:46 tgl Exp $ |
30 | 30 | * |
31 | 31 | *------------------------------------------------------------------------- |
32 | 32 | */ |
@@ -416,7 +416,7 @@ hash_create(const char *tabname, long nelem, HASHCTL *info, int flags) |
416 | 416 |
|
417 | 417 | /* Build the hash directory structure */ |
418 | 418 | if (!init_htab(hashp,nelem)) |
419 | | -elog(ERROR,"failed to initialize hash table"); |
| 419 | +elog(ERROR,"failed to initialize hash table \"%s\"",hashp->tabname); |
420 | 420 |
|
421 | 421 | /* |
422 | 422 | * For a shared hash table, preallocate the requested number of elements. |
@@ -909,7 +909,8 @@ hash_search_with_hash_value(HTAB *hashp, |
909 | 909 |
|
910 | 910 | /* disallow inserts if frozen */ |
911 | 911 | if (hashp->frozen) |
912 | | -elog(ERROR,"cannot insert into a frozen hashtable"); |
| 912 | +elog(ERROR,"cannot insert into frozen hashtable \"%s\"", |
| 913 | +hashp->tabname); |
913 | 914 |
|
914 | 915 | currBucket=get_hash_entry(hashp); |
915 | 916 | if (currBucket==NULL) |
@@ -1154,9 +1155,10 @@ void |
1154 | 1155 | hash_freeze(HTAB*hashp) |
1155 | 1156 | { |
1156 | 1157 | if (hashp->isshared) |
1157 | | -elog(ERROR,"cannot freeze shared hashtable"); |
| 1158 | +elog(ERROR,"cannot freeze shared hashtable \"%s\"",hashp->tabname); |
1158 | 1159 | if (!hashp->frozen&&has_seq_scans(hashp)) |
1159 | | -elog(ERROR,"cannot freeze hashtable with active scans"); |
| 1160 | +elog(ERROR,"cannot freeze hashtable \"%s\" because it has active scans", |
| 1161 | +hashp->tabname); |
1160 | 1162 | hashp->frozen= true; |
1161 | 1163 | } |
1162 | 1164 |
|
@@ -1432,7 +1434,8 @@ static void |
1432 | 1434 | register_seq_scan(HTAB*hashp) |
1433 | 1435 | { |
1434 | 1436 | if (num_seq_scans >=MAX_SEQ_SCANS) |
1435 | | -elog(ERROR,"too many active hash_seq_search scans"); |
| 1437 | +elog(ERROR,"too many active hash_seq_search scans, cannot start one on \"%s\"", |
| 1438 | +hashp->tabname); |
1436 | 1439 | seq_scan_tables[num_seq_scans]=hashp; |
1437 | 1440 | seq_scan_level[num_seq_scans]=GetCurrentTransactionNestLevel(); |
1438 | 1441 | num_seq_scans++; |
|