Skip to content

Commit 8029e61

Browse files
committed
fix initialization of pgspHashKey structure
1 parent a073869 commit 8029e61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pg_store_plans.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ _PG_init(void)
548548

549549
EmitWarningsOnPlaceholders("pg_store_plans");
550550

551-
#if PG_VERSION_NUM < 150000
551+
#if PG_VERSION_NUM < 150000
552552
pgsp_shmem_request();
553553
#endif
554554

@@ -1204,7 +1204,7 @@ pgsp_store(char *plan, queryid_t queryId,
12041204
double total_time, uint64 rows,
12051205
const BufferUsage *bufusage)
12061206
{
1207-
pgspHashKey key;
1207+
pgspHashKey key = {};
12081208
pgspEntry *entry;
12091209
char *norm_query = NULL;
12101210
int plan_len;
@@ -1292,7 +1292,7 @@ pgsp_store(char *plan, queryid_t queryId,
12921292
/* shorten_plan is terminated by NUL */
12931293
if (plan_storage == PLAN_STORAGE_SHMEM)
12941294
memcpy(SHMEM_PLAN_PTR(entry), shorten_plan, plan_len + 1);
1295-
1295+
12961296

12971297
/* If needed, perform garbage collection while exclusive lock held */
12981298
if (do_gc)

0 commit comments

Comments
 (0)