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

Commit957075d

Browse files
author
Sergey Shinderuk
committed
Pass HASH_BLOBS to hash_create() instead of expicit tag_hash
As per hash_create docs:> Note: It is deprecated for callers of hash_create() to explicitly specify> string_hash, tag_hash, uint32_hash, or oid_hash. Just set HASH_STRINGS or> HASH_BLOBS. Use HASH_FUNCTION only when you want something other than> one of these.Also there is no need to explicitly specify TopMemoryContext as it isused by default.
1 parent09463b6 commit957075d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎collector.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include<signal.h>
1313

14-
#include"common/hashfn.h"
1514
#include"compat.h"
1615
#include"miscadmin.h"
1716
#include"pg_wait_sampling.h"
@@ -288,17 +287,14 @@ make_profile_hash()
288287
{
289288
HASHCTLhash_ctl;
290289

291-
hash_ctl.hash=tag_hash;
292-
hash_ctl.hcxt=TopMemoryContext;
293-
294290
if (pgws_profileQueries)
295291
hash_ctl.keysize= offsetof(ProfileItem,count);
296292
else
297293
hash_ctl.keysize= offsetof(ProfileItem,queryId);
298294

299295
hash_ctl.entrysize=sizeof(ProfileItem);
300296
returnhash_create("Waits profile hash",1024,&hash_ctl,
301-
HASH_FUNCTION |HASH_ELEM);
297+
HASH_ELEM |HASH_BLOBS);
302298
}
303299

304300
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp