PG-1907 Use int64 instead of uint64 for ids

There is no need to use unsigned values for hash ids as we cast them to
signed values in SQL output anyways.
This commit is contained in:
Artem Gavrilov
2025-09-09 17:59:10 +02:00
committed by Artem Gavrilov
parent e032dfaa6d
commit f5003d3000
2 changed files with 47 additions and 48 deletions

View File

@@ -184,7 +184,7 @@ typedef struct CallTime
typedef struct PlanInfo
{
uint64 planid; /* plan identifier */
int64 planid; /* plan identifier */
char plan_text[PLAN_TEXT_LEN]; /* plan text */
size_t plan_len; /* strlen(plan_text) */
} PlanInfo;
@@ -192,14 +192,14 @@ typedef struct PlanInfo
typedef struct pgsmHashKey
{
uint64 bucket_id; /* bucket number */
uint64 queryid; /* query identifier */
uint64 planid; /* plan identifier */
uint64 appid; /* hash of application name */
int64 queryid; /* query identifier */
int64 planid; /* plan identifier */
int64 appid; /* hash of application name */
Oid userid; /* user OID */
Oid dbid; /* database OID */
uint32 ip; /* client ip address */
bool toplevel; /* query executed at top level */
uint64 parentid; /* parent queryid of current query */
int64 parentid; /* parent queryId of current query */
} pgsmHashKey;
typedef struct QueryInfo
@@ -337,7 +337,7 @@ typedef struct Counters
typedef struct pgsmEntry
{
pgsmHashKey key; /* hash key of entry - MUST BE FIRST */
uint64 pgsm_query_id; /* pgsm generate normalized query hash */
int64 pgsm_query_id; /* pgsm generate normalized query hash */
char datname[NAMEDATALEN]; /* database name */
char username[NAMEDATALEN]; /* user name */
Counters counters; /* the statistics for this query */