Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-03 Thread Martijn van Oosterhout
On Mon, Jun 02, 2014 at 01:29:25PM -0400, Robert Haas wrote: I agree, but I think it's important to note that Alex's complaint is not unique - the way things work now is a real source of frustration for users. In a previous job, I wrote a schema-upgrade script that dropped all of the views in

Re: [HACKERS] 9.4 release notes

2014-06-03 Thread Peter Geoghegan
On Sun, May 4, 2014 at 5:46 AM, Bruce Momjian br...@momjian.us wrote: Feedback expected and welcomed. One item currently reads Improve valgrind error reporting. I suggest this be changed to Add support for Valgrind memcheck memory error detector. It was possible to use the tool before, but the

[HACKERS] Memory deallocation after calling cast function

2014-06-03 Thread Soroosh Sardari
Hi I have problem with memory deallocation. look at the following queries 1- create table test01(a) as select generate_series(1,1)::int8 ; 2- create table test02(a) as select generate_series(1,1) ; In execution of first query, memory usage increase rapidly until the transaction

Re: [HACKERS] pg_stat directory and pg_stat_statements

2014-06-03 Thread Magnus Hagander
On Mon, Jun 2, 2014 at 4:07 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-02 22:59:55 +0900, Fujii Masao wrote: On Thu, May 29, 2014 at 3:02 PM, Peter Geoghegan p...@heroku.com wrote: On Wed, May 28, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: You're

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-03 Thread Andres Freund
Hi, On 2014-06-03 12:43:28 +1000, Haribabu Kommi wrote: *** a/src/test/regress/expected/create_function_3.out --- b/src/test/regress/expected/create_function_3.out *** *** 153,389 RESET SESSION AUTHORIZATION; SELECT proname, prorettype::regtype, proargtypes::regtype[]

Re: [HACKERS] Proposing pg_hibernate

2014-06-03 Thread Robert Haas
On Thu, May 29, 2014 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com wrote: IMHO, all of these caveats, would affect a very small fraction of use-cases and are eclipsed by the benefits this extension provides in normal cases. I agree with you that there are only few corner cases where

Re: [HACKERS] Proposing pg_hibernate

2014-06-03 Thread Gurjeet Singh
On Tue, Jun 3, 2014 at 7:57 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, May 29, 2014 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com wrote: IMHO, all of these caveats, would affect a very small fraction of use-cases and are eclipsed by the benefits this extension provides in normal

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-03 Thread Robert Haas
On Mon, Jun 2, 2014 at 10:00 PM, Tom Lane t...@sss.pgh.pa.us wrote: I can see two answers. Answer #1 is that the column type of bar.a changes from int to bigint and the view definition is still SELECT a FROM foo. In that case, showing the user the SQL does not help them see and approve

[HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Vik Fearing
This patch implements a timeout for broken clients that idle in transaction. This is a TODO item. When the timeout occurs, the backend commits suicide with a FATAL ereport. I thought about just aborting the transaction to free the locks but decided that the client is clearly broken so might as

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Abhijit Menon-Sen
At 2014-06-03 15:06:11 +0200, vik.fear...@dalibo.com wrote: This patch implements a timeout for broken clients that idle in transaction. I think this is a nice feature, but I suggest that (at the very least) the GUC should be named idle_transaction_timeout. +para + Terminate

Re: [HACKERS] Proposal for CSN based snapshots

2014-06-03 Thread Robert Haas
On Fri, May 30, 2014 at 2:38 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: (forgot to answer this question) On 05/30/2014 06:27 PM, Andres Freund wrote: On 2014-05-30 17:59:23 +0300, Heikki Linnakangas wrote: * I expanded pg_clog to 64-bits per XID, but people suggested keeping

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-03 Thread David G Johnston
On Tuesday, June 3, 2014, Robert Haas [via PostgreSQL] ml-node+s1045698n5805857...@n5.nabble.com wrote: On Mon, Jun 2, 2014 at 10:00 PM, Tom Lane [hidden email] http://user/SendEmail.jtp?type=nodenode=5805857i=0 wrote: I can see two answers. Answer #1 is that the column type of bar.a

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Vik Fearing
On 06/03/2014 03:30 PM, Abhijit Menon-Sen wrote: At 2014-06-03 15:06:11 +0200, vik.fear...@dalibo.com wrote: This patch implements a timeout for broken clients that idle in transaction. I think this is a nice feature, but I suggest that (at the very least) the GUC should be named

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jun 2, 2014 at 10:00 PM, Tom Lane t...@sss.pgh.pa.us wrote: Or something else; I don't claim to be a good UI designer. But in the end, this is 90% a UI problem, and that means that raw SQL is seriously poorly suited to solve it directly. I

[HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Fujii Masao
Hi, I got the bug report of pg_basebackup off-list that it causes an error when there is large file (e.g., 4GB) in the database cluster. It's easy to reproduce this problem. $ dd if=/dev/zero of=$PGDATA/test bs=1G count=4 $ pg_basebackup -D hoge -c fast pg_basebackup: invalid tar block header

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I didn't reall look at the patch, but it very much looks to me like that query result could use the \a\t treatment that rules.sql and sanity_check.sql got. It's hard to see the actual difference before/after the patch. I'll patch that now, to

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-03 Thread Andres Freund
On 2014-06-03 10:24:46 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I didn't reall look at the patch, but it very much looks to me like that query result could use the \a\t treatment that rules.sql and sanity_check.sql got. It's hard to see the actual difference

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Andres Freund
Hi On 2014-06-03 23:19:37 +0900, Fujii Masao wrote: I got the bug report of pg_basebackup off-list that it causes an error when there is large file (e.g., 4GB) in the database cluster. It's easy to reproduce this problem. The cause of this problem is that pg_basebackup uses an integer to

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 10:24:46 -0400, Tom Lane wrote: Personally, I would wonder why the regression tests contain such a query in the first place. It seems like nothing but a major maintenance PITA. I haven't added it, but it seems appropriate in that

[HACKERS] strtoll/strtoull emulation

2014-06-03 Thread Andres Freund
Hi, I recently had the need to use strtoull() in postgres code. Only to discover that that's not available on some platforms. IIRC windows/msvc was one of them. Now 9d7ded0f4277f5c0063eca8e871a34e2355a8371 added another user - guarded by HAVE_STRTOULL. That commit will make things worse on

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 23:19:37 +0900, Fujii Masao wrote: -if (sscanf(copybuf + 124, %11o, current_len_left) != 1) +if (sscanf(copybuf + 124, %11lo, current_len_left) != 1) That's probably not going to work on

Re: [HACKERS] Proposal for CSN based snapshots

2014-06-03 Thread Greg Stark
On Tue, Jun 3, 2014 at 2:55 PM, Robert Haas robertmh...@gmail.com wrote: That doesn't address Bruce's concern about CLOG disk consumption. Well we would only need the xid-lsn mapping for transactions since globalxmin. Anything older we would just need the committed bit. So we could maintain two

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Magnus Hagander
On Tue, Jun 3, 2014 at 4:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 23:19:37 +0900, Fujii Masao wrote: -if (sscanf(copybuf + 124, %11o, current_len_left) != 1) +if (sscanf(copybuf + 124,

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-03 Thread Andres Freund
On 2014-06-03 10:37:53 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 10:24:46 -0400, Tom Lane wrote: Personally, I would wonder why the regression tests contain such a query in the first place. It seems like nothing but a major maintenance PITA. I

Re: [HACKERS] strtoll/strtoull emulation

2014-06-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I recently had the need to use strtoull() in postgres code. Only to discover that that's not available on some platforms. IIRC windows/msvc was one of them. Now 9d7ded0f4277f5c0063eca8e871a34e2355a8371 added another user - guarded by HAVE_STRTOULL.

Re: [HACKERS] Proposing pg_hibernate

2014-06-03 Thread Gurjeet Singh
On Tue, Jun 3, 2014 at 8:13 AM, Gurjeet Singh gurj...@singh.im wrote: On Tue, Jun 3, 2014 at 7:57 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, May 29, 2014 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com wrote: IMHO, all of these caveats, would affect a very small fraction of

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Jun 3, 2014 at 4:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's a far bigger problem there, which is if we're afraid that current_len_left might exceed 4GB then what is it exactly that guarantees it'll fit in an 11-digit field? Well, we

Re: [HACKERS] strtoll/strtoull emulation

2014-06-03 Thread Andres Freund
On 2014-06-03 10:55:17 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I recently had the need to use strtoull() in postgres code. Only to discover that that's not available on some platforms. IIRC windows/msvc was one of them. Now

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Andres Freund
On 2014-06-03 11:04:58 -0400, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Tue, Jun 3, 2014 at 4:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's a far bigger problem there, which is if we're afraid that current_len_left might exceed 4GB then what is it exactly that

Re: [HACKERS] strtoll/strtoull emulation

2014-06-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 10:55:17 -0400, Tom Lane wrote: Ugh. Surely Windows has got *some* equivalent, perhaps named differently? Apparently they've added strtoull()/stroll() to msvc 2013... And there's _strtoui64() which seems to have already existed a

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Magnus Hagander
On Tue, Jun 3, 2014 at 5:12 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-03 11:04:58 -0400, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Tue, Jun 3, 2014 at 4:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's a far bigger problem there, which is if we're

Re: [HACKERS] strtoll/strtoull emulation

2014-06-03 Thread Andres Freund
On 2014-06-03 11:28:22 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 10:55:17 -0400, Tom Lane wrote: Ugh. Surely Windows has got *some* equivalent, perhaps named differently? Apparently they've added strtoull()/stroll() to msvc 2013... And there's

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 11:04:58 -0400, Tom Lane wrote: My point is that having backups crash on an overflow doesn't really seem acceptable. IMO we need to reconsider the basebackup protocol and make sure we don't *need* to put values over 4GB into this

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Magnus Hagander
On Tue, Jun 3, 2014 at 5:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 11:04:58 -0400, Tom Lane wrote: My point is that having backups crash on an overflow doesn't really seem acceptable. IMO we need to reconsider the basebackup

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Andres Freund
On 2014-06-03 11:42:49 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 11:04:58 -0400, Tom Lane wrote: My point is that having backups crash on an overflow doesn't really seem acceptable. IMO we need to reconsider the basebackup protocol and make sure we

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Andres Freund
On 2014-06-03 17:57:52 +0200, Magnus Hagander wrote: On Tue, Jun 3, 2014 at 5:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: What we had better do, IMO, is fix things so that we don't have a filesize limit in the basebackup format. After a bit of googling, I found out that recent POSIX specs

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Magnus Hagander
On Jun 3, 2014 6:17 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-03 17:57:52 +0200, Magnus Hagander wrote: On Tue, Jun 3, 2014 at 5:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: What we had better do, IMO, is fix things so that we don't have a filesize limit in the basebackup

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Andres Freund
On 2014-06-03 18:23:07 +0200, Magnus Hagander wrote: On Jun 3, 2014 6:17 PM, Andres Freund and...@2ndquadrant.com wrote: PG's tar.c already uses the ustar format and the referenced extension is an extension to ustar as far as I understand it. So at least tarballs with files 8GB would still

Re: [HACKERS] pg_basebackup failed to back up large file

2014-06-03 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: Yeah, that is a clear advantage of that method. Didn't read up on pax format backwards compatibility, does it have some trick to achieve something similar? I didn't read the fine print but it sounded like the extended header would look like a

Re: [HACKERS] SP-GiST bug.

2014-06-03 Thread Tom Lane
Teodor Sigaev teo...@sigaev.ru writes: The point I'm making is that the scenario your test case exposes is not an infinite loop of picksplits, but an infinite loop of choose calls. Thank you, now I see what I missed before. After some brainstorming, it's possible to use '\0' only as end of

[HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Andres Freund
Hi, In 9.4. COSTS OFF for EXPLAIN prevents 'Planning time' to be printed. Should we perhaps do the same for 'Execution time'? That'd make it possible to use EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF) in regression tests. Currently the output for that is: postgres=# EXPLAIN (ANALYZE, TIMING OFF,

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread David G Johnston
Vik Fearing wrote On 06/03/2014 03:30 PM, Abhijit Menon-Sen wrote: At 2014-06-03 15:06:11 +0200, vik.fearing@ wrote: This patch implements a timeout for broken clients that idle in transaction. I think this is a nice feature, but I suggest that (at the very least) the GUC should be

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: In 9.4. COSTS OFF for EXPLAIN prevents 'Planning time' to be printed. Should we perhaps do the same for 'Execution time'? That'd make it possible to use EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF) in regression tests. Currently the output for that

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Andres Freund
On 2014-06-03 15:08:15 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: In 9.4. COSTS OFF for EXPLAIN prevents 'Planning time' to be printed. Should we perhaps do the same for 'Execution time'? That'd make it possible to use EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF) in

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Robert Haas
On Tue, Jun 3, 2014 at 3:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: In 9.4. COSTS OFF for EXPLAIN prevents 'Planning time' to be printed. Should we perhaps do the same for 'Execution time'? That'd make it possible to use EXPLAIN (ANALYZE, COSTS OFF,

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-03 Thread Keith Fiske
On Tue, Jun 3, 2014 at 10:48 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-03 10:37:53 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-03 10:24:46 -0400, Tom Lane wrote: Personally, I would wonder why the regression tests contain such a query

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jun 3, 2014 at 3:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: It seems a little weird to call it a cost ... but maybe that ship has sailed given how we're treating the planning-time item. Maybe we could make it be controlled by TIMING. Seems

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Andres Freund
On June 3, 2014 9:40:27 PM CEST, Robert Haas robertmh...@gmail.com wrote: On Tue, Jun 3, 2014 at 3:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: In 9.4. COSTS OFF for EXPLAIN prevents 'Planning time' to be printed. Should we perhaps do the same for

Re: [HACKERS] Memory deallocation after calling cast function

2014-06-03 Thread Tom Lane
Soroosh Sardari soroosh.sard...@gmail.com writes: I have problem with memory deallocation. look at the following queries 1- create table test01(a) as select generate_series(1,1)::int8 ; Do it as, eg, create table test01(a) as select g::int8 from generate_series(1,1) g; SRFs

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Alvaro Herrera
Andres Freund wrote: On June 3, 2014 9:40:27 PM CEST, Robert Haas robertmh...@gmail.com wrote: Maybe we could make it be controlled by TIMING. Seems like it fits well-enough there. Don't think that fits well - TIMING imo is about reducing the timing overhead. But the server side total

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Robert Haas
On Tue, Jun 3, 2014 at 4:02 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Andres Freund wrote: On June 3, 2014 9:40:27 PM CEST, Robert Haas robertmh...@gmail.com wrote: Maybe we could make it be controlled by TIMING. Seems like it fits well-enough there. Don't think that fits well -

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jun 3, 2014 at 4:02 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Pah. So what we need is a new mode, REGRESSTEST ON or something. Well, we could invent that. But I personally think piggybacking on COSTS makes more sense. I've been

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-03 Thread Robert Haas
On Tue, Jun 3, 2014 at 10:14 AM, Tom Lane t...@sss.pgh.pa.us wrote: If we had such a mechanism, then perhaps someone could build a UI providing the sort of user feedback you're suggesting to help them use it more safely. But isn't the core server support the first thing? I'm guessing you

Re: [HACKERS] avoiding tuple copying in btree index builds

2014-06-03 Thread Robert Haas
On Sun, Jun 1, 2014 at 3:26 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, May 6, 2014 at 12:04 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, May 5, 2014 at 2:13 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-05 13:52:39 -0400, Robert Haas wrote: Today, I

Re: [HACKERS] json casts

2014-06-03 Thread Peter Eisentraut
On 5/28/14, 6:48 PM, Andrew Dunstan wrote: On 05/27/2014 07:25 PM, Andrew Dunstan wrote: On 05/27/2014 07:17 PM, Tom Lane wrote: Stephen Frost sfr...@snowman.net writes: * Andrew Dunstan (and...@dunslane.net) wrote: Given that this would be a hard coded behaviour change, is it too late to

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jun 3, 2014 at 10:14 AM, Tom Lane t...@sss.pgh.pa.us wrote: I'm guessing you did not read http://www.postgresql.org/message-id/18723.1401734...@sss.pgh.pa.us Argh, sorry, I saw that go by and it went past my eyes but obviously I didn't really

Re: [HACKERS] json casts

2014-06-03 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: This was solved back in the day for the xml type, which has essentially the same requirement, by adding an ISO-8601-compatible output option to EncodeDateTime(). See map_sql_value_to_xml_value() in xml.c. You ought to be able to reuse that. Seems

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Josh Berkus
Vik, When the timeout occurs, the backend commits suicide with a FATAL ereport. I thought about just aborting the transaction to free the locks but decided that the client is clearly broken so might as well free up the connection as well. Out of curiosity, how much harder would it have been

Re: [HACKERS] Could not finish anti-wraparound VACUUM when stop limit is reached

2014-06-03 Thread Jeff Janes
On Sun, May 25, 2014 at 8:40 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: While debugging the B-tree bug that Jeff Janes reported ( http://www.postgresql.org/message-id/CAMkU=1y=VwF07Ay+Cpqk_ 7fpihrctmssv9y99sbghitkxpb...@mail.gmail.com), a new issue came up: If you reach the

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Out of curiosity, how much harder would it have been just to abort the transaction? I think breaking the connection is probably the right behavior, but before folks start arguing it out, I wanted to know if aborting the transaction is even a reasonable

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Alvaro Herrera
Josh Berkus wrote: Argument in favor of breaking the connection: most of the time, IITs are caused by poor error-handling or garbage-collection code on the client side, which has already abandoned the application session but hadn't let go of the database handle. Since the application is

Re: [HACKERS] json casts

2014-06-03 Thread Andrew Dunstan
On 06/03/2014 04:45 PM, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: This was solved back in the day for the xml type, which has essentially the same requirement, by adding an ISO-8601-compatible output option to EncodeDateTime(). See map_sql_value_to_xml_value() in xml.c. You

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Andrew Dunstan
On 06/03/2014 05:53 PM, Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: Out of curiosity, how much harder would it have been just to abort the transaction? I think breaking the connection is probably the right behavior, but before folks start arguing it out, I wanted to know if aborting

Re: [HACKERS] Could not finish anti-wraparound VACUUM when stop limit is reached

2014-06-03 Thread Jeff Janes
On Sun, May 25, 2014 at 8:53 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-25 11:40:09 -0400, Heikki Linnakangas wrote: So, vac_truncate_clog() tries to get a new transaction ID, which fails because we've already reached the stop-limit. vac_truncate_clog() doesn't really need

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Josh Berkus
On 06/03/2014 02:53 PM, Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: Out of curiosity, how much harder would it have been just to abort the transaction? I think breaking the connection is probably the right behavior, but before folks start arguing it out, I wanted to know if

Re: [HACKERS] Allowing join removals for more join types

2014-06-03 Thread Noah Misch
On Wed, May 28, 2014 at 08:39:32PM +1200, David Rowley wrote: The attached patch allows join removals for both sub queries with left joins and also semi joins where a foreign key can prove the existence of the record. When a snapshot can see modifications that queued referential integrity

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Vik Fearing
On 06/04/2014 01:38 AM, Josh Berkus wrote: On 06/03/2014 02:53 PM, Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: Out of curiosity, how much harder would it have been just to abort the transaction? I think breaking the connection is probably the right behavior, but before folks start

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread David G Johnston
On Tue, Jun 3, 2014 at 7:40 PM, Josh Berkus [via PostgreSQL] ml-node+s1045698n5805933...@n5.nabble.com wrote: On 06/03/2014 02:53 PM, Tom Lane wrote: Josh Berkus [hidden email] http://user/SendEmail.jtp?type=nodenode=5805933i=0 writes: Out of curiosity, how much harder would it have been

Re: [HACKERS] Hide 'Execution time' in EXPLAIN (COSTS OFF)

2014-06-03 Thread Noah Misch
On Tue, Jun 03, 2014 at 08:05:48PM +0200, Andres Freund wrote: In 9.4. COSTS OFF for EXPLAIN prevents 'Planning time' to be printed. Should we perhaps do the same for 'Execution time'? That'd make it possible to use EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF) in regression tests. I have wanted

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-03 Thread Haribabu Kommi
On Wed, Jun 4, 2014 at 5:46 AM, Keith Fiske ke...@omniti.com wrote: Andres's changes on June 3rd to https://github.com/postgres/postgres/commits/master/src/test/regress/expected/create_function_3.out are causing patch v2 to fail for that regression test file. postgres $ patch -p1 -i

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Vik Fearing
On 06/04/2014 02:01 AM, David G Johnston wrote: ​Default to dropping the connection but give the usersadministrators the capability to decide for themselves? Meh. I still haven't heard an argument for why this wouldn't apply to aborted idle-in-transactions. I get the focus in on releasing

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Robert Haas
On Tue, Jun 3, 2014 at 5:53 PM, Tom Lane t...@sss.pgh.pa.us wrote: Josh Berkus j...@agliodbs.com writes: Out of curiosity, how much harder would it have been just to abort the transaction? I think breaking the connection is probably the right behavior, but before folks start arguing it out, I

[HACKERS] Perl coding error in msvc build system?

2014-06-03 Thread Peter Eisentraut
I'm not sure whether the following coding actually detects any errors: Solution.pm: open(P, cl /? 21 |) || die cl command not found; VSObjectFactory.pm: open(P, nmake /? 21 |) || croak Unable to determine Visual Studio version: The nmake command wasn't found.; The

Re: [HACKERS] pg_stat directory and pg_stat_statements

2014-06-03 Thread Fujii Masao
On Tue, Jun 3, 2014 at 6:38 PM, Magnus Hagander mag...@hagander.net wrote: On Mon, Jun 2, 2014 at 4:07 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-02 22:59:55 +0900, Fujii Masao wrote: On Thu, May 29, 2014 at 3:02 PM, Peter Geoghegan p...@heroku.com wrote: On Wed, May 28,

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I thought the reason why this hasn't been implemented before now is that sending an ErrorResponse to the client will result in a loss of protocol sync. Hmm ... you are right that this isn't as simple as an ereport(ERROR), but I'm not sure it's

Re: [HACKERS] recovery testing for beta

2014-06-03 Thread Amit Kapila
On Mon, Jun 2, 2014 at 9:44 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-02 09:03:25 -0700, Jeff Janes wrote: On Fri, May 30, 2014 at 8:09 PM, Amit Kapila amit.kapil...@gmail.com I think this is useful information and can be even included in core code. I'd like to include

Re: [HACKERS] Proposing pg_hibernate

2014-06-03 Thread Amit Kapila
On Tue, Jun 3, 2014 at 5:43 PM, Gurjeet Singh gurj...@singh.im wrote: On Tue, Jun 3, 2014 at 7:57 AM, Robert Haas robertmh...@gmail.com wrote: It seems like it would be best to try to do this at cluster startup time, rather than once recovery has reached consistency. Of course, that might