Re: [HACKERS] Spread checkpoint sync

2010-12-04 Thread Greg Smith
Greg Stark wrote: Using sync_file_range you can specify the set of blocks to sync and then block on them only after some time has passed. But there's no documentation on how this relates to the I/O scheduler so it's not clear it would have any effect on the problem. I believe this is the exact

Re: [HACKERS] Re: Proposed Windows-specific change: Enable crash dumps (like core files)

2010-12-04 Thread Greg Smith
Craig Ringer wrote: On 11/24/2010 05:18 AM, Magnus Hagander wrote: Or you set the handler always, and have the handler only actually create the dump if the directory exists. That way you can add the directory and still get a dump from both existing backends and the postmaster itself without a

Re: [HACKERS] SQL/MED - file_fdw

2010-12-04 Thread Itagaki Takahiro
On Sun, Dec 5, 2010 at 07:24, Andrew Dunstan wrote: > Looking at file_parser.c, it seems to be largely taken from copy.c. Wouldn't > it be better to call those functions, or refactor them so they are callable > if necessary? We could export private functions and structs in copy.c, though details

Re: [HACKERS] [PATCH] Revert default wal_sync_method to fdatasync on Linux 2.6.33+

2010-12-04 Thread Josh Berkus
All, While I have this machine available I've been trying to run some performance tests using pgbench and various wal_sync_methods. However, I seem to be maxing out at the speed of pgbench itself; no matter which wal_sync_method I use (including "fsync"), it tops out at around 2750 TPS. Of

Re: [HACKERS] Requirement for the Buffer manager to load multiple pages at once

2010-12-04 Thread Vaibhav Kaushal
Thank you Kevin. I am going to look into it. I still have to learn a lot :) Regards, Vaibhav On 12/4/10, Kevin Grittner wrote: > Vaibhav Kaushal wrote: > >> I want to parallelize the search / scan (specifically hash) by >> using multiple cores in the processors today. > > You might want to revi

Re: [HACKERS] profiling connection overhead

2010-12-04 Thread Jeff Janes
On Wed, Dec 1, 2010 at 6:20 AM, Robert Haas wrote: > On Tue, Nov 30, 2010 at 11:32 PM, Jeff Janes wrote: >> On 11/28/10, Robert Haas wrote: >>> >>> In a close race, I don't think we should get bogged down in >>> micro-optimization here, both because micro-optimizations may not gain >>> much and

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Robert Haas
On Dec 4, 2010, at 1:22 PM, Dimitri Fontaine > That's calling for a try :) > > What about a new index type that follows the partitioning scheme in its > root pages in a way that allow the locking to occur in a subpart of it, > rather than for the whole index. > > Well, maybe that needs to have

Re: [HACKERS] SQL/MED - file_fdw

2010-12-04 Thread Andrew Dunstan
On 11/25/2010 03:12 AM, Shigeru HANADA wrote: Hi, hackers, Attached is a patch that adds file_fdw, FDW which reads records from files on the server side, as a contrib module. This patch is based on "SQL/MED core functionality" patch. [SQL/MED - core functionality] http://archives.postgresql.

Re: [HACKERS] Patch to add a primary key using an existing index

2010-12-04 Thread Josh Berkus
On 12/04/2010 12:37 PM, Robert Haas wrote: What would make sense to me is: create a pk constraint with the sane name as the existing unique index. If that constraint name already exists, error. +1, agreed. Based on this, the syntax should be obvious. We'll need to doc what to do in the even

Re: [HACKERS] knngist - 0.8

2010-12-04 Thread Tom Lane
Dimitri Fontaine writes: > Greg Stark writes: >> I kind of assumed the natural client for KNN-gist was the tsearch full >> text search indexes handling sorting by relevance. For example if I >> search for "Postgres DBA" I should find documents where those words >> appear adjacent first and docume

Re: [HACKERS] knngist - 0.8

2010-12-04 Thread Dimitri Fontaine
Greg Stark writes: > I kind of assumed the natural client for KNN-gist was the tsearch full > text search indexes handling sorting by relevance. For example if I > search for "Postgres DBA" I should find documents where those words > appear adjacent first and documents where the two words appear f

Re: [HACKERS] Patch to add a primary key using an existing index

2010-12-04 Thread Robert Haas
On Dec 4, 2010, at 11:46 AM, Tom Lane wrote: > Robert Treat writes: >> Actually I think I'd even be comfortable with A, either you must name the >> constraint after the index, or you can leave the constraint name out, and >> we'll use the index name. > > Or we could omit the "CONSTRAINT name" cl

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread David Fetter
On Sat, Dec 04, 2010 at 12:19:59PM -0500, Tom Lane wrote: > Andrew Dunstan writes: > > Those are difficulties, certainly. Are they insurmountable > > obstacles, though? This is something that has been on the TODO > > list for ages and I think is very worth doing, if we can. > > They're possibly s

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Dimitri Fontaine
Andrew Dunstan writes: > Anyone can create a branch and publish it. That's the democracy that git > allows. So if you want it, don't argue for it, just do it. The showstopper is having a unified plan for what to put in there, for once, and having -core people (commiters) willing to either put gia

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Yeb Havinga
On 2010-12-04 19:22, Dimitri Fontaine wrote: That's calling for a try :) What about a new index type that follows the partitioning scheme in its root pages in a way that allow the locking to occur in a subpart of it, rather than for the whole index. Would that (global) index be totally ordered?

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Andrew Dunstan
On 12/04/2010 01:22 PM, Dimitri Fontaine wrote: Given such an agenda, I'd argue for a feature branch being open for partitioning so that incremental reviewed work can happen there until we have enough pieces to consider merging into HEAD. Anyone can create a branch and publish it. That's t

Re: [HACKERS] knngist - 0.8

2010-12-04 Thread Greg Stark
On Sat, Dec 4, 2010 at 6:07 PM, Oleg Bartunov wrote: > We'll sync contrib/btree_gist with current API. Also, we're thinking > about distance for ltree, boxes, circles. I'm not sure about polygons, > though. > So, we'll have rather complete set of knn-fied data types. I kind of assumed the natural

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Dimitri Fontaine
Tom Lane writes: > partitioning. I have a feeling that the feature will languish on the > TODO list forever, unless someone comes up with a brilliant idea to > avoid the problems. As is, the return on investment to do it just > isn't there. That's calling for a try :) What about a new index ty

Re: [HACKERS] knngist - 0.8

2010-12-04 Thread Oleg Bartunov
Thanks to all for patience ! We'll sync contrib/btree_gist with current API. Also, we're thinking about distance for ltree, boxes, circles. I'm not sure about polygons, though. So, we'll have rather complete set of knn-fied data types. Oleg On Sat, 4 Dec 2010, Tom Lane wrote: Robert Haas writ

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Tom Lane
Andrew Dunstan writes: > Those are difficulties, certainly. Are they insurmountable obstacles, > though? This is something that has been on the TODO list for ages and I > think is very worth doing, if we can. They're possibly surmountable with enough effort, though I think in reality what you'd

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Andrew Dunstan
On 12/04/2010 11:56 AM, Tom Lane wrote: Greg Stark writes: [ suggestion for cross-table indexes ] That's been proposed before, and shot down before, though I don't recall all the reasons offhand. One obvious problem is VACUUM, which assumes that you can't have two processes trying to vacuu

Re: [HACKERS] EXPLAIN Sort Method whitespace

2010-12-04 Thread Tom Lane
Peter Eisentraut writes: > Is there a reason why there are two spaces after the first colon in > "Sort Method: %s %s: %ldkB\n" > Is the second part (Disk/Memory) considered part of the sort method? I think of it as a separate field that we cram onto the same line (in the textual output for

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Tom Lane
Greg Stark writes: > On Wed, Dec 1, 2010 at 3:05 PM, Tom Lane wrote: >> Perhaps I should have said "possibly workable proposal".  What you wrote >> doesn't even begin to cover the interesting part of the problem, namely >> how to ensure uniqueness is preserved in the face of concurrent >> inserti

Re: [HACKERS] Patch to add a primary key using an existing index

2010-12-04 Thread Tom Lane
Robert Treat writes: > Actually I think I'd even be comfortable with A, either you must name the > constraint after the index, or you can leave the constraint name out, and > we'll use the index name. Or we could omit the "CONSTRAINT name" clause from the syntax altogether. I think that allowing

[HACKERS] EXPLAIN Sort Method whitespace

2010-12-04 Thread Peter Eisentraut
Is there a reason why there are two spaces after the first colon in "Sort Method: %s %s: %ldkB\n" Is the second part (Disk/Memory) considered part of the sort method? The original commit for that is d2a4a406. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Per-column collation

2010-12-04 Thread Peter Eisentraut
On ons, 2010-11-24 at 22:22 +0200, Peter Eisentraut wrote: > On mån, 2010-11-22 at 11:58 +0900, Itagaki Takahiro wrote: > > * Did you see any performance regression by collation? > > I found a bug in lc_collate_is_c(); result >= 0 should be > > checked before any other checks. SearchSysCache1() her

Re: [HACKERS] Per-column collation

2010-12-04 Thread Peter Eisentraut
On tor, 2010-11-18 at 21:37 +0200, Heikki Linnakangas wrote: > On 15.11.2010 21:42, Peter Eisentraut wrote: > > On mån, 2010-11-15 at 11:34 +0100, Pavel Stehule wrote: > >> I am checking a patch. I found a problem with initdb > > > > Ah, late night brain farts, it appears. Here is a corrected vers

Re: [HACKERS] Requirement for the Buffer manager to load multiple pages at once

2010-12-04 Thread Kevin Grittner
Vaibhav Kaushal wrote: > I want to parallelize the search / scan (specifically hash) by > using multiple cores in the processors today. You might want to review the efforts of Markus Wanner, who submitted a series of patches intended to move things in that direction to a recent CommitFest: h

Re: [HACKERS] Patch to add a primary key using an existing index

2010-12-04 Thread Robert Treat
On Sat, Dec 4, 2010 at 6:48 AM, Robert Haas wrote: > On Dec 4, 2010, at 1:30 AM, Tom Lane wrote: > > "Ross J. Reedstrom" writes: > >> If you consider that an index basically is, in some sense, a pre-canned > >> column list, then: > > > >> ALTER TABLE table_name ADD PRIMARY KEY (column_list); >

Re: [HACKERS] FK's to refer to rows in inheritance child

2010-12-04 Thread Greg Stark
On Wed, Dec 1, 2010 at 3:05 PM, Tom Lane wrote: > Perhaps I should have said "possibly workable proposal".  What you wrote > doesn't even begin to cover the interesting part of the problem, namely > how to ensure uniqueness is preserved in the face of concurrent > insertions. I think it wouldn't

Re: [HACKERS] pg_execute_from_file review

2010-12-04 Thread Dimitri Fontaine
Itagaki Takahiro writes: > The VARIADIC version doesn't hide the 3-args version. I tested the > behavior by printf-debug. The planner seems to think the non VARIADIC > version is the best-matched one when 3 arguments are passed. Nice! All's left is then the commit, right? :) Regards, -- Dimitri

