Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5cf785a

Browse files
committed
Include hash table name in all the internal-error elog messages in
dynahash.c. Sergey Koposov's current open problem shows the possibleusefulness of this, and it doesn't add much code.
1 parent476045a commit5cf785a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎src/backend/utils/hash/dynahash.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* 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 $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -416,7 +416,7 @@ hash_create(const char *tabname, long nelem, HASHCTL *info, int flags)
416416

417417
/* Build the hash directory structure */
418418
if (!init_htab(hashp,nelem))
419-
elog(ERROR,"failed to initialize hash table");
419+
elog(ERROR,"failed to initialize hash table \"%s\"",hashp->tabname);
420420

421421
/*
422422
* For a shared hash table, preallocate the requested number of elements.
@@ -909,7 +909,8 @@ hash_search_with_hash_value(HTAB *hashp,
909909

910910
/* disallow inserts if frozen */
911911
if (hashp->frozen)
912-
elog(ERROR,"cannot insert into a frozen hashtable");
912+
elog(ERROR,"cannot insert into frozen hashtable \"%s\"",
913+
hashp->tabname);
913914

914915
currBucket=get_hash_entry(hashp);
915916
if (currBucket==NULL)
@@ -1154,9 +1155,10 @@ void
11541155
hash_freeze(HTAB*hashp)
11551156
{
11561157
if (hashp->isshared)
1157-
elog(ERROR,"cannot freeze shared hashtable");
1158+
elog(ERROR,"cannot freeze shared hashtable \"%s\"",hashp->tabname);
11581159
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);
11601162
hashp->frozen= true;
11611163
}
11621164

@@ -1432,7 +1434,8 @@ static void
14321434
register_seq_scan(HTAB*hashp)
14331435
{
14341436
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);
14361439
seq_scan_tables[num_seq_scans]=hashp;
14371440
seq_scan_level[num_seq_scans]=GetCurrentTransactionNestLevel();
14381441
num_seq_scans++;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp