Re: [HACKERS] patch for parallel pg_dump

2012-03-17 Thread Joachim Wieland
On Fri, Mar 16, 2012 at 12:06 AM, Robert Haas wrote: >> Good. The only exit handler I've seen so far is >> pgdump_cleanup_at_exit. If there's no other one, is it okay to remove >> all of this stacking functionality (see on_exit_nicely_index / >> MAX_ON_EXIT_NICELY) from dumputils.c and just define

[HACKERS] double free in current HEAD's pg_dump

2012-03-17 Thread Joachim Wieland
There's a double free in the current HEAD's pg_dump. Fix attached. diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 2b0a5ff..57a6ccb 100644 *** a/src/bin/pg_dump/pg_dump.c --- b/src/bin/pg_dump/pg_dump.c *** dumpBlobs(Archive *fout, void *arg) *** 2372,2379

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
-Original Message- From: jcasa...@systemguards.com.ec [mailto:jcasa...@systemguards.com.ec] On Behalf Of Jaime Casanova Sent: 18 March 2012 01:04 To: Atri Sharma Cc: Dave Page; Alvaro Herrera; Pg Hackers Subject: Re: [HACKERS] Regarding column reordering project for GSoc 2012 On Sat, Mar

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
-Original Message- From: Daniel Farina [mailto:dan...@heroku.com] Sent: 18 March 2012 06:30 To: Andrew Dunstan Cc: Dave Page; Atri Sharma; Alvaro Herrera; Pg Hackers Subject: Re: [HACKERS] Regarding column reordering project for GSoc 2012 On Sat, Mar 17, 2012 at 1:48 PM, Andrew Dunstan

Re: [HACKERS] Gsoc2012 Idea --- Social Network database schema

2012-03-17 Thread HuangQi
(Sorry, Daniel. Forgot to cc pgsql-hackers.) Hi, Daniel Thanks a lot for your response. As I can see for now, in my FYP, as the acyclic schema has the property that it has a join tree. I will check how many join trees it has and investigate any best option for the RSN schema. If it does hav

Re: [HACKERS] Gsoc2012 Idea --- Social Network database schema

2012-03-17 Thread Daniel Farina
On Sat, Mar 17, 2012 at 8:50 AM, HuangQi wrote: >     I'm quite glad if you could offer me some advices. Thanks a lot for your > help! Thank you for your interest! However, I am a little confused precisely what you are thinking about implementing. Are there particular access methods or operators

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Daniel Farina
On Sat, Mar 17, 2012 at 1:48 PM, Andrew Dunstan wrote: > Mine too. We don't want a column ordering that's different for everyone. > That's a recipe for mass confusion. We want to be able to mutate the > ordering for everyone, and for everyone to see the same ordering. That means > it MUST be done

Re: [HACKERS] Memory usage during sorting

2012-03-17 Thread Jeff Janes
On Wed, Mar 7, 2012 at 11:55 AM, Robert Haas wrote: > On Sat, Mar 3, 2012 at 4:15 PM, Jeff Janes wrote: > >> Anyway, I think the logtape could use redoing.  When your tapes are >> actually physically tape drives, it is necessary to build up runs one >> after the other on physical tapes, because u

Re: [HACKERS] Memory usage during sorting

2012-03-17 Thread Jeff Janes
On Sat, Mar 17, 2012 at 10:47 AM, Greg Stark wrote: > On Wed, Mar 7, 2012 at 7:55 PM, Robert Haas wrote: >>> But it would mean we have about 1.7x  more runs that need to be merged >>> (for initially random data).  Considering the minimum merge order is >>> 6, that increase in runs is likely not t

[HACKERS] Cross-backend signals and administration (Was: Re: pg_terminate_backend for same-role)

