Commit 2959213b authored by Robert Haas's avatar Robert Haas

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
parent e250c8c8
...@@ -125,6 +125,11 @@ typedef enum pgssVersion ...@@ -125,6 +125,11 @@ typedef enum pgssVersion
/* /*
* Hashtable key that defines the identity of a hashtable entry. We separate * Hashtable key that defines the identity of a hashtable entry. We separate
* queries by user and by database even if they are otherwise identical. * queries by user and by database even if they are otherwise identical.
*
* Right now, this structure contains no padding. If you add any, make sure
* to teach pgss_store() to zero the padding bytes. Otherwise, things will
* break, because pgss_hash is created using HASH_BLOBS, and thus tag_hash
* is used to hash this.
*/ */
typedef struct pgssHashKey typedef struct pgssHashKey
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment