Re: [PATCHES] Moving snapshot code around

2008-03-26 Thread Alvaro Herrera
Tom Lane wrote: I think thinking of snapshot.h as an external interface is wrongheaded. In the proposed refactoring, snapshot.h is concerned with snapshot *management* (creating, copying, deleting) while tqual.h is concerned with tuple visibility testing (which requires a snapshot as an

Re: [PATCHES] Moving snapshot code around

2008-03-26 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Agreed, it makes a lot more sense considered in this light. I renamed snapshot.{c,h} into snapmgmt.{c,h}, hopefully making the intent clearer. I'd have gone with snapmgr.h/c for consistency with existing filenames (bufmgr, lmgr, etc). One thing I'm

Re: [PATCHES] Moving snapshot code around

2008-03-26 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Agreed, it makes a lot more sense considered in this light. I renamed snapshot.{c,h} into snapmgmt.{c,h}, hopefully making the intent clearer. I'd have gone with snapmgr.h/c for consistency with existing filenames (bufmgr, lmgr,

Re: [PATCHES] Moving snapshot code around

2008-03-26 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: I'd have gone with snapmgr.h/c for consistency with existing filenames (bufmgr, lmgr, etc). Doh! Sorry. We're at the best time for changing the name, since the file has no history. Shall I? +1 I don't like that very much. What

Re: [PATCHES] Moving snapshot code around

2008-03-26 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: I'd have gone with snapmgr.h/c for consistency with existing filenames (bufmgr, lmgr, etc). Doh! Sorry. We're at the best time for changing the name, since the file has no history. Shall I? +1 Done. --

Re: [PATCHES] Moving snapshot code around

2008-03-26 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: I don't like that very much. What about just moving the HTSU_Result enum's declaration somewhere else? Two possibilities are heapam.h itself, or the new snapshot.h file (which'd then have to be included by

Re: [PATCHES] Moving snapshot code around

2008-03-25 Thread Neil Conway
On Tue, 2008-03-18 at 16:19 -0300, Alvaro Herrera wrote: The other approach, of course, is to just keep all the code in tqual.c and not create a separate module at all. Opinions? I prefer to keep them separate, but I'm not wedded to it if there's any strong reason not to do it. Also, the

Re: [PATCHES] Moving snapshot code around

2008-03-25 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: On Tue, 2008-03-18 at 16:19 -0300, Alvaro Herrera wrote: The other approach, of course, is to just keep all the code in tqual.c and not create a separate module at all. Opinions? I prefer to keep them separate, but I'm not wedded to it if there's any

Re: [PATCHES] Moving snapshot code around

2008-03-20 Thread Simon Riggs
On Tue, 2008-03-18 at 16:19 -0300, Alvaro Herrera wrote: I'm playing with the snapshot code to create a new module to stash used snapshots and refcount them. Sounds good. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com PostgreSQL UK 2008 Conference:

[PATCHES] Moving snapshot code around

2008-03-18 Thread Alvaro Herrera
Hi, I'm playing with the snapshot code to create a new module to stash used snapshots and refcount them. It occured to me that a first easy step is to separate the relevant code from tqual.c into a new file, snapshot.c, and split tqual.h in two creating snapshot.h. Basically the internals of