2012-03-17 Thread Daniel Farina
This thread evolved out of an attempt to implement pg_terminate_backend for non-superusers. I thought -- probably erroneously -- that the major objection to that was the known possibility of a PID-cycling race condition, whereby a signal could be misdirected, in the case of terminate_backend, SIGT

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-17 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of mar mar 06 17:28:12 -0300 2012: > On Tue, Mar 6, 2012 at 7:39 PM, Alvaro Herrera > wrote: > > > We provide four levels of tuple locking strength: SELECT FOR KEY UPDATE is > > super-exclusive locking (used to delete tuples and more generally to update > > tu

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-17 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of mar mar 06 18:33:13 -0300 2012: > The lock modes are correct, appropriate and IMHO have meaningful > names. No redesign required here. > > Not sure about the naming of some of the flag bits however. Feel free to suggest improvements ... I've probably seen

Re: [HACKERS] sortsupport for text

2012-03-17 Thread Greg Stark
On Fri, Mar 2, 2012 at 8:45 PM, Robert Haas wrote: > 12789    28.2686  libc-2.13.so             strcoll_l > 6802     15.0350  postgres                 text_cmp I'm still curious how it would compare to call strxfrm and sort the resulting binary blobs. I don't think the sortsupport stuff actually

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-17 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of lun mar 05 15:28:59 -0300 2012: > > On Mon, Feb 27, 2012 at 2:47 AM, Robert Haas wrote: > >> Regarding performance, the good thing about this patch is that if you > >> have an operation that used to block, it might now not block.  So maybe > >> multixact-r

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-17 Thread Peter Geoghegan
Is there anything that I could be doing to help bring this patch closer to a committable state? I'm thinking of the tests in particular - do you suppose it's acceptable to commit them more or less as-is? The standard for testing contrib modules seems to be a bit different, as there is a number of

Re: [HACKERS] Command Triggers, patch v11

2012-03-17 Thread Andres Freund
On Saturday, March 17, 2012 11:04:30 PM Tom Lane wrote: > I've found a couple more issues in the CTAS patch: > > 1. Previous versions delivered a "SELECT n" command tag for either > spelling of the command: > > regression=# select * into t1 from int8_tbl; > SELECT 6 > regression=# create table t2

Re: [HACKERS] Command Triggers, patch v11

2012-03-17 Thread Tom Lane
I've found a couple more issues in the CTAS patch: 1. Previous versions delivered a "SELECT n" command tag for either spelling of the command: regression=# select * into t1 from int8_tbl; SELECT 6 regression=# create table t2 as select * from int8_tbl; SELECT 6 With the patch I get regression=#

Re: [HACKERS] pg_terminate_backend for same-role

2012-03-17 Thread Noah Misch
On Fri, Mar 16, 2012 at 04:42:07PM -0700, Daniel Farina wrote: > On Fri, Mar 16, 2012 at 3:42 PM, Noah Misch wrote: > > On Thu, Mar 15, 2012 at 04:14:03PM -0700, Daniel Farina wrote: > >> I imagine the problem is a race condition whereby a pid might be > >> reused by another process owned by anoth

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Andrew Dunstan
On 03/17/2012 04:42 PM, Dave Page wrote: On Saturday, March 17, 2012, Atri Sharma > wrote: > Hi Dave, > > > > I believe,with the ALTER command,we plan to give the user power to modify ordering . Don’t we? Probably, but that's not relevant to my point as far as

[HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Dave Page
On Saturday, March 17, 2012, Atri Sharma wrote: > Hi Dave, > > > > I believe,with the ALTER command,we plan to give the user power to modify ordering . Don’t we? Probably, but that's not relevant to my point as far as I can see - I was objecting to your suggestion that the "middle layer" that tra

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Andrew Dunstan
On 03/17/2012 03:07 PM, Atri Sharma wrote: Hi Alvaro, Thanks for going through my description. I was going through the posts,when I realised that if we give each client the flexibility of defining his/her own order with complete control,that would be probably the right way(IMHO). I mean,if

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Jaime Casanova
On Sat, Mar 17, 2012 at 2:16 PM, Atri Sharma wrote: > Hi Dave, > > I believe,with the ALTER command,we plan to give the user power to modify > ordering . Don’t we? > And how is that different from a view that orders the columns as the user wishes? -- Jaime Casanova         www.2ndQuadrant.com P

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
Hi Dave, I believe,with the ALTER command,we plan to give the user power to modify ordering . Don't we? Atri From: Dave Page [mailto:dp...@pgadmin.org] Sent: 18 March 2012 00:46 To: Atri Sharma Cc: Alvaro Herrera; Pg Hackers Subject: Re: [HACKERS] Regarding column reordering project fo

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Dave Page
On Saturday, March 17, 2012, Atri Sharma wrote: > Hi Alvaro, > Thanks for going through my description. > > > I was going through the posts,when I realised that if we give each client the flexibility of defining his/her own order with complete control,that would be probably the right way(IMHO). >

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
Hi Alvaro, Thanks for going through my description. I was going through the posts,when I realised that if we give each client the flexibility of defining his/her own order with complete control,that would be probably the right way(IMHO). I mean,if the user sees,not the physical implementation,

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Alvaro Herrera
Excerpts from Atri Sharma's message of sáb mar 17 15:48:13 -0300 2012: > > HI Alvaro, > I did send a complete description to the mailing list, based on your past > discussions. I don’t know if you got it. I read it, but I don't see how is the client involved. -- Álvaro Herrera The PostgreSQL

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
HI Alvaro, I did send a complete description to the mailing list, based on your past discussions. I don’t know if you got it. Please let me know if I should re-send the mail trail. Atri -Original Message- From: Alvaro Herrera [mailto:alvhe...@commandprompt.com] Sent: 18 March 2012 00:1

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Alvaro Herrera
Excerpts from Atri Sharma's message of sáb mar 17 05:39:10 -0300 2012: > Hi All, > > I am Atri Sharma.I am a C developer with experience in database > designing and database management systems.I have worked with > MySql,Oracle and other database systems.I have designed databases for > various pro

Re: [HACKERS] Command Triggers, patch v11

2012-03-17 Thread Andres Freund
On Saturday, March 17, 2012 06:45:27 PM Tom Lane wrote: > I'm not sure that anybody cares about being able to fire command > triggers on DECLARE CURSOR I actually think it would make sense to explicitly not fire command triggers there given that DECLARE CURSOR actually potentially is somewhat perf

Re: [HACKERS] Memory usage during sorting

2012-03-17 Thread Greg Stark
On Wed, Mar 7, 2012 at 7:55 PM, Robert Haas wrote: >> But it would mean we have about 1.7x  more runs that need to be merged >> (for initially random data).  Considering the minimum merge order is >> 6, that increase in runs is likely not to lead to an additional level >> of merging, in which case

Re: [HACKERS] Command Triggers, patch v11

2012-03-17 Thread Tom Lane
While looking at this I also noticed that DECLARE CURSOR uses a structure that's randomly different in yet a third way: we start with a utility statement containing a query, and then flip that upside down so that the SELECT Query contains a utility statement! I have a vague feeling that I'm the on

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
Hi all, In follow up to my last mail, attached below, for performance, we can build a graph with edges having weight in sense of performance wise and padding saving wise . Then , we can build a minimal spanning tree, and the tree generated would be our order of columns . When any changes are made

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
Thanks Andrew. I went through the link. Here is my idea: I believe we can build a "middle" layer that encapsulates the physical details from the user and gives him/her a VIEW that is actually generated by the system itself. That means, we have a system such as: LOGICAL LAYER -- MIDDL

Re: [HACKERS] initdb and fsync

2012-03-17 Thread Cédric Villemain
Le vendredi 16 mars 2012 16:51:04, Andres Freund a écrit : > On Friday, March 16, 2012 04:47:06 PM Robert Haas wrote: > > On Fri, Mar 16, 2012 at 6:25 AM, Andres Freund wrote: > > >> > How are the results with sync_file_range(fd, 0, 0, > > >> > SYNC_FILE_RANGE_WRITE)? > > >> > > >> That is much f

Re: [HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Andrew Dunstan
On 03/17/2012 04:39 AM, Atri Sharma wrote: Hi All, I am Atri Sharma.I am a C developer with experience in database designing and database management systems.I have worked with MySql,Oracle and other database systems.I have designed databases for various projects as well. I would be interested

Re: [HACKERS] github notification spam

2012-03-17 Thread Bruce Momjian
On Sat, Mar 17, 2012 at 04:40:52PM +0100, Magnus Hagander wrote: > > Yes, but I am surprised they are doing email linking with Postgres > > community commits.   It is a creative idea, but not something I would > > think people would think of. > > It's because we push a mirror of our git repository

[HACKERS] Gsoc2012 Idea --- Social Network database schema

2012-03-17 Thread HuangQi
Hi, all I am a student of Computer Science and Applied Math in a university in Singapore. I'm planning to join Google Summer Code 2012 on PostgreSQL. It's quite an honor to join the postgresql hacker community. I have some postgresql developing experience while doing my school project. I'm do

Re: [HACKERS] github notification spam

2012-03-17 Thread Magnus Hagander
On Sat, Mar 17, 2012 at 16:39, Bruce Momjian wrote: > On Sat, Mar 17, 2012 at 04:08:08PM +0100, Magnus Hagander wrote: >> On Sat, Mar 17, 2012 at 16:06, Bruce Momjian wrote: >> > On Sat, Mar 17, 2012 at 04:05:44PM +0100, Magnus Hagander wrote: >> >> On Sat, Mar 17, 2012 at 15:52, Magnus Hagander

Re: [HACKERS] github notification spam

2012-03-17 Thread Bruce Momjian
On Sat, Mar 17, 2012 at 04:08:08PM +0100, Magnus Hagander wrote: > On Sat, Mar 17, 2012 at 16:06, Bruce Momjian wrote: > > On Sat, Mar 17, 2012 at 04:05:44PM +0100, Magnus Hagander wrote: > >> On Sat, Mar 17, 2012 at 15:52, Magnus Hagander wrote: > >> > On Sat, Mar 17, 2012 at 14:46, Bruce Momjia

Re: [HACKERS] github notification spam

2012-03-17 Thread Magnus Hagander
On Sat, Mar 17, 2012 at 16:06, Bruce Momjian wrote: > On Sat, Mar 17, 2012 at 04:05:44PM +0100, Magnus Hagander wrote: >> On Sat, Mar 17, 2012 at 15:52, Magnus Hagander wrote: >> > On Sat, Mar 17, 2012 at 14:46, Bruce Momjian wrote: >> >> After my pg_upgrade commit yesterday, I started receiving

Re: [HACKERS] github notification spam

2012-03-17 Thread Magnus Hagander
On Sat, Mar 17, 2012 at 16:05, Bruce Momjian wrote: > On Sat, Mar 17, 2012 at 03:52:39PM +0100, Magnus Hagander wrote: >> On Sat, Mar 17, 2012 at 14:46, Bruce Momjian wrote: >> > After my pg_upgrade commit yesterday, I started receiving dozens of spam >> > emails from github.  I am not sure if it

Re: [HACKERS] github notification spam

2012-03-17 Thread Bruce Momjian
On Sat, Mar 17, 2012 at 04:05:44PM +0100, Magnus Hagander wrote: > On Sat, Mar 17, 2012 at 15:52, Magnus Hagander wrote: > > On Sat, Mar 17, 2012 at 14:46, Bruce Momjian wrote: > >> After my pg_upgrade commit yesterday, I started receiving dozens of spam > >> emails from github.  I am not sure if

Re: [HACKERS] github notification spam

2012-03-17 Thread Bruce Momjian
On Sat, Mar 17, 2012 at 03:52:39PM +0100, Magnus Hagander wrote: > On Sat, Mar 17, 2012 at 14:46, Bruce Momjian wrote: > > After my pg_upgrade commit yesterday, I started receiving dozens of spam > > emails from github.  I am not sure if it was because I was the > > committer, or because I am subs

Re: [HACKERS] github notification spam

2012-03-17 Thread Magnus Hagander
On Sat, Mar 17, 2012 at 15:52, Magnus Hagander wrote: > On Sat, Mar 17, 2012 at 14:46, Bruce Momjian wrote: >> After my pg_upgrade commit yesterday, I started receiving dozens of spam >> emails from github.  I am not sure if it was because I was the >> committer, or because I am subscribed to the

Re: [HACKERS] Command Triggers, patch v11

2012-03-17 Thread Tom Lane
Andres Freund writes: > On Friday, March 16, 2012 10:52:55 PM Tom Lane wrote: >> Something else I just came across is that there are assorted places that >> are aware that ExplainStmt contains a Query, eg setrefs.c, plancache.c, >> and those have got to treat CreateTableAsStmt similarly. > Hm. Is

Re: [HACKERS] github notification spam

2012-03-17 Thread Magnus Hagander
On Sat, Mar 17, 2012 at 14:46, Bruce Momjian wrote: > After my pg_upgrade commit yesterday, I started receiving dozens of spam > emails from github.  I am not sure if it was because I was the > committer, or because I am subscribed to the github postgres feed. > > Anyway, the spam has a URL at the

Re: [HACKERS] Another review of URI for libpq, v7 submission

2012-03-17 Thread Marko Kreen
On Thu, Mar 15, 2012 at 11:29:31PM +0200, Alex wrote: > https://github.com/a1exsh/postgres/commits/uri The point of the patch is to have one string with all connection options, in standard format, yes? So why does not this work: db = PQconnectdb("postgres://localhost"); ? -- marko -- Sen

Re: [HACKERS] EquivalenceClasses and subqueries and PlaceHolderVars, oh my

2012-03-17 Thread Tom Lane
Greg Stark writes: > On Fri, Mar 16, 2012 at 3:16 PM, Tom Lane wrote: > So I now propose reverting the earlier two patches (but not their > regression test cases of course) and instead hacking MergeAppend plan > building as per (2). > As a wise man once said, "This is tricky stuff". I feel a bet

[HACKERS] github notification spam

2012-03-17 Thread Bruce Momjian
After my pg_upgrade commit yesterday, I started receiving dozens of spam emails from github. I am not sure if it was because I was the committer, or because I am subscribed to the github postgres feed. Anyway, the spam has a URL at the bottom --- if you click on notifications on that page, you ca

Re: [HACKERS] Incorrect assumptions with low LIMITs

2012-03-17 Thread Simon Riggs
On Sat, Mar 17, 2012 at 11:33 AM, Greg Stark wrote: > On Sat, Mar 17, 2012 at 9:34 AM, Simon Riggs wrote: >> My wish was to register this as both a common and significant bug, > > It has definitely come up here before many times. > > However at root the problem is part of the general class of not

Re: [HACKERS] Incorrect assumptions with low LIMITs

2012-03-17 Thread Greg Stark
On Sat, Mar 17, 2012 at 9:34 AM, Simon Riggs wrote: > My wish was to register this as both a common and significant bug, It has definitely come up here before many times. However at root the problem is part of the general class of not understanding how two different columns are related. Postgres

Re: [HACKERS] Incorrect assumptions with low LIMITs

2012-03-17 Thread Simon Riggs
On Fri, Mar 16, 2012 at 9:11 PM, Tom Lane wrote: > Simon Riggs writes: >> 2. We assume that if values do exist that they have rows uniformly >> distributed across the whole table like rungs on a ladder. > > Well, yeah.  That's sometimes wrong, but not always.  In the absence > of evidence to the

[HACKERS] Regarding column reordering project for GSoc 2012

2012-03-17 Thread Atri Sharma
Hi All, I am Atri Sharma.I am a C developer with experience in database designing and database management systems.I have worked with MySql,Oracle and other database systems.I have designed databases for various projects as well. I would be interested in developing the column reordering project by

Re: [HACKERS] incompatible pointer types with newer zlib

2012-03-17 Thread Peter Eisentraut
On tor, 2012-03-01 at 19:19 +0200, Peter Eisentraut wrote: > I think the best fix would be to rearrange _PrintFileData() so that it > doesn't use FH at all. Instead, we could define a separate > ArchiveHandle field IF that works more like OF, and then change > ahwrite() to use that. Here is a pat