Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix initialization of pgspHashKey structure #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pg_store_plans.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ _PG_init(void)

EmitWarningsOnPlaceholders("pg_store_plans");

#if PG_VERSION_NUM < 150000
#if PG_VERSION_NUM < 150000
pgsp_shmem_request();
#endif

Expand Down Expand Up @@ -1204,7 +1204,7 @@ pgsp_store(char *plan, queryid_t queryId,
double total_time, uint64 rows,
const BufferUsage *bufusage)
{
pgspHashKey key;
pgspHashKey key = {};
pgspEntry *entry;
char *norm_query = NULL;
int plan_len;
Expand Down Expand Up @@ -1292,7 +1292,7 @@ pgsp_store(char *plan, queryid_t queryId,
/* shorten_plan is terminated by NUL */
if (plan_storage == PLAN_STORAGE_SHMEM)
memcpy(SHMEM_PLAN_PTR(entry), shorten_plan, plan_len + 1);


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