Re: [HACKERS] logical column ordering

2015-03-13 Thread Jeff Janes
On Mon, Feb 23, 2015 at 3:09 PM, Tomas Vondra tomas.von...@2ndquadrant.com wrote: Hi, attached is the result of my first attempt to make the logical column ordering patch work. This touches a lot of code in the executor that is mostly new to me, so if you see something that looks like an

Re: [HACKERS] get_object_address support for additional object types

2015-03-13 Thread Stephen Frost
Alvaro, * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: Stephen Frost wrote: I thought the rest of it looked alright. I agree it's a bit odd how the opfamily is handled but I agree with your assessment that there's not much better we can do with this object representation. Actually,

Re: [HACKERS] New CF app deployment

2015-03-13 Thread Jeff Janes
On Sun, Feb 22, 2015 at 12:13 PM, Magnus Hagander mag...@hagander.net wrote: On Sun, Feb 15, 2015 at 9:46 PM, Peter Geoghegan p...@heroku.com wrote: On Sun, Feb 15, 2015 at 4:59 PM, Peter Eisentraut pete...@gmx.net wrote: I think the old system where the patch submitter declared, this

[HACKERS] Paper from IBM: Memory-Efficient Hash Joins

2015-03-13 Thread Arthur Silva
I've come across this paper today, I thought I'd share it here too. http://www.vldb.org/pvldb/vol8/p353-barber.pdf -- Arthur Silva

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-13 Thread David G. Johnston
On Fri, Mar 13, 2015 at 10:01 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-03-13 17:39 GMT+01:00 Robert Haas robertmh...@gmail.com: On Fri, Mar 13, 2015 at 11:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: we found possible bug in pg_dump. It raise a error only when all

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-13 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Another bit of this that I think we could commit without fretting about it too much is the code adding set_join_pathlist_hook. This is - I think - analogous to set_rel_pathlist_hook, and like that hook, could be used for other purposes than custom

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-13 Thread Peter Geoghegan
On Thu, Mar 12, 2015 at 6:23 PM, Andreas Karlsson andr...@proxel.se wrote: Fixed. Did you intend to attach a patch here? I think you should talk about the new thing first (just after the extant, first sentence Integer data types use Numeric...). Refer to where 128-bit integers are used and

Re: [HACKERS] Regarding pg_stat_statements

2015-03-13 Thread Josh Berkus
On 03/13/2015 02:29 AM, Sreerama Manoj wrote: As we know that pg_stat_statements will monitor the queries after normalizing the queries(Removes the values present in query). I want to know is there a way to store those normalized values because I want to check the type of data(values)

Re: [HACKERS] Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs

2015-03-13 Thread Jeff Janes
On Mon, Jan 5, 2015 at 7:12 AM, Atri Sharma atri.j...@gmail.com wrote: Hi All, Please forgive if this is a repost. Please find attached patch for supporting ORDER BY clause in CREATE FUNCTION for SRFs. Hi Atri, From the discussion, I don't know if this patch is still being proposed. If

Re: [HACKERS] Performance improvement for joins where outer side is unique

