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

Commit2959213

Browse files
committed
pg_stat_statements: Add a comment about the dangers of padding bytes.
Inspired by a patch from Julien Rouhaud, but I reworded it.Discussion:http://postgr.es/m/CAOBaU_a8AH8=ypfqgHnDYu06ts+jWTUgh=VgCxA3yNV-K10j9w@mail.gmail.com
1 parente250c8c commit2959213

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ typedef enum pgssVersion
125125
/*
126126
* Hashtable key that defines the identity of a hashtable entry. We separate
127127
* queries by user and by database even if they are otherwise identical.
128+
*
129+
* Right now, this structure contains no padding. If you add any, make sure
130+
* to teach pgss_store() to zero the padding bytes. Otherwise, things will
131+
* break, because pgss_hash is created using HASH_BLOBS, and thus tag_hash
132+
* is used to hash this.
128133
*/
129134
typedefstructpgssHashKey
130135
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp