Re: Changeset Extraction v7.5
От | Andres Freund |
---|---|
Тема | Re: Changeset Extraction v7.5 |
Дата | |
Msg-id | 20140212155609.GA3391@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Changeset Extraction v7.5 (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On 2014-02-11 11:22:24 -0500, Robert Haas wrote: > + context = AllocSetContextCreate(CurrentMemoryContext, > + > "Changeset Extraction Context", > + > ALLOCSET_DEFAULT_MINSIZE, > + > ALLOCSET_DEFAULT_INITSIZE, > + > ALLOCSET_DEFAULT_MAXSIZE); > > I have my doubts about whether it's wise to make this the child of > CurrentMemoryContext. Certainly, if we do that, then expectations > around what that context is need to be documented. Short-lived > contexts are presumably unsuitable. Well, it depends on the type of usage. In the walsender, yes, it needs to be a longliving context. Not so much in the SQL case, inside the SRF we spill all the data into a tuplestore after which we are done. I don't see which context would be more suitable as a default parent; it used to be TopMemoryContext but that requires pointless cleanup routines to handle errors... So I think documenting the requirement is the best way? I'm working on the other comments, pushing individual changes to git. Will send a new version onlist once I'm through. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: