Thread
-
Re: splitting *_desc routines
Alvaro Herrera <alvherre@2ndquadrant.com> — 2012-11-27T16:10:22Z
Simon Riggs escribió: > On 23 November 2012 22:52, Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > > > ./access/rmgrdesc/xact_desc.c > > ./access/rmgrdesc/heapdesc.c > > Could we have either all underscores _ or none at all for the naming? Sure, removed them all. Tom Lane escribió: > FWIW, I'd vote for dumping all of these into *one* rmgrdesc directory > (which may as well be under access/ since that's where the xlog code is), > regardless of where the corresponding replay code is in the source tree. > I don't think splitting them up into half a dozen directories adds > anything except confusion. If you want, the header comment for each > file could mention where the corresponding replay code lives. Done that way. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
-
Re: splitting *_desc routines
Tom Lane <tgl@sss.pgh.pa.us> — 2012-11-27T16:34:38Z
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > Tom Lane escribi: >> FWIW, I'd vote for dumping all of these into *one* rmgrdesc directory >> (which may as well be under access/ since that's where the xlog code is), >> regardless of where the corresponding replay code is in the source tree. >> I don't think splitting them up into half a dozen directories adds >> anything except confusion. If you want, the header comment for each >> file could mention where the corresponding replay code lives. > Done that way. Looks pretty sane to me. The only thing that seems worth discussing is whether to put the smgr-related XLOG record declarations in storage.h as you have here, or to invent a new, more private header for them. There are XLOG record declarations cluttering a lot of other fairly public headers; but given that we've invented files like heapam_xlog.h of late, maybe we should start trying to push those declarations to less-visible spots. Or maybe it's not worth the trouble. regards, tom lane
-
Re: splitting *_desc routines
Alvaro Herrera <alvherre@2ndquadrant.com> — 2012-11-27T19:54:03Z
Tom Lane escribió: > Alvaro Herrera <alvherre@2ndquadrant.com> writes: > > Tom Lane escribi: > >> FWIW, I'd vote for dumping all of these into *one* rmgrdesc directory > >> (which may as well be under access/ since that's where the xlog code is), > >> regardless of where the corresponding replay code is in the source tree. > >> I don't think splitting them up into half a dozen directories adds > >> anything except confusion. If you want, the header comment for each > >> file could mention where the corresponding replay code lives. > > > Done that way. > > Looks pretty sane to me. The only thing that seems worth discussing is > whether to put the smgr-related XLOG record declarations in storage.h > as you have here, or to invent a new, more private header for them. > > There are XLOG record declarations cluttering a lot of other fairly > public headers; but given that we've invented files like heapam_xlog.h > of late, maybe we should start trying to push those declarations to > less-visible spots. Or maybe it's not worth the trouble. I think it makes sense in the long term to separate things, even if we don't go out of our ways in the current patch to clean all existing uses. It's fairly simple for the case at hand (attached). With this there are a couple of files that don't need storage.h anymore (only storage_xlog.h). Not a mind-boggling change, I admit. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services