Re: splitting htup.h
От | Alvaro Herrera |
---|---|
Тема | Re: splitting htup.h |
Дата | |
Msg-id | 1346186341-sup-2005@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: splitting htup.h (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: splitting htup.h
Re: splitting htup.h |
Список | pgsql-hackers |
Here's a third version with which I'm much happier. This patch is mainly doing four things: 1. take some typedefs and the HeapTupleData struct definition from access/htup.h, and put them in access/tupbasics.h. This new file is used as #include in all headers instead of htup.h. 2. take out catcache.h from syscache.h; in its stead, we add a forward struct declaration of struct catclist. This was proposed by Andres Freund and Peter Geogeghan previously, and it turns out to be convenient as well as foreseen by older comments in syscache.h. It limits proliferation of other unnecessary headers in catcache.h as well. 3. split resowner.h creating resowner_private.h. Files that just want to create and use ResourceOwners can include the thinner resowner.h; those that have stuff managed within a ResOwner use the other file. This limits proliferation of lots of other header inclusion. 4. split the Xlog stuff out of heapam.h into heapam_xlog.h. The number of src/backend files that depend on some src/include/ files: access/heapam.h 216 access/heapam_xlog.h 12 access/htup.h 182 access/tupbasics.h 401 utils/resowner.h 74 utils/resowner_private.h 10 utils/catcache.h 23 utils/syscache.h 230 It seems pretty clear that all these the splits are useful. I'm unsure about the "tupbasics.h" file name. I'm open to better ideas. The other two new files seem good enough that no bikeshedding seems really necessary. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: