https://www.postgresql.org/docs/current/spi-spi-prepare-extended.html
SUMMARY: just setup a _SPI_plan
in memory
SPI_prepare_extended
// switch to executor memory context
_SPI_begin_call
**_SPI_prepare_plan**
// switch to old memory context
_SPI_end_call
_SPI_prepare_plan
raw_parser
analyze_and_rewrite
CompleteCachedPlan