Re: [PERFORM] optimizing immutable vs. stable function calls?
От
Karl Czajkowski
Тема
Re: [PERFORM] optimizing immutable vs. stable function calls?
Дата
Msg-id
20170119024512.GE23081@moraine.isi.edu
Ответ на
Список
Дерево обсуждения
Re: [PERFORM] optimizing immutable vs. stable function calls? Tom Lane <tgl@sss.pgh.pa.us>
Re: [PERFORM] optimizing immutable vs. stable function calls? Karl Czajkowski <karlcz@isi.edu>
Re: [PERFORM] optimizing immutable vs. stable function calls? Tom Lane <tgl@sss.pgh.pa.us>
Re: [PERFORM] optimizing immutable vs. stable function calls? Karl Czajkowski <karlcz@isi.edu>
Re: [PERFORM] optimizing immutable vs. stable function calls? "David G. Johnston" <david.g.johnston@gmail.com>
Re: [PERFORM] optimizing immutable vs. stable function calls? Tom Lane <tgl@sss.pgh.pa.us>
Re: [PERFORM] optimizing immutable vs. stable function calls? "David G. Johnston" <david.g.johnston@gmail.com>
Re: [PERFORM] optimizing immutable vs. stable function calls? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: [PERFORM] optimizing immutable vs. stable function calls? Merlin Moncure <mmoncure@gmail.com>
On Jan 18, Tom Lane modulated: > Karl Czajkowski writes: > > Is there a correctness hazard with pretending our function is > > IMMUTABLE, even though we will change the underlying config parameter > > in the same connection? > > You could probably get away with that if you never ever use prepared > queries (beware that almost anything in plpgsql is a prepared query). > It's a trick that's likely to bite you eventually though. > That sounds unnerving. I think I need to play it safe. :-/ Does the plan cache disappear with each connection/backend process? Or is there also a risk of plans being shared between backends? Would it be invasive or a small hack to have something like "transaction-immutable" which can be precomputed during planning, like immutable, but then must discard those plans at the end of the transaction...? karl
В списке pgsql-performance по дате отправления
От: David G. Johnston
Дата: