Content-Length: 253963 | pFad | http://github.com/tonybelloni/postgres/commit/2959213bf33cf7d2d1fc0b46c67d36254ffe043f

3B pg_stat_statements: Add a comment about the dangers of padding bytes. · tonybelloni/postgres@2959213 · GitHub
Skip to content

Commit 2959213

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 parent e250c8c commit 2959213

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

+5
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
typedef struct pgssHashKey
130135
{

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/tonybelloni/postgres/commit/2959213bf33cf7d2d1fc0b46c67d36254ffe043f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy