Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-20 Thread Kyotaro HORIGUCHI
Hi, I confirmed that 82233ce7ea4 surely did it. At Wed, 19 Mar 2014 09:35:16 -0300, Alvaro Herrera wrote Fujii Masao escribió: On Wed, Mar 19, 2014 at 7:57 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: 9.4 canceles backup mode even on immediate shutdown so the operation

Re: [HACKERS] four minor proposals for 9.5

2014-03-20 Thread Mark Kirkwood
On 20/03/14 13:28, Josh Berkus wrote: 3. relation limit - possibility to set session limit for maximum size of relations. Any relation cannot be extended over this limit in session, when this value is higher than zero. Motivation - we use lot of queries like CREATE TABLE AS SELECT .. , and some

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-20 Thread Kyotaro HORIGUCHI
Hello, At Wed, 19 Mar 2014 19:34:10 +0900, Fujii Masao wrote Agreed. Attached patches do that and I could recover the database state with following steps, Adding new option looks like new feature rather than bug fix. I'm afraid that the backpatch of such a change to 9.3 or before is not

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-20 Thread Kyotaro HORIGUCHI
Hello, On 03/19/2014 10:28 AM, Kyotaro HORIGUCHI wrote: The*problematic* operation sequence I saw was performed by pgsql-RA/Pacemaker. It stops a server already with immediate mode and starts the Master as a Standby at first, then promote. Focusing on this situation, there would be

Re: [HACKERS] four minor proposals for 9.5

2014-03-20 Thread Pavel Stehule
2014-03-20 5:36 GMT+01:00 Amit Kapila amit.kapil...@gmail.com: On Wed, Mar 19, 2014 at 9:04 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1.

Re: [HACKERS] four minor proposals for 9.5

2014-03-20 Thread Pavel Stehule
2014-03-20 7:25 GMT+01:00 Mark Kirkwood mark.kirkw...@catalyst.net.nz: On 20/03/14 13:28, Josh Berkus wrote: 3. relation limit - possibility to set session limit for maximum size of relations. Any relation cannot be extended over this limit in session, when this value is higher than zero.

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe Reply-To:

2014-03-20 Thread Vik Fearing
On 03/18/2014 11:39 AM, Simon Riggs wrote: On 8 March 2014 11:14, Simon Riggs si...@2ndquadrant.com wrote: On 7 March 2014 09:04, Simon Riggs si...@2ndquadrant.com wrote: The right thing to do here is to not push to the extremes. If we mess too much with the ruleutil stuff it will just be

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-20 Thread Marko Tiikkaja
On 3/20/14, 12:32 AM, Tom Lane wrote: Isn't the entire point to create a framework in which more tests will be added later? Also, adding GUC_LIST_INPUT later is not really cool since it changes the parsing behavior for the GUC. If it's going to be a list, it should be one from day zero. I'm

Re: [HACKERS] four minor proposals for 9.5

2014-03-20 Thread Mark Kirkwood
On 20/03/14 20:08, Pavel Stehule wrote: 2014-03-20 7:25 GMT+01:00 Mark Kirkwood mark.kirkw...@catalyst.net.nz Also I think this would probably only make sense for TEMPORARY tables - otherwise you can get this sort of thing going on: - you create a table and you have set a

Re: [HACKERS] four minor proposals for 9.5

2014-03-20 Thread Pavel Stehule
2014-03-20 9:47 GMT+01:00 Mark Kirkwood mark.kirkw...@catalyst.net.nz: On 20/03/14 20:08, Pavel Stehule wrote: 2014-03-20 7:25 GMT+01:00 Mark Kirkwood mark.kirkw...@catalyst.net.nz Also I think this would probably only make sense for TEMPORARY tables - otherwise you can get this

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-20 Thread Petr Jelinek
On 20/03/14 00:32, Tom Lane wrote: TBH, if I thought this specific warning was the only one that would ever be there, I'd probably be arguing to reject this patch altogether. Of course, nobody assumes that it will be the only one. Also, adding GUC_LIST_INPUT later is not really cool since

Re: [HACKERS] effective_cache_size cannot be changed by a reload

2014-03-20 Thread Fujii Masao
On Thu, Mar 20, 2014 at 2:34 AM, Jeff Janes jeff.ja...@gmail.com wrote: In 9.4dev, if the server is started with effective_cache_size = -1, then it cannot be changed away from that without a restart. If you change the config file and do a reload or pg_reload_conf(), it ignores the change

Re: [HACKERS] jsonb and nested hstore

2014-03-20 Thread Alexander Korotkov
I've noticed two commits on github. commit b8199ee3c2506ab81b47a0b440363fc90c0d6956 Author: Peter Geoghegan p...@heroku.com Date: Wed Mar 19 02:02:16 2014 -0700 For jsonb_hash_ops, hash less By limiting the GIN entries to the least-nested level, the delicious.com sample JSON

Re: [HACKERS] inherit support for foreign tables

2014-03-20 Thread Etsuro Fujita
(2014/03/18 18:38), Kyotaro HORIGUCHI wrote: By the way, Can I have a simple script to build an environment to run this on? I built test environment and ran the simple test using postgres_fdw and got parameterized path from v3 patch on the following operation as shown there, and v6 also gives

Re: [HACKERS] Portability issues in shm_mq

2014-03-20 Thread Robert Haas
On Tue, Mar 18, 2014 at 4:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Mar 18, 2014 at 12:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: Meh. I think you're putting a bit too much faith in your ability to predict the locus of bugs that you think

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-20 Thread Alvaro Herrera
Kyotaro HORIGUCHI escribió: Hi, I confirmed that 82233ce7ea4 surely did it. At Wed, 19 Mar 2014 09:35:16 -0300, Alvaro Herrera wrote Fujii Masao escribió: On Wed, Mar 19, 2014 at 7:57 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: 9.4 canceles backup mode even on

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Robert Haas
On Tue, Mar 18, 2014 at 2:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: One of the factors that leads to bad estimates is that the histogram of the values of a column maintained by the planner gets old by time and the data in the column changes. So, the

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: So you might think that the problem here is that we're assuming uniform density. Let's say there are a million rows in the table, and there are 100 that match our criteria, so the first one is going to happen 1/10,000'th of the way through the table.

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-20 Thread Tom Lane
Marko Tiikkaja ma...@joh.to writes: On 3/20/14, 12:32 AM, Tom Lane wrote: Also, adding GUC_LIST_INPUT later is not really cool since it changes the parsing behavior for the GUC. If it's going to be a list, it should be one from day zero. I'm not sure what exactly you mean by this. If the

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Atri Sharma
On Thu, Mar 20, 2014 at 8:10 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 18, 2014 at 2:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: One of the factors that leads to bad estimates is that the histogram of the values of a column maintained

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Tom Lane
Atri Sharma atri.j...@gmail.com writes: Now, why cannot we take the estimate of all the buckets behind the bucket in which our value is present? Will that estimate not give us the fraction of tuples that are expected to be before the first matching row? Uh, no, not unless you assume that the

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Atri Sharma
On Thu, Mar 20, 2014 at 8:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: Now, why cannot we take the estimate of all the buckets behind the bucket in which our value is present? Will that estimate not give us the fraction of tuples that are expected to

Re: [HACKERS] effective_cache_size cannot be changed by a reload

2014-03-20 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: On Thu, Mar 20, 2014 at 2:34 AM, Jeff Janes jeff.ja...@gmail.com wrote: In 9.4dev, if the server is started with effective_cache_size = -1, then it cannot be changed away from that without a restart. I think that's a bug. Patch attached. PGC_S_FILE

Re: [HACKERS] Re: [COMMITTERS] pgsql: libpq: change PQconndefaults() to ignore invalid service files

2014-03-20 Thread Bruce Momjian
On Sat, Mar 8, 2014 at 08:44:34PM -0500, Bruce Momjian wrote: [Just getting back to this.] Agreed. I have developed the attached patch which passes the strdup() failure up from pg_fe_getauthname() and maps the failure to PQconndefaults(), which is now documented as being memory allocation

Re: [HACKERS] Risk Estimation WAS: Planner hints in Postgresql

2014-03-20 Thread Robert Haas
On Thu, Mar 20, 2014 at 10:45 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: So you might think that the problem here is that we're assuming uniform density. Let's say there are a million rows in the table, and there are 100 that match our criteria, so the

[HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Alexandr
Hello! Here is the text of my proposal which I've applied to GSoC. (and link https://docs.google.com/document/d/1vBjQzhFT_fgoIkoEP5TVeyFA6ggsYlLq76tghGVUD6A/edit?usp=sharing) Any suggestions and comments are welcome. Because I don't know the code of PostgreSQL well I decide not to participate

[HACKERS]

2014-03-20 Thread Rajashree Mandaogane
While debugging any function in PostgreSQL, whenever I use the command 'bt', it doesn't give the entire list of functions used. Which command should be used instead?

Re: [HACKERS]

2014-03-20 Thread Tom Lane
Rajashree Mandaogane rajashree@gmail.com writes: While debugging any function in PostgreSQL, whenever I use the command 'bt', it doesn't give the entire list of functions used. Which command should be used instead? It's probably omitting functions that have been inlined; if so, the fix is

Re: [HACKERS] jsonb and nested hstore

2014-03-20 Thread Peter Geoghegan
On Thu, Mar 20, 2014 at 5:32 AM, Alexander Korotkov aekorot...@gmail.com wrote: Besides implementation, what the idea was here? For me, it's impossible to skip any single element, because it's possible for query to include only this element. If we skip that element, we can't answer

Re: [HACKERS] GSoC 2014 - mentors, students and admins

2014-03-20 Thread Thom Brown
Hi all, There is 1 day left to get submissions in, so students should ensure that they submit their proposals as soon as possible. No submissions will be accepted beyond the deadline of 19:00 UTC tomorrow (Friday 21st March). Regards Thom -- Sent via pgsql-hackers mailing list

Re: [HACKERS] GSoC application: MADlib k-medoids clustering

2014-03-20 Thread Maxence Ahlouche
Hi, My proposal is now available on Google melange website: http://www.google-melange.com/gsoc/proposal/public/google/gsoc2014/viod/5668600916475904 There seems to be a formatting issue: half of the text is a link to the page I mentionned during my registration on my website. I don't know how to

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Josh Berkus
On 03/20/2014 09:56 AM, Alexandr wrote: Here is the text of my proposal which I've applied to GSoC. (and link https://docs.google.com/document/d/1vBjQzhFT_fgoIkoEP5TVeyFA6ggsYlLq76tghGVUD6A/edit?usp=sharing) Any suggestions and comments are welcome. Because I don't know the code of

Re: [HACKERS] HEAD seems to generate larger WAL regarding GIN index

2014-03-20 Thread Jesper Krogh
On 15/03/14 20:27, Heikki Linnakangas wrote: That said, I didn't expect the difference to be quite that big when you're appending to the end of the table. When the new entries go to the end of the posting lists, you only need to recompress and WAL-log the last posting list, which is max 256

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Thom Brown
On 20 March 2014 20:07, Josh Berkus j...@agliodbs.com wrote: On 03/20/2014 09:56 AM, Alexandr wrote: Here is the text of my proposal which I've applied to GSoC. (and link https://docs.google.com/document/d/1vBjQzhFT_fgoIkoEP5TVeyFA6ggsYlLq76tghGVUD6A/edit?usp=sharing) Any suggestions and

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Alexandr
21.03.2014 00:07, Josh Berkus пишет: Per my comments on the GSOC app, it looks good, but I'd like to see some stretch goals if you are able to implement the new function before GSOC is over. For example, one thing which has been frequently requested is functions to display intervals in the

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Josh Berkus
On 03/20/2014 01:26 PM, Alexandr wrote: 21.03.2014 00:07, Josh Berkus пишет: Per my comments on the GSOC app, it looks good, but I'd like to see some stretch goals if you are able to implement the new function before GSOC is over. For example, one thing which has been frequently requested

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Steve Atkins
On Mar 20, 2014, at 1:24 PM, Thom Brown t...@linux.com wrote: On 20 March 2014 20:07, Josh Berkus j...@agliodbs.com wrote: On 03/20/2014 09:56 AM, Alexandr wrote: Here is the text of my proposal which I've applied to GSoC. (and link

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Alexandr
21.03.2014 00:33, Josh Berkus пишет: Comments: #2: I don't understand this one? #3 is already a patch for version 9.4, but possibly you can improve/expand it. #4 has already been the subject of a LOT of debate, I think you don't want to get into it. I meaned this one: Allow TIMESTAMP WITH

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Josh Berkus
I meaned this one: Allow TIMESTAMP WITH TIME ZONE to store the original timezone information, either zone name or offset from UTC And which ideas can you advise me to add to proposal? That one has also been hotly debated. You'd probably have to do it as an extension, and that would be a

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Alvaro Herrera
Alexandr escribió: 21.03.2014 00:33, Josh Berkus пишет: Comments: #2: I don't understand this one? #3 is already a patch for version 9.4, but possibly you can improve/expand it. #4 has already been the subject of a LOT of debate, I think you don't want to get into it. I meaned this one:

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Alexandr
Subtracting to get an interval, then converting that interval to seconds or minutes could give you a value that’s wildly different from the right answer. Can you explain me when it happens ? With best wishes, Alexander S. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] QSoC proposal: date_trunc supporting intervals