Re: [HACKERS] Review: Extensions Patch

2010-12-04 Thread Dimitri Fontaine
Hi, Thanks for the review, that's quite one! :) I'm not sure to follow you all along, it seems like the reading is "try it first then understand and comment again", so sometimes I'm not sure if you're saying that docs are missing the point or that the behaviour ain't right. "David E. Wheeler" w

[HACKERS] new patch of MERGE (merge_204) & a question about duplicated ctid

2010-12-04 Thread Boxuan Zhai
Dear Greg, I have updated the MERGE patch for two main problems. 1. Support of system attributes in MERGE action expressions. In old version of MERGE, I use the top join as the only RTE in var name space, during the transformation process in parser. It contains all the common attributes of so

Re: [HACKERS] Patch to add a primary key using an existing index

2010-12-04 Thread Robert Haas
On Dec 4, 2010, at 1:30 AM, Tom Lane wrote: > "Ross J. Reedstrom" writes: >> If you consider that an index basically is, in some sense, a pre-canned >> column list, then: > >> ALTER TABLE table_name ADD PRIMARY KEY (column_list); >> ALTER TABLE table_name ADD PRIMARY KEY USING index_name; > >>

Re: [HACKERS] Hypothetical Indexes - PostgreSQL extension - PGCON 2010

2010-12-04 Thread Jeroen Vermeulen
On 2010-12-03 20:49, Ana Carolina Brito de Almeida wrote: We add a simple case study (sourceforge page): http://sourceforge.net/projects/hypotheticalind/files/TUTORIAL_8_4.pdf/download Great, thanks! I'll try to write a bit more about it later: http://pqxx.org/development/libpqxx/wiki/Hypoth

Re: [HACKERS] Crash safe visibility map vs hint bits

2010-12-04 Thread jes...@krogh.cc
>> My imagination is probably not as good, but if you at time A wallog the >> complete map and at A+1 you update a tuple so the visibility bit is cleared >> but the map bit change does not happen due to a crash. Then at wal replay >> time you restore the map from time A and if the tuple change a

Re: [HACKERS] Crash safe visibility map vs hint bits

2010-12-04 Thread Heikki Linnakangas
On 04.12.2010 10:22, jes...@krogh.cc wrote: Den 4 Dec 2010 kl. 08:48 skrev Heikki Linnakangas: If you WAL-log the visibility map changes after-the-fact, it doesn't solve the race condition we're struggling with: the visibility map change might hit the disk before the PD_ALL_VISIBLE to the hea

Re: [HACKERS] Crash safe visibility map vs hint bits

2010-12-04 Thread jes...@krogh.cc
Den 4 Dec 2010 kl. 08:48 skrev Heikki Linnakangas : > On 04.12.2010 09:14, jes...@krogh.cc wrote: >> There has been a lot discussion about index-only scans and how to make the >> visibillity map crash safe. Then followed by a good discussion about hint >> bits. >> >> What seems to be the main