2015-03-13 Thread David Rowley
On 13 March 2015 at 20:34, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Hello. The performance drag was not so large after all. Great, thanks for retesting this. For all that, I agree that the opition that this kind of separate multiple-nested loops on relations, joins or ECs

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-13 Thread Andreas Karlsson
On 03/13/2015 10:22 PM, Peter Geoghegan wrote: On Thu, Mar 12, 2015 at 6:23 PM, Andreas Karlsson andr...@proxel.se wrote: /* * Integer data types use Numeric accumulators to share code and avoid risk * of overflow. To speed up aggregation 128-bit integer accumulators are * used instead

Re: [HACKERS] Re: Abbreviated keys for Datum tuplesort

2015-03-13 Thread Andrew Gierth
Peter == Peter Geoghegan p...@heroku.com writes: Peter I attach a slightly tweaked version of Andrew's original. You changed this: static int comparetup_datum(const SortTuple *a, const SortTuple *b, Tuplesortstate *state) { -int compare; +int32 compare; compare

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Kapila
On Thu, Mar 12, 2015 at 9:50 PM, Thom Brown t...@linux.com wrote: On 12 March 2015 at 15:29, Amit Kapila amit.kapil...@gmail.com wrote: Please note that parallel_setup_cost and parallel_startup_cost are still set to zero by default, so you need to set it to higher values if you don't want

[HACKERS] Ye olde write_history() return code problem

2015-03-13 Thread Tom Lane
David Johnston's recent gripe reminded me of the problem we've been working around for many years, that readline and libedit don't agree on the return code convention for write_history(). We've attempted to work around that by supposing that if errno becomes set to nonzero during write_history()

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-13 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Mar 13, 2015 at 2:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't object to the concept, but I think that is a pretty bad place to put the hook call: add_paths_to_joinrel is typically called multiple (perhaps *many*) times per joinrel and

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 2:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Another bit of this that I think we could commit without fretting about it too much is the code adding set_join_pathlist_hook. This is - I think - analogous to set_rel_pathlist_hook,

Re: [HACKERS] Strange debug message of walreciver?

2015-03-13 Thread Tatsuo Ishii
On Sun, Mar 8, 2015 at 8:13 PM, Tatsuo Ishii is...@postgresql.org wrote: On Sat, Mar 7, 2015 at 10:18 PM, Tatsuo Ishii is...@postgresql.org wrote: When I set log_min_messages to debug5 and looked into walreciver log, I saw this: 3600 2015-03-08 09:47:38 JST DEBUG: sendtime

Re: [HACKERS] Re: Abbreviated keys for Datum tuplesort

2015-03-13 Thread Peter Geoghegan
On Sun, Jan 25, 2015 at 3:15 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Robert I think this is a good idea. Do you have a test case that Robert shows the benefit? The best test case for datum sort performance is to use percentile_disc, since that has almost no overhead beyond

[HACKERS] xloginsert.c hole_length warning on gcc 4.8.3

2015-03-13 Thread Tomas Vondra
Hi there, with gcc 4.8.3, I'm getting this warning in xloginsert.c: - xloginsert.c: In function ‘XLogInsert’: xloginsert.c:668:20: warning: ‘hole_length’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (hole_length != 0 is_compressed)

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-13 Thread Josh Berkus
On 03/13/2015 10:01 AM, Pavel Stehule wrote: 2015-03-13 17:39 GMT+01:00 Robert Haas robertmh...@gmail.com mailto:robertmh...@gmail.com: On Fri, Mar 13, 2015 at 11:26 AM, Pavel Stehule pavel.steh...@gmail.com mailto:pavel.steh...@gmail.com wrote: we found possible bug in

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-13 Thread Kyotaro HORIGUCHI
Hello, At Thu, 12 Mar 2015 15:27:37 -0700, Peter Geoghegan p...@heroku.com wrote in CAM3SWZQ5nwTB-y4ZOj=5ckMLce5GAEUnjKJ2=m1vmhfx_ay...@mail.gmail.com On Sat, Feb 14, 2015 at 4:19 PM, Kevin Grittner kgri...@ymail.com wrote: At some point we could consider building on this patch to recheck

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-13 Thread Simon Riggs
On 4 March 2015 at 03:16, Kevin Grittner kgri...@ymail.com wrote: How do people feel about the idea of me pushing this for 9.5 (after I clean up all the affected comments and README files)? I know this first appeared in the last CF, but the footprint is fairly small and the only user-visible

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Kapila
On Fri, Mar 13, 2015 at 2:12 PM, Amit Langote langote_amit...@lab.ntt.co.jp wrote: On 13-03-2015 PM 05:32, Amit Langote wrote: On 12-03-2015 PM 11:46, Amit Kapila wrote: [parallel_seqscan_v10.patch] There may be a bug in TupleQueueFunnelNext(). 1) I observed a hang with stack looking

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Langote
On 12-03-2015 PM 11:46, Amit Kapila wrote: [parallel_seqscan_v10.patch] There may be a bug in TupleQueueFunnelNext(). 1) I observed a hang with stack looking like: #0 0x0039696df098 in poll () from /lib64/libc.so.6 #1 0x006f1c6a in WaitLatchOrSocket (latch=0x7f29dc3c73b4,

Re: [HACKERS] forward vs backward slashes in msvc build code

2015-03-13 Thread Michael Paquier
On Fri, Mar 13, 2015 at 6:20 AM, Alvaro Herrera wrote: Peter Eisentraut wrote: This is contrib/chkpass not finding the crypt symbol, which is presumably in some library. But I can't see how it would normally find it, without my patch. It seems crypt is provided by libpgport. So chkpass

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-13 Thread Julien Tachoires
Hi, On 10/03/2015 00:31, Andreas Karlsson wrote: On 03/03/2015 04:14 PM, Julien Tachoires wrote: Sorry for the delay, I missed this thread. Here is a new version of this patch considering Andreas' comments. Please also add it to the next open commitfest so we do not lose the patch. Here is

[HACKERS] Regarding pg_stat_statements

2015-03-13 Thread Sreerama Manoj
Hi, As we know that pg_stat_statements will monitor the queries after normalizing the queries(Removes the values present in query). I want to know is there a way to store those normalized values because I want to check the type of data(values) ,range of data that is being hit to the

Re: [HACKERS] Join push-down support for foreign tables

2015-03-13 Thread Ashutosh Bapat
Hi Hanada-san, I noticed that the patch doesn't have any tests for testing FDW join in postgres_fdw. While you are updating the patch, can you please add few tests for the same. I will suggest adding tests for a combination of these dimensions 1. Types of joins 2. Joins between multiple foreign

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Langote
On 13-03-2015 PM 05:32, Amit Langote wrote: On 12-03-2015 PM 11:46, Amit Kapila wrote: [parallel_seqscan_v10.patch] There may be a bug in TupleQueueFunnelNext(). 1) I observed a hang with stack looking like: #0 0x0039696df098 in poll () from /lib64/libc.so.6 #1 0x006f1c6a

Re: [HACKERS] recovery_target_action doesn't work for anything but shutdown

2015-03-13 Thread Michael Paquier
On Thu, Mar 12, 2015 at 11:53 PM, Andres Freund and...@2ndquadrant.com wrote: On 2015-03-12 15:52:02 +0100, Andres Freund wrote: I guess what you actually intended to test was StandbyModeRequested? Err, EnableHotStandby. Indeed. Without !EnableHotStandby, a node in recovery would simply be

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-13 Thread Robert Haas
On Wed, Mar 11, 2015 at 5:36 PM, Jim Nasby jim.na...@bluetreble.com wrote: The thing is, ()s are actually an odd-duck. Very little supports it, and while COPY allows it they're not required. EXPLAIN is a different story, because that's not WITH; we're actually using () *instead of* WITH.

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-13 Thread Jim Nasby
On 3/13/15 6:48 AM, Robert Haas wrote: On Wed, Mar 11, 2015 at 5:36 PM, Jim Nasby jim.na...@bluetreble.com wrote: The thing is, ()s are actually an odd-duck. Very little supports it, and while COPY allows it they're not required. EXPLAIN is a different story, because that's not WITH; we're

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-03-13 Thread Svenne Krap
Patch from message (87d24iukc5@news-spur.riddles.org.uk) fails (tried to apply on top of ebc0f5e01d2f ), as b55722692 has broken up the line (in src/backend/optimizer/util/pathnode.c): pathnode-path.rows = estimate_num_groups(root, uniq_exprs, rel-rows); After patching the added parameter

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-13 Thread Simon Riggs
On 15 February 2015 at 00:19, Kevin Grittner kgri...@ymail.com wrote: What they wanted was what happened in the other database product -- if a snapshot got sufficiently old that cleaning up the MVCC data was a problem *and* the snapshot was used again *and* it read a page which had been

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 8:57 AM, Jim Nasby jim.na...@bluetreble.com wrote: Yeah, that doesn't sound like a good tradeoff compared to making people type some extra ()s. :( We should at least support ()s on the other commands though, so that we're consistent. I think we've been moving slowly

Re: [HACKERS] CATUPDATE confusion?

2015-03-13 Thread Robert Haas
On Thu, Mar 12, 2015 at 10:36 PM, Stephen Frost sfr...@snowman.net wrote: As near as I can tell, pgAdmin3 does still use pg_user (though I don't think it uses pg_group or pg_shadow except when connected to an ancient server) in some cases. Where it is used, based on my quick review at least,

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Kapila
On Thu, Mar 12, 2015 at 3:44 AM, Haribabu Kommi kommi.harib...@gmail.com wrote: In create_parallelscan_paths() function the funnel path is added once the partial seq scan path is generated. I feel the funnel path can be added once on top of the total possible parallel path in the entire

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 8:52 AM, Simon Riggs si...@2ndquadrant.com wrote: On 15 February 2015 at 00:19, Kevin Grittner kgri...@ymail.com wrote: What they wanted was what happened in the other database product -- if a snapshot got sufficiently old that cleaning up the MVCC data was a problem

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 9:01 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Mar 12, 2015 at 3:44 AM, Haribabu Kommi kommi.harib...@gmail.com wrote: In create_parallelscan_paths() function the funnel path is added once the partial seq scan path is generated. I feel the funnel path can

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-13 Thread Robert Haas
On Thu, Mar 12, 2015 at 8:09 PM, Thom Brown t...@linux.com wrote: On 12 March 2015 at 21:28, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I took a look at this patch today and noticed that it incorporates not only documentation for the new functionality it adds,

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Kapila
On Thu, Mar 12, 2015 at 10:35 PM, Thom Brown t...@linux.com wrote: Another problem. I restarted the instance (just in case), and get this error: # \df+ *.* ERROR: cannot retain locks acquired while in parallel mode This problem occurs because above statement is trying to execute

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Kapila
On Tue, Mar 10, 2015 at 12:26 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Mar 10, 2015 at 10:23 AM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Tue, Mar 10, 2015 at 3:09 PM, Amit Kapila amit.kapil...@gmail.com wrote: I have currently modelled it based on existing rescan

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-13 Thread Kevin Grittner
Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: At Thu, 12 Mar 2015 15:27:37 -0700, Peter Geoghegan p...@heroku.com wrote: On Sat, Feb 14, 2015 at 4:19 PM, Kevin Grittner kgri...@ymail.com wrote: At some point we could consider building on this patch to recheck index conditions for

[HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-13 Thread Pavel Stehule
Hi we found possible bug in pg_dump. It raise a error only when all specified tables doesn't exists. When it find any table, then ignore missing other. /usr/local/pgsql/bin/pg_dump -t Foo -t omega -s postgres /dev/null; echo $? foo doesn't exists - it creates broken backup due missing Foo

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-13 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 13, 2015 at 8:52 AM, Simon Riggs si...@2ndquadrant.com wrote: On 15 February 2015 at 00:19, Kevin Grittner kgri...@ymail.com wrote: What they wanted was what happened in the other database product -- if a snapshot got sufficiently old that

Re: [HACKERS] CATUPDATE confusion?

2015-03-13 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: On Thu, Mar 12, 2015 at 10:36 PM, Stephen Frost sfr...@snowman.net wrote: Basically, in my view at least, these programs are likely to continue to use these backwards compatibility views until we either formally deprecate them or (more

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Kapila
On Fri, Mar 13, 2015 at 7:15 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 13, 2015 at 7:01 AM, Amit Kapila amit.kapil...@gmail.com wrote: I think this can happen if funnel-nextqueue is greater than funnel-nqueues. Please see if attached patch fixes the issue, else could you

Re: [HACKERS] recovery_target_action doesn't work for anything but shutdown

2015-03-13 Thread Petr Jelinek
On 13/03/15 15:06, Petr Jelinek wrote: On 12/03/15 15:53, Andres Freund wrote: On 2015-03-12 15:52:02 +0100, Andres Freund wrote: I guess what you actually intended to test was StandbyModeRequested? Err, EnableHotStandby. Yeah pause does not work currently. This change was made by

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 8:59 AM, Amit Kapila amit.kapil...@gmail.com wrote: We can't directly call DestroyParallelContext() to terminate workers as it can so happen that by that time some of the workers are still not started. That shouldn't be a problem. TerminateBackgroundWorker() not only

Re: [HACKERS] CATUPDATE confusion?

2015-03-13 Thread Stephen Frost
* Stephen Frost (sfr...@snowman.net) wrote: I should have been more specific. I don't believe they've moved to using pg_roles completely (which was created specifically to address the issue that regular users can't select from pg_authid). Err, forgot to finish that thought, sorry. Let's

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 7:01 AM, Amit Kapila amit.kapil...@gmail.com wrote: I think this can happen if funnel-nextqueue is greater than funnel-nqueues. Please see if attached patch fixes the issue, else could you share the scenario in more detail where you hit this issue. Speaking as the guy

Re: [HACKERS] Parallel Seq Scan

2015-03-13 Thread Amit Langote
On Fri, Mar 13, 2015 at 11:03 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Mar 13, 2015 at 7:15 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 13, 2015 at 7:01 AM, Amit Kapila amit.kapil...@gmail.com wrote: I think this can happen if funnel-nextqueue is greater than

Re: [HACKERS] recovery_target_action doesn't work for anything but shutdown

2015-03-13 Thread Petr Jelinek
On 12/03/15 15:53, Andres Freund wrote: On 2015-03-12 15:52:02 +0100, Andres Freund wrote: I guess what you actually intended to test was StandbyModeRequested? Err, EnableHotStandby. Yeah pause does not work currently. This change was made by committer and I think the intended change was

Re: [HACKERS] mogrify and indent features for jsonb

2015-03-13 Thread Petr Jelinek
On 01/03/15 16:49, Andrew Dunstan wrote: On 03/01/2015 05:03 AM, Petr Jelinek wrote: On 23/02/15 18:15, Dmitry Dolgov wrote: Hi, Petr, thanks for the review. I think it would be better if the ident printing didn't put the start of array ([) and start of dictionary ({) on separate line Did

Re: [HACKERS] Regarding pg_stat_statements

2015-03-13 Thread Ronan Dunklau
Le vendredi 13 mars 2015 14:59:28 Sreerama Manoj a écrit : Hi, As we know that pg_stat_statements will monitor the queries after normalizing the queries(Removes the values present in query). I want to know is there a way to store those normalized values because I want to check the type

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 11:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: we found possible bug in pg_dump. It raise a error only when all specified tables doesn't exists. When it find any table, then ignore missing other. /usr/local/pgsql/bin/pg_dump -t Foo -t omega -s postgres

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-13 Thread Pavel Stehule
2015-03-13 17:39 GMT+01:00 Robert Haas robertmh...@gmail.com: On Fri, Mar 13, 2015 at 11:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: we found possible bug in pg_dump. It raise a error only when all specified tables doesn't exists. When it find any table, then ignore missing other.