2014-03-20 Thread Claudio Freire
On Thu, Mar 20, 2014 at 5:55 PM, Alexandr askel...@gmail.com wrote: Subtracting to get an interval, then converting that interval to seconds or minutes could give you a value that's wildly different from the right answer. Can you explain me when it happens ? '1 month'::interval It's

[HACKERS] Array of composite types returned from python

2014-03-20 Thread Behn, Edward (EBEHN)
I've endeavored to enable the return of arrays of composite types from code written in PL/Python. It seems that this can be accomplished though a very minor change to the code: On line 401 in the file src/pl/plpython/plpy_typeio.c, remove the error report PL/Python functions cannot return

Re: [HACKERS] QSoC proposal: Rewrite pg_dump and pg_restore

2014-03-20 Thread Robert Haas
On Tue, Mar 18, 2014 at 8:41 PM, Alexandr askel...@gmail.com wrote: Rewrite (add) pg_dump and pg_restore utilities as libraries (.so, .dll .dylib) This strikes me as (1) pretty vague and (2) probably too hard for a summer project. I mean, getting the existing binaries to build libraries that

Re: [HACKERS]

2014-03-20 Thread Craig Ringer
On 03/21/2014 01:12 AM, Tom Lane wrote: Rajashree Mandaogane rajashree@gmail.com writes: While debugging any function in PostgreSQL, whenever I use the command 'bt', it doesn't give the entire list of functions used. Which command should be used instead? It's probably omitting functions

Re: [HACKERS] QSoC proposal: Rewrite pg_dump and pg_restore

2014-03-20 Thread Craig Ringer
On 03/21/2014 09:28 AM, Robert Haas wrote: On Tue, Mar 18, 2014 at 8:41 PM, Alexandr askel...@gmail.com wrote: Rewrite (add) pg_dump and pg_restore utilities as libraries (.so, .dll .dylib) This strikes me as (1) pretty vague and (2) probably too hard for a summer project. I mean,

Re: [HACKERS] QSoC proposal: Rewrite pg_dump and pg_restore

2014-03-20 Thread Tom Lane
Craig Ringer cr...@2ndquadrant.com writes: Here's how I think it needs to look: [ move all the functionality to the backend ] Of course, after you've done all that work, you've got something that is of exactly zero use to its supposed principal use-case, pg_dump. pg_dump will still have to

Re: [HACKERS] QSoC proposal: Rewrite pg_dump and pg_restore

2014-03-20 Thread Craig Ringer
On 03/21/2014 11:09 AM, Tom Lane wrote: Craig Ringer cr...@2ndquadrant.com writes: Here's how I think it needs to look: [ move all the functionality to the backend ] Of course, after you've done all that work, you've got something that is of exactly zero use to its supposed principal

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe Reply-To:

2014-03-20 Thread Noah Misch
On Sat, Mar 08, 2014 at 11:14:30AM +, Simon Riggs wrote: On 7 March 2014 09:04, Simon Riggs si...@2ndquadrant.com wrote: The right thing to do here is to not push to the extremes. If we mess too much with the ruleutil stuff it will just be buggy. A more considered analysis in a later

[HACKERS] equalTupleDescs() ignores ccvalid/ccnoinherit

2014-03-20 Thread Noah Misch
We added these ConstrCheck fields for 9.2, but equalTupleDescs() did not get the memo. I looked for resulting behavior problems, and I found one in RelationClearRelation() only. Test case: set constraint_exclusion = on; drop table if exists ccvalid_test; create table ccvalid_test (c int); alter

[HACKERS] Optimized out tags

2014-03-20 Thread Rajashree Mandaogane
What can be done to get rid of the 'optimized out' tags while debugging?

Re: [HACKERS] Optimized out tags

2014-03-20 Thread Atri Sharma
On Fri, Mar 21, 2014 at 9:49 AM, Rajashree Mandaogane rajashree@gmail.com wrote: What can be done to get rid of the 'optimized out' tags while debugging? Did you use the appropriate debugging flags when running ./configure? Regards, Atri -- Regards, Atri *l'apprenant*