Skip to content

Commit e1d567b

Browse files
kayformPostgreSQL Server
authored andcommitted
Prevent abnormal termination due to plan text read failure when pg_store_plans.plan_storage=file and pgsp_plan_texts.stat is deleted.
1 parent 443ff6d commit e1d567b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pg_store_plans.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,6 +1612,9 @@ pg_store_plans_internal(FunctionCallInfo fcinfo,
16121612
else
16131613
pstr = SHMEM_PLAN_PTR(entry);
16141614

1615+
if (pstr == NULL)
1616+
continue; /* Ignore any entries with bogus texts */
1617+
16151618
switch (plan_format)
16161619
{
16171620
case PLAN_FORMAT_TEXT:

0 commit comments

Comments
 (0)