Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-21 Thread Qi Huang
Hi, Heikki 1. We probably don't want the SQL syntax to be added to the grammar. This should be written as an extension, using custom functions as the API, instead of extra SQL syntax. 2. It's not very useful if it's just a dummy replacement for WHERE random() ?. It has to be more

Re: [HACKERS] Plan stability versus near-exact ties in cost estimates

2012-04-21 Thread Albe Laurenz
Tom Lane wrote: Um, that is what the proposed patch does. I was referring to the first two lines that the patch removes. I guess I don't understand why they should go. What we'd have left after the proposed removal is if (new_path-rows old_path-rows)

Re: [HACKERS] RANGE type, and its subtype parameter

2012-04-21 Thread Guillaume Lelarge
On Sat, 2012-04-21 at 07:03 +0530, Amit Kapila wrote: If I understood correctly the following query should give your answer: Select opcintype from pg_opclass where opcname = 'operator class name'; You're right, and my question was wrong. I finally found the SQL query I was looking for. Thanks.

[HACKERS] B-tree page deletion boundary cases

2012-04-21 Thread Noah Misch
For the sake of concurrency, our B-tree implementation has a phased process for reusing empty pages. Excerpting from nbtree/README: A deleted page cannot be reclaimed immediately, since there may be other processes waiting to reference it (ie, search processes that just left the

Re: [HACKERS] B-tree page deletion boundary cases

2012-04-21 Thread Nikhil Sontakke
Hi Noah, Was wondering if there's a similar bug which gets triggered while using VACUUM FULL. See for instance this thread: http://postgresql.1045698.n5.nabble.com/index-corruption-in-PG-8-3-13-td4257589.html This issue has been reported on-off from time to time and in most cases VACUUM or

Re: [HACKERS] RFC: Making TRUNCATE more MVCC-safe

2012-04-21 Thread Jeff Davis
On Sun, 2012-03-04 at 16:39 +, Simon Riggs wrote: v3 attached. Added to next commitfest. Regards, Jeff Davis -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-21 Thread Jeff Davis
A lot of discussion took place regarding corruption detection, and I am attempting to summarize it in a useful way. Please excuse the lack of references; I'm hoping to agree on the basic problem space and the nature of the solutions offered, and then turn it into a wiki where we can get into the

Re: [HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-21 Thread Greg Stark
On Sat, Apr 21, 2012 at 10:40 PM, Jeff Davis pg...@j-davis.com wrote: * In addition to detecting random garbage, we also need to be able to detect zeroing of pages. Right now, a zero page is not considered corrupt, so that's a problem. We'll need to WAL table extension operations, and we'll

[HACKERS] Re: 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-21 Thread Jeff Davis
On Sun, 2012-04-22 at 00:08 +0100, Greg Stark wrote: On Sat, Apr 21, 2012 at 10:40 PM, Jeff Davis pg...@j-davis.com wrote: * In addition to detecting random garbage, we also need to be able to detect zeroing of pages. Right now, a zero page is not considered corrupt, so that's a problem.