Skip to content

Commit e24c3dd

Browse files
authored
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 a073869 commit e24c3dd

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
@@ -1579,6 +1579,9 @@ pg_store_plans_internal(FunctionCallInfo fcinfo,
15791579
else
15801580
pstr = SHMEM_PLAN_PTR(entry);
15811581

1582+
if (pstr == NULL)
1583+
continue; /* Ignore any entries with bogus texts */
1584+
15821585
switch (plan_format)
15831586
{
15841587
case PLAN_FORMAT_TEXT:

0 commit comments

Comments
 (0)