Re: Plan invalidation vs. unnamed prepared statements

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Plan invalidation vs. unnamed prepared statements
Дата
Msg-id 87fy8i9rkv.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Plan invalidation vs. unnamed prepared statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Plan invalidation vs. unnamed prepared statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> B. Don't store the unnamed statement in the plan cache.  To make sure
> it's not used anymore when the plan might be stale, forcibly discard
> the unnamed statement after execution.  This would get rid of a lot
> of overhead but would mean a significant change in the protocol-level
> behavior.  It's hard to guess how many clients might be broken by it
> --- conceivably not any, but that seems too optimistic :-(

Can we forcibly discard it if *any* messages are received that might
invalidate a plan? So basically it would work fine unless anyone in the system
does any DDL at all? I guess that has the downside of introducing random
unpredictable failures.

Or stash the query string and replan it (possibly in the query cache this
time) if someone executes it a second time?

Can't say I like either of those options much, just trying to brainstorm.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL - 'SKYLINE OF' clause added!
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Bug: Buffer cache is not scan resistant