Re: Deferring some AtStart* allocations?
От | Andres Freund |
---|---|
Тема | Re: Deferring some AtStart* allocations? |
Дата | |
Msg-id | 20140630001931.GH21422@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: Deferring some AtStart* allocations? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Deferring some AtStart* allocations?
|
Список | pgsql-hackers |
On 2014-06-29 19:52:23 -0400, Tom Lane wrote: > Andres Freund <andres@2ndquadrant.com> writes: > > Why aren't we delaying allocations in e.g. AtStart_Inval(), > > AfterTriggerBeginXact() to when the data structures are acutally used? > > Aren't we? Neither of those would be doing much work certainly. They are perhaps not doing much in absolute terms, but it's a fair share of the processing overhead for simple statements. AfterTriggerBeginXact() is called unconditionally from StartTransaction() and does three MemoryContextAlloc()s. AtStart_Inval() one. I think they should just be initialized whenever the memory is used? Doesn't look too complicated to me. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: