Re: Weird prepared stmt behavior
От | Tom Lane |
---|---|
Тема | Re: Weird prepared stmt behavior |
Дата | |
Msg-id | 14236.1083602240@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Weird prepared stmt behavior (Alvaro Herrera <alvherre@dcc.uchile.cl>) |
Ответы |
Re: Weird prepared stmt behavior
|
Список | pgsql-hackers |
> On Sat, May 01, 2004 at 10:16:56PM -0000, Greg Sabino Mullane wrote: >> I am very uneasy about this. Statements should stay invalidated, else >> the prepared statement may no longer even do what was originally >> intended when it was first created. I think Greg's concern is overblown, and would result in an effectively unusable facility if we did implement it that way. As an example, adding an index to a table *should* result in flushing of cached plans for that table (maybe the query can make good use of the new index), but people would be quite unhappy if already-prepared statements for the table just stopped working. More generally, the flush mechanism will probably be written in a way that causes plan flushes to occur for events that aren't even user-visible --- such as VACUUM FULL relocating the catalog tuple that describes an object used by the plan. If we re-parse from source then we will detect any changes that make the query visibly incorrect. I don't really see that the user can have any beef if he continues to use a prepared statement whose source text would have a valid but incompatible meaning due to changes elsewhere. regards, tom lane
В списке pgsql-hackers по дате отправления: