[PATCH] Referenced generic plan mode - Mailing list pgsql-hackers

From Vlada Pogozhelskaya
Subject [PATCH] Referenced generic plan mode
Date
Msg-id 19919494-92a8-4905-a250-6cf17b89f7c3@gmail.com
Whole thread Raw
List pgsql-hackers

Hi all,

I’d like to propose a patch that introduces a referenced generic plan mode.

The patch adds:

  • new EXPLAIN option REF_GENERIC_PLAN (not allowed with ANALYZE);

  • new plan_cache_mode values ref_auto and force_ref_generic_plan;

  • a flag to prevent constant folding of Params when building a generic plan.

Generic and custom plan behavior stays unchanged unless the new option is used.
Similar ideas exist in other systems: Oracle (Adaptive Cursor Sharing), SQL Server (Parameter Sensitive Plan Optimization), and Db2 (REOPT).

I’ve attached the patch and a minimal regression test.

Best regards,
Vlada Pogozhelskaya

Attachment

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Inconsistent update in the MERGE command
Next
From: Fabrice Chapuis
Date:
Subject: issue with synchronized_standby_slots