Re: [HACKERS] Assert Levels

2008-09-21 Thread Peter Eisentraut
Simon Riggs wrote: Well, we don't. That's why I'd suggest to do it slowly and classify everything as medium weight until proven otherwise. Once you have classified all asserts, what do we do with the result? What would be the practical impact? What would be your recommendation about who

Re: [HACKERS] Assert Levels

2008-09-21 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Simon Riggs wrote: Well, we don't. That's why I'd suggest to do it slowly and classify everything as medium weight until proven otherwise. Once you have classified all asserts, what do we do with the result? What would be the practical impact?

Re: [HACKERS] Assert Levels

2008-09-21 Thread Tom Lane
Greg Smith [EMAIL PROTECTED] writes: The next time I'm doing some performance testing I'll try to quantify how much damage the expensive ones do by playing with pg_config_manual.h. Normally I'm testing with 1GB+ of shared_buffers which makes the current assert scheme unusable. There is a

Re: [HACKERS] Assert Levels

2008-09-21 Thread Greg Smith
On Fri, 19 Sep 2008, Tom Lane wrote: Well, there are certain things that --enable-cassert turns on that are outrageously expensive...I don't think anyone knows what the performance impact of just the regular Asserts is; it's been too long since these other things were stuck in there. The

Re: [HACKERS] Assert Levels

2008-09-20 Thread Simon Riggs
On Fri, 2008-09-19 at 17:33 -0400, Greg Smith wrote: On Fri, 19 Sep 2008, Greg Stark wrote: This is a good example of why running with assertions enabled on production might not be a good idea. But it's also a good example of why we should do our performance testing with assertions

Re: [HACKERS] Assert Levels

2008-09-20 Thread Simon Riggs
On Fri, 2008-09-19 at 17:47 -0400, Tom Lane wrote: Greg Smith [EMAIL PROTECTED] writes: On Fri, 19 Sep 2008, Greg Stark wrote: This is a good example of why running with assertions enabled on production might not be a good idea. But it's also a good example of why we should do our

Re: [HACKERS] Assert Levels

2008-09-20 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: On Fri, 2008-09-19 at 17:47 -0400, Tom Lane wrote: Well, there are certain things that --enable-cassert turns on that are outrageously expensive; notably CLOBBER_FREED_MEMORY and MEMORY_CONTEXT_CHECKING. It wouldn't be too unreasonable to decouple those

Re: [HACKERS] Assert Levels

2008-09-20 Thread Simon Riggs
On Sat, 2008-09-20 at 11:28 -0400, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: On Fri, 2008-09-19 at 17:47 -0400, Tom Lane wrote: Well, there are certain things that --enable-cassert turns on that are outrageously expensive; notably CLOBBER_FREED_MEMORY and

[HACKERS] Assert Levels

2008-09-19 Thread Simon Riggs
Currently we have only Assert(), or a run-time test. Can we introduce levels of assertion? That way we can choose how paranoid a build to make, like setting log_min_messages. We know many Assertions are costly, so we don't usually do performance tests with --enable-cassert. But then we may not

Re: [HACKERS] Assert Levels

2008-09-19 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: Can we introduce levels of assertion? The thing that is good about Assert() is that it doesn't require a lot of programmer effort to put one in. I'm not in favor of complexifying it. regards, tom lane -- Sent via pgsql-hackers

Re: [HACKERS] Assert Levels

2008-09-19 Thread Greg Stark
greg On 19 Sep 2008, at 13:20, Tom Lane [EMAIL PROTECTED] wrote: Simon Riggs [EMAIL PROTECTED] writes: Can we introduce levels of assertion? The thing that is good about Assert() is that it doesn't require a lot of programmer effort to put one in. I'm not in favor of complexifying it.

Re: [HACKERS] Assert Levels

2008-09-19 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: You'll also have to do enough empirical tests to convince people that a --enable-cheap-casserts build really does perform the same as a regular build. I don't think performance is even the main issue. We have never recommended having Asserts on in

Re: [HACKERS] Assert Levels

2008-09-19 Thread Greg Stark
greg On 19 Sep 2008, at 20:13, Tom Lane [EMAIL PROTECTED] wrote: Greg Stark [EMAIL PROTECTED] writes: You'll also have to do enough empirical tests to convince people that a --enable-cheap-casserts build really does perform the same as a regular build. I don't think performance is even

Re: [HACKERS] Assert Levels

2008-09-19 Thread Greg Smith
On Fri, 19 Sep 2008, Greg Stark wrote: This is a good example of why running with assertions enabled on production might not be a good idea. But it's also a good example of why we should do our performance testing with assertions enabled if we can do it without invalidating the results. The

Re: [HACKERS] Assert Levels

2008-09-19 Thread Tom Lane
Greg Smith [EMAIL PROTECTED] writes: On Fri, 19 Sep 2008, Greg Stark wrote: This is a good example of why running with assertions enabled on production might not be a good idea. But it's also a good example of why we should do our performance testing with assertions enabled if we can do it