Re: [HACKERS] [PATCH] XLogReader v2

2012-09-09 Thread Andres Freund
On Sunday, September 09, 2012 08:40:38 PM Tom Lane wrote: > Andres Freund writes: > > On Tuesday, September 04, 2012 09:33:54 PM Alvaro Herrera wrote: > >> * There are way too many #ifdef VERBOSE_DEBUG stuff for my taste. It > >> might look better if you had macros such as elog_debug() that are >

Re: [HACKERS] [PATCH] XLogReader v2

2012-09-09 Thread Tom Lane
Andres Freund writes: > On Tuesday, September 04, 2012 09:33:54 PM Alvaro Herrera wrote: >> * There are way too many #ifdef VERBOSE_DEBUG stuff for my taste. It >> might look better if you had macros such as elog_debug() that are defined >> to empty if VERBOSE_DEBUG is not defined. (The problem

Re: [HACKERS] [PATCH] XLogReader v2

2012-09-09 Thread Andres Freund
Hi Alvaro, hi all, On Tuesday, September 04, 2012 09:33:54 PM Alvaro Herrera wrote: > Excerpts from Andres Freund's message of jue jul 19 06:29:03 -0400 2012: > > Hi, > > > > Attached is v2 of the patch. > > Hello, > > I gave this code a quick read some days ago. Here's the stuff I would > cha

Re: [HACKERS] [PATCH] XLogReader v2

2012-09-04 Thread Alvaro Herrera
Excerpts from Andres Freund's message of jue jul 19 06:29:03 -0400 2012: > Hi, > > Attached is v2 of the patch. Hello, I gave this code a quick read some days ago. Here's the stuff I would change: * There are way too many #ifdef VERBOSE_DEBUG stuff for my taste. It might look better if you ha

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Robert Haas
On Mon, Jul 23, 2012 at 1:03 PM, Satoshi Nagayasu wrote: >> The stringinfo thing has long been an annoyance to me. libpq has >> PQExpBuffer which is the exact same thing. I don't like that we have >> two implementations of that in two different code bases, and you have >> to remember to spell it

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Satoshi Nagayasu
2012/07/24 1:15, Robert Haas wrote: On Mon, Jul 23, 2012 at 12:13 PM, Andres Freund wrote: Could that be fixed by moving the debugging routines into a separate set of files, instead of having them lumped in with the code that applies those xlog records? Its a major effort. Those function use e

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Robert Haas
On Mon, Jul 23, 2012 at 12:13 PM, Andres Freund wrote: >> Could that be fixed by moving the debugging routines into a separate >> set of files, instead of having them lumped in with the code that >> applies those xlog records? > Its a major effort. Those function use elog(), stringinfo and lots of

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Andres Freund
On Monday, July 23, 2012 05:11:20 PM Robert Haas wrote: > On Mon, Jul 23, 2012 at 11:04 AM, Andres Freund wrote: > > On Monday, July 23, 2012 04:17:39 PM Robert Haas wrote: > >> On Mon, Jul 23, 2012 at 3:19 AM, Andres Freund > > > > wrote: > >> > On Thursday, July 19, 2012 07:18:08 PM Satoshi N

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Robert Haas
On Mon, Jul 23, 2012 at 11:04 AM, Andres Freund wrote: > On Monday, July 23, 2012 04:17:39 PM Robert Haas wrote: >> On Mon, Jul 23, 2012 at 3:19 AM, Andres Freund > wrote: >> > On Thursday, July 19, 2012 07:18:08 PM Satoshi Nagayasu wrote: >> >> I agree with that we need more sophisticated way to

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Andres Freund
On Monday, July 23, 2012 04:17:39 PM Robert Haas wrote: > On Mon, Jul 23, 2012 at 3:19 AM, Andres Freund wrote: > > On Thursday, July 19, 2012 07:18:08 PM Satoshi Nagayasu wrote: > >> I agree with that we need more sophisticated way to share the code > >> between the backend and several utilities

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Robert Haas
On Mon, Jul 23, 2012 at 3:19 AM, Andres Freund wrote: > On Thursday, July 19, 2012 07:18:08 PM Satoshi Nagayasu wrote: >> I agree with that we need more sophisticated way to share the code >> between the backend and several utilities (including xlogdump), >> but AFAIK, a contrib module must allow

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-23 Thread Andres Freund
Hi, On Thursday, July 19, 2012 07:18:08 PM Satoshi Nagayasu wrote: > I agree with that we need more sophisticated way to share the code > between the backend and several utilities (including xlogdump), > but AFAIK, a contrib module must allow to be built *without* the core > source tree. I don't t

Re: [HACKERS] [PATCH] XLogReader v2

2012-07-19 Thread Satoshi Nagayasu
2012/07/19 19:29, Andres Freund wrote: Hi, Attached is v2 of the patch. Changes are: * more comments * significantly cleaned/simpliefied coded * crc validation * addition of XLogReaderReadOne Definitely needed are: * better validation of records * customizable error handling The first is just