Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tsunakawa, Takayuki
Hello, I've reviewed the patch. My understanding is as follows. Please correct me if I'm wrong. * The difference is that the Execute message stops the statement_timeout timer, so that the execution of one statement doesn't shorten the timeout period of subsequent statements when they are ru

Re: [HACKERS] gitlab post-mortem: pg_basebackup waiting for checkpoint

2017-04-03 Thread Michael Banck
Am Samstag, den 01.04.2017, 17:29 +0200 schrieb Magnus Hagander: > I've applied a backpatch to 9.4. Prior to that pretty much the entire > patch is a conflict, so it would need a full rewrite. Thanks! Michael -- Michael Banck Projektleiter / Senior Berater Tel.: +49 2166 9901-171 Fax: +49 21

Re: [HACKERS] [COMMITTERS] pgsql: Avoid GatherMerge crash when there are no workers.

2017-04-03 Thread Rushabh Lathia
Hi, On Mon, Apr 3, 2017 at 10:56 AM, Rushabh Lathia wrote: > > > On Sat, Apr 1, 2017 at 7:58 PM, Robert Haas wrote: > >> On Fri, Mar 31, 2017 at 10:26 PM, Andres Freund >> wrote: >> > Hi, >> > >> > On 2017-04-01 01:22:14 +, Robert Haas wrote: >> >> Avoid GatherMerge crash when there are no

Re: [HACKERS] Logical decoding on standby

2017-04-03 Thread Craig Ringer
On 3 April 2017 at 13:46, Craig Ringer wrote: > OK, updated catalog_xmin logging patch attached. Ahem, that should be v5. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 7f742f582e1f6f8f23c4e9d78cd0298180e5387c Mon

Re: [HACKERS] Logical decoding on standby

2017-04-03 Thread Craig Ringer
On 3 April 2017 at 15:27, Craig Ringer wrote: > On 3 April 2017 at 13:46, Craig Ringer wrote: > >> OK, updated catalog_xmin logging patch attached. > > Ahem, that should be v5. ... and here's v6, which returns to the separate xl_xact_catalog_xmin_advance approach. pgintented. This is what I fa

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Fabien COELHO
Hello Tom, about version numbers [...] Of course, there are probably other ways to do that, but my point is that you haven't made a case why we need to put this in now rather than later. Indeed, I have not. What about having the ability to test for minor versions? \if false -- pre 1

Re: [HACKERS] Foreign tables don't enforce the partition constraint

2017-04-03 Thread Amit Langote
Hi Ashutosh, On 2017/04/03 15:49, Ashutosh Bapat wrote: >>> Similarly, a partition constraint >>> should also be enforced at the foreign server. Probably we should >>> update documentation of create foreign table to mention this. >> >> That is a good idea. >> >> Here's the patch. Thanks for creat

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tatsuo Ishii
Thank you for reviewing my patch! > Hello, > > > I've reviewed the patch. My understanding is as follows. Please correct me > if I'm wrong. > > * The difference is that the Execute message stops the statement_timeout > timer, No. Parse, bind and Execute message indivually stops and starts

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread David Rowley
On 1 April 2017 at 16:42, Claudio Freire wrote: > > I thought to take a quick look at this patch. I'll probably take a > deeper look later, but some initial comments: > > -typedef struct RangeQueryClause > +typedef struct CachedSelectivityClause > { > -struct RangeQueryClause *next;/*

Re: [HACKERS] pg_partman 3.0.0 - real-world usage of native partitioning and a case for native default

2017-04-03 Thread Ashutosh Bapat
On Fri, Mar 31, 2017 at 9:00 PM, Keith Fiske wrote: > I've gotten pg_partman working with native partitioning already so I can > hopefully have things ready to work when 10 is released. I've got a branch > on github with this version for anyone to test and I'll hopefully have this > released in t

Re: [HACKERS] [BUGS] BUG #14600: Passwords in user mappings leaked by psql \deu+ command

2017-04-03 Thread Ashutosh Bapat
Please add this to 07/2017 commitfest. It looks like an existing leak, so, may not be considered as an open item for v10. On Fri, Mar 31, 2017 at 11:51 PM, Feike Steenbergen < feikesteenber...@gmail.com> wrote: > Forwarding message from pgsql-bugs for review > > > Attached a patch which copies th

[HACKERS] Refactoring identifier checks to consistently use strcmp

2017-04-03 Thread Daniel Gustafsson
Testing DefElem options is done with both strcmp() and pg_strcasecmp() a bit mixed. Since the option defnames are all lowercased, either via IDENT, keyword rules or “by hand” with makeString(), using strcmp() is safe (and assumed to be so in quite a lot of places). While it’s not incorrect per se

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-04-03 Thread Kuntal Ghosh
On Fri, Mar 31, 2017 at 6:50 PM, Robert Haas wrote: > On Thu, Mar 30, 2017 at 4:35 PM, Kuntal Ghosh > wrote: >> 2. the server restarts automatically, initialize >> BackgroundWorkerData->parallel_register_count and >> BackgroundWorkerData->parallel_terminate_count in the shared memory. >> After th

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-04-03 Thread Amit Langote
On 2017/04/01 6:44, Robert Haas wrote: > On Fri, Mar 31, 2017 at 5:33 PM, Peter Geoghegan wrote: >> In my opinion, for the very limited ON CONFLICT DO NOTHING + no >> inference specification case, the implementation should not care about >> the presence or absence of unique indexes within or acros

Re: [HACKERS] UPDATE of partition key

2017-04-03 Thread Amit Langote
Hi Amit, Thanks for updating the patch. Since ddl.sgml got updated on Saturday, patch needs a rebase. > On 31 March 2017 at 16:54, Amit Khandekar wrote: >> On 31 March 2017 at 14:04, Amit Langote >> wrote: >>> On 2017/03/28 19:12, Amit Khandekar wrote: In the section 5.11 "Partitioning"

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Daniel Verite
Fabien COELHO wrote: > My 0.02 € about server-side expressions: ISTM that there is nothing > obvious/easy to do to include these: > > - how would it work, both with \set ... and \if ...? The idea is that the need to have two command (a SELECT .. \gset followed by an \if) and a tempora

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-04-03 Thread Andreas Karlsson
On 04/03/2017 07:57 AM, Michael Paquier wrote: On Fri, Mar 31, 2017 at 5:12 PM, Andreas Karlsson wrote: On 03/31/2017 08:27 AM, Michael Paquier wrote: - Do a per-index rebuild and not a per-relation rebuild for concurrent indexing. Doing a per-relation reindex has the disadvantage that many ob

[HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Michael Paquier
Hi all, The $subject has been mentioned a couple of times already, the last one being here: https://www.postgresql.org/message-id/20170401072814.ga2528...@tornado.leadboat.com The code tree has to maintain now two set of scripts for the same test: test.sh for all *nix platforms, and vcregress.pl

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Craig Ringer
On 3 April 2017 at 21:07, Michael Paquier wrote: > Hi all, > > The $subject has been mentioned a couple of times already, the last > one being here: > https://www.postgresql.org/message-id/20170401072814.ga2528...@tornado.leadboat.com > > The code tree has to maintain now two set of scripts for th

[HACKERS] wait event documentation

2017-04-03 Thread Robert Haas
Right now, the information on wait events is organized into one giant table inside https://www.postgresql.org/docs/devel/static/monitoring-stats.html#monitoring-stats-views -- the wait event type is inserted into the lefthand column of the table using moreRows="...", which is awkward to maintain a

Re: [HACKERS] delta relations in AFTER triggers

2017-04-03 Thread Tom Lane
Thomas Munro writes: > Or perhaps the code to inject trigger data transition tables into SPI > (a near identical code block these three patches) should be somewhere > common so that each PLs would only need to call a function. If so, > where should that go? spi.c? regard

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tom Lane
Tatsuo Ishii writes: >> * The difference is that the Execute message stops the statement_timeout >> timer, > No. Parse, bind and Execute message indivually stops and starts the > statement_timeout timer with the patch. That seems like it could represent quite a lot of added overhead, on machin

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Tom Lane
"Daniel Verite" writes: > Let's imagine that psql would support a syntax like this: > \if [select current_setting('server_version_num')::int < 11] > or > \if [select 1 from pg_catalog.pg_extension where extname='pgcrypto'] I really dislike this syntax proposal. It would get us into havin

Re: [HACKERS] [GSoC] Push-based query executor discussion

2017-04-03 Thread Arseny Sher
Time is short, student's application deadline is on 3rd April. I decided to reformulate the project scope myself. Here is the proposal: https://docs.google.com/document/d/1dvBETE6IJA9AcXd11XJNPsF_VPcDhSjy7rlsxj262l8/edit?usp=sharing The main idea is that now there is a formalized goal of the proj

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tatsuo Ishii
> That seems like it could represent quite a lot of added overhead, > on machines where gettimeofday() is slow ... which is still a lot > of them, unfortunately. Maybe. I think we could eliminate restarting the timer for parse and bind. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: h

Re: [HACKERS] Questionable tag usage

2017-04-03 Thread Peter Eisentraut
On 3/21/17 21:50, Peter Eisentraut wrote: > This question is still open. Do we want to keep the new linking style > Section 1.2.3, "Title", or revert back to the old style just Section > 1.2.3? It's a simple toggle setting. Changed back to old style, per discussion. -- Peter Eisentraut

Re: [HACKERS] bug/oversight in TestLib.pm and PostgresNode.pm

2017-04-03 Thread Peter Eisentraut
On 3/22/17 11:51, Erik Rijkers wrote: > While trying to test pgbench's stderr (looking for 'creating tables' in > output of the initialisation step) I ran into these two bugs (or > perhaps better 'oversights'). Perhaps pgbench should be printing progress messages to stdout instead? > But espec

Re: [HACKERS] Unable to build doc on latest head

2017-04-03 Thread Tom Lane
Ashutosh Bapat writes: > Recently my doc build has started failing with errors > runtime error: file stylesheet.xsl line 57 element call-template > The called template 'id.attribute' was not found. > [1] says that id.attribute is supported in stylesheets version 1.77.1. Do I > need to update styl

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Stephen Frost
Craig, Michael, * Craig Ringer (cr...@2ndquadrant.com) wrote: > On 3 April 2017 at 21:07, Michael Paquier wrote: > > I am parking that in the next commit fest. > > Great. > > Count me in as reviewer, and feel free to poke me if I get caught up > in other things. I'm interested in this also. >

Re: [HACKERS] Fix slot name change handling for subscriptions

2017-04-03 Thread Peter Eisentraut
On 3/24/17 10:45, Petr Jelinek wrote: > ALTER SUBSCRIPTION ... WITH (SLOT NAME = foo) will make the worker dies > on error about unexpected subscription changed. It's my oversight in the > original logical replication patch-set. Attached patch fixes it to > behave same way as other changes to subsc

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Peter Eisentraut
On 4/3/17 09:07, Michael Paquier wrote: > I had for some time a WIP patch on which dust has accumulated, so > attached is a more polished version. In more details, here is what > happens: > - test.sh is removed. > - vcregress.pl loses upgradecheck. > - The new test is added. In the case of MSVC thi

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Andres Freund
On 2017-04-03 11:22:02 -0400, Peter Eisentraut wrote: > On 4/3/17 09:07, Michael Paquier wrote: > > I had for some time a WIP patch on which dust has accumulated, so > > attached is a more polished version. In more details, here is what > > happens: > > - test.sh is removed. > > - vcregress.pl lose

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 4/3/17 09:07, Michael Paquier wrote: > > I had for some time a WIP patch on which dust has accumulated, so > > attached is a more polished version. In more details, here is what > > happens: > > - test.sh is removed. > > - vc

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-03 Thread Mike Palmiotto
On Fri, Mar 31, 2017 at 8:23 PM, Robert Haas wrote: > On Fri, Mar 31, 2017 at 2:14 PM, Mike Palmiotto > wrote: >> Attached you will find two patches, which were rebased on master as of >> 156d388 (applied with `git am --revert [patch file]`). The first gets >> rid of some pesky compiler warnings

Re: [HACKERS] delta relations in AFTER triggers

2017-04-03 Thread Kevin Grittner
On Mon, Apr 3, 2017 at 8:59 AM, Tom Lane wrote: > Thomas Munro writes: >> Or perhaps the code to inject trigger data transition tables into SPI >> (a near identical code block these three patches) should be somewhere >> common so that each PLs would only need to call a function. If so, >> where

Re: [HACKERS] Unable to build doc on latest head

2017-04-03 Thread Peter Eisentraut
On 4/3/17 02:44, Ashutosh Bapat wrote: > [1] says that id.attribute is supported in stylesheets version 1.77.1. > Do I need to update stylesheets version? How do I do it? Any help will > be appreciated. The oldest version among the ones listed at http://docbook.sourceforge.net/release/xsl/ that wo

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-03 Thread Joe Conway
On 03/31/2017 05:23 PM, Robert Haas wrote: > On Fri, Mar 31, 2017 at 2:14 PM, Mike Palmiotto > wrote: >> Attached you will find two patches, which were rebased on master as of >> 156d388 (applied with `git am --revert [patch file]`). The first gets >> rid of some pesky compiler warnings and the se

Re: [HACKERS] bumping HASH_VERSION to 3

2017-04-03 Thread Joe Conway
On 03/31/2017 11:19 AM, Magnus Hagander wrote: > On Fri, Mar 31, 2017 at 8:17 PM, Robert Haas > wrote: > > Starting a new thread about this to get more visibility. > > Despite the extensive work that has been done on hash indexes this > release, we have

[HACKERS] Can't compile with profiling after BRIN autosummarization

2017-04-03 Thread Jeff Janes
make maintainer-clean > /dev/null ; ./configure --enable-profiling > /dev/null && make -j8 >/dev/null In file included from ipc.c:29: ../../../../src/include/postmaster/autovacuum.h:73: error: expected declaration specifiers or '...' before 'BlockNumber' make[4]: *** [ipc.o] Error 1 make[3]: ***

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Daniel Verite
Tom Lane wrote: > I really dislike this syntax proposal. It would get us into having > to count nested brackets, and distinguish quoted from unquoted brackets, > and so on ... and for what? It's not really better than > > \if sql select 1 from pg_catalog.pg_extension where extname='pg

Re: [HACKERS] GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree"

2017-04-03 Thread Kevin Grittner
On Sat, Apr 1, 2017 at 9:03 AM, anant khandelwal wrote: > My name is Anant Khandelwal currently i am pursuing masters from IIT - Delhi > and previously i am a software engineer. > > I am particularly interested in working on the project "Explicitly support > predicate locks in index access method

Re: [HACKERS] Can't compile with profiling after BRIN autosummarization

2017-04-03 Thread Jeff Janes
On Mon, Apr 3, 2017 at 9:31 AM, Jeff Janes wrote: > make maintainer-clean > /dev/null ; ./configure --enable-profiling > > /dev/null && make -j8 >/dev/null > > In file included from ipc.c:29: > ../../../../src/include/postmaster/autovacuum.h:73: error: expected > declaration specifiers or '...'

Re: [HACKERS] pg_partman 3.0.0 - real-world usage of native partitioning and a case for native default

2017-04-03 Thread Keith Fiske
On Mon, Apr 3, 2017 at 5:13 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > > On Fri, Mar 31, 2017 at 9:00 PM, Keith Fiske wrote: > >> I've gotten pg_partman working with native partitioning already so I can >> hopefully have things ready to work when 10 is released. I've got a b

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Andres Freund
On 2017-04-03 11:34:52 -0400, Stephen Frost wrote: > Peter, > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > > On 4/3/17 09:07, Michael Paquier wrote: > > > I had for some time a WIP patch on which dust has accumulated, so > > > attached is a more polished version. In more detail

Fwd: [HACKERS] GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree"

2017-04-03 Thread anant khandelwal
-- Forwarded message -- From: anant khandelwal Date: Mon, Apr 3, 2017 at 11:13 PM Subject: Re: [HACKERS] GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree" To: Kevin Grittner First ,I have read from this https://github.com/postgres

Re: [HACKERS] parallel bitmapscan isn't exercised in regression tests

2017-04-03 Thread Andres Freund
On 2017-04-01 17:23:04 +0530, Dilip Kumar wrote: > On Sat, Apr 1, 2017 at 12:16 AM, Andres Freund wrote: > > Hi, > > > > The parallel code-path isn't actually exercised in the tests added in > > [1], as evidenced by [2] (they just explain). That imo needs to be > > fixed. > > Thanks for reportin

Re: [HACKERS] parallel explain analyze support not exercised

2017-04-03 Thread Andres Freund
On 2017-04-03 10:26:27 +0530, Rafia Sabih wrote: > On Sat, Apr 1, 2017 at 12:25 AM, Andres Freund wrote: > > Hi, > > > > As visible in [1], the explain analyze codepaths of parallel query isn't > > exercised in the tests. That used to be not entirely trivial if the > > output was to be displayed

Re: [HACKERS] [BUGS] BUG #14600: Passwords in user mappings leaked by psql \deu+ command

2017-04-03 Thread Jeff Janes
On Fri, Mar 31, 2017 at 11:21 AM, Feike Steenbergen < feikesteenber...@gmail.com> wrote: > Forwarding message from pgsql-bugs for review > > > Attached a patch which copies the logic from commit > 93a6be63a55a8cd0d73b3fa81eb6a46013a3a974. > > In the current implementation we only consider privileg

Re: [HACKERS] Rewriting the test of pg_upgrade as a TAP test

2017-04-03 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > I don't fundamentally disagree with anything here, but I think it'd be a > serious mistake to link this to the conversion of the pg_upgrade tests > to tap tests. I agree that we should move forward with that conversion, regardless of the rest

Re: [HACKERS] identity columns

2017-04-03 Thread Andres Freund
On 2017-03-29 13:40:29 -0400, Peter Eisentraut wrote: > On 3/24/17 05:29, Vitaly Burovoy wrote: > > It would be great if "DROP IDENTITY IF EXISTS" is in the current patch > > since we don't have any disagreements about "DROP IDENTITY" behavior > > and easiness of implementation of "IF EXISTS" there

Re: [HACKERS] postgres_fdw: evaluate placeholdervars on remote server

2017-04-03 Thread Andres Freund
Hi, On 2017-02-28 21:45:22 +0900, Etsuro Fujita wrote: > Here is a patch for $subject. This is a nontrivial patch, submitted just before the start of the last CF for postgres 10. Therefore I think we should move this to the next CF. - Andres -- Sent via pgsql-hackers mailing list (pgsql-hac

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andres Freund
On 2017-04-01 16:20:46 -0400, Andrew Dunstan wrote: > > > On 03/31/2017 03:17 PM, Oleg Bartunov wrote: > > > > > > On 30 Mar 2017 23:43, "Dmitry Dolgov" <9erthali...@gmail.com > > > wrote: > > > > On 31 March 2017 at 00:01, Andrew Dunstan > > >

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Andres Freund
On 2017-04-03 23:31:59 +0900, Tatsuo Ishii wrote: > > That seems like it could represent quite a lot of added overhead, > > on machines where gettimeofday() is slow ... which is still a lot > > of them, unfortunately. > > Maybe. I think we could eliminate restarting the timer for parse and > bind.

Re: [HACKERS] [PATCH v.7] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM

2017-04-03 Thread Andres Freund
Hi Nikolay, On 2017-03-29 15:51:43 +0300, Nikolay Shaplov wrote: > Here is a new version of the patch. Thanks for the new version of the patch. As this commitfest is running out of time, and as the patch has been submitted late in the v10 development cycle, I've moved this patch to the next comm

Re: [HACKERS] [PATCH] Incremental sort

2017-04-03 Thread Andres Freund
On 2017-03-29 00:17:02 +0300, Alexander Korotkov wrote: > On Tue, Mar 28, 2017 at 5:27 PM, David Steele wrote: > > > Hi Alexander, > > > > On 3/20/17 10:19 AM, Heikki Linnakangas wrote: > > > >> On 03/20/2017 11:33 AM, Alexander Korotkov wrote: > >> > >>> Please, find rebased patch in the attachm

Re: [HACKERS] SERIALIZABLE with parallel query

2017-04-03 Thread Andres Freund
Hi, On 2017-03-11 15:19:23 +1300, Thomas Munro wrote: > Here is a rebased patch. It seems that this patch is still undergoing development, review and performance evaluation. Therefore it seems like it'd be a bad idea to try to get this into v10. Any arguments against moving this to the next CF?

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Sven R. Kunze
On 01.04.2017 22:20, Andrew Dunstan wrote: I added documentation when I committed it for the new functions, in the FTS section. I'm not sure what we need to add to the JSON section if anything. Not sure, if this is related but the formatting of https://www.postgresql.org/docs/devel/static/func

Re: [HACKERS] Improve OR conditions on joined columns (common star schema problem)

2017-04-03 Thread Andres Freund
Hi, On 2017-02-14 14:18:54 -0500, Tom Lane wrote: > I think this might be code-complete, modulo the question of whether we > want an enabling GUC for it. I'm still concerned about the question > of whether it adds more planning time than it's worth for most users. > (Obviously it needs some regre

Re: [HACKERS] Improve OR conditions on joined columns (common star schema problem)

2017-04-03 Thread Tom Lane
Andres Freund writes: > On 2017-02-14 14:18:54 -0500, Tom Lane wrote: >> One point that could use further review is whether the de-duplication >> algorithm is actually correct. I'm only about 95% convinced by the >> argument I wrote in planunionor.c's header comment. > Are you planning to push t

Re: [HACKERS] LWLock optimization for multicore Power machines

2017-04-03 Thread Andres Freund
Hi, On 2017-03-31 13:38:31 +0300, Alexander Korotkov wrote: > > It seems that on this platform definition of atomics should be provided by > > fallback.h. But it doesn't because I already defined > > PG_HAVE_ATOMIC_U32_SUPPORT > > in arch-ppc.h. I think in this case we shouldn't provide ppc-spe

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-03 Thread Andres Freund
On 2017-03-25 19:35:35 +0300, Alexander Korotkov wrote: > On Wed, Mar 22, 2017 at 12:23 AM, David Steele wrote: > > > Hi Alexander > > > > On 3/10/17 8:08 AM, Alexander Korotkov wrote: > > > > Results look good for me. Idea of committing both of patches looks > >> attractive. > >> We have pretty

Re: [HACKERS] [PATCH] Incremental sort

2017-04-03 Thread Andres Freund
On April 3, 2017 12:03:56 PM PDT, Alexander Korotkov wrote: >On Mon, Apr 3, 2017 at 9:34 PM, Andres Freund >wrote: > >> On 2017-03-29 00:17:02 +0300, Alexander Korotkov wrote: >> > On Tue, Mar 28, 2017 at 5:27 PM, David Steele >> wrote: >> > > On 3/20/17 10:19 AM, Heikki Linnakangas wrote: >>

Re: [HACKERS] parallel explain analyze support not exercised

2017-04-03 Thread Robert Haas
On Mon, Apr 3, 2017 at 1:53 PM, Andres Freund wrote: >> Please find the attached for the same. > >> +-- to increase the parallel query test coverage >> +EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM tenk1; >> + QUERY PLAN >> +--

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-04-03 Thread Robert Haas
On Thu, Mar 30, 2017 at 6:32 AM, Amit Langote wrote: > So, because we want to create an Append path for each partitioned table in > a tree separately, we'll need RelOptInfo for each one, which in turn > requires an AppendRelInfo. Hmm. It's no more desirable to have an Append inside of another Ap

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Fabien COELHO
Hello Daniel, - how would it work, both with \set ... and \if ...? The idea is that the need to have two command (a SELECT .. \gset followed by an \if) and a temporary variable in-between would be lifted by implementing a close equivalent in one command. It would behave essentially the same

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Fabien COELHO
Hello Tom, \if [select current_setting('server_version_num')::int < 11] I really dislike this syntax proposal. It would get us into having to count nested brackets, and distinguish quoted from unquoted brackets, and so on ... and for what? It's not really better than \if sql se

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andrew Dunstan
On 04/03/2017 02:22 PM, Andres Freund wrote: > On 2017-04-01 16:20:46 -0400, Andrew Dunstan wrote: >> >> On 03/31/2017 03:17 PM, Oleg Bartunov wrote: >>> >>> On 30 Mar 2017 23:43, "Dmitry Dolgov" <9erthali...@gmail.com >>> > wrote: >>> >>> On 31 March 2017 at 00:

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andrew Dunstan
On 04/03/2017 02:44 PM, Sven R. Kunze wrote: > On 01.04.2017 22:20, Andrew Dunstan wrote: >> I added documentation when I committed it for the new functions, in the >> FTS section. I'm not sure what we need to add to the JSON section if >> anything. > > Not sure, if this is related but the format

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Fabien COELHO
[...] but OTOH "\if sql 1 from table where expr" looks awkward. Given an implicit select, I would prefer "\if exists (select 1 from table where expr)" but now it's not shorter. Possibly, but it is just an SQL expression, which looks good in the middle of an sql script. An advantage of pr

Re: [HACKERS] parallel explain analyze support not exercised

2017-04-03 Thread Andres Freund
On 2017-04-03 15:13:13 -0400, Robert Haas wrote: > On Mon, Apr 3, 2017 at 1:53 PM, Andres Freund wrote: > >> Please find the attached for the same. > > > >> +-- to increase the parallel query test coverage > >> +EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM tenk1; > >> +

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-04-03 Thread Daniel Verite
Hi, In interactive mode, the warning in untaken branches is misleading when \endif is on the same line as the commands that are skipped. For instance: postgres=# \if false \echo NOK \endif \echo command ignored; use \endif or Ctrl-C to exit current \if block postgres=# From the point of

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Sven R. Kunze
On 03.04.2017 21:30, Andrew Dunstan wrote: On 04/03/2017 02:44 PM, Sven R. Kunze wrote: On 01.04.2017 22:20, Andrew Dunstan wrote: I added documentation when I committed it for the new functions, in the FTS section. I'm not sure what we need to add to the JSON section if anything. Not sure, if

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andrew Dunstan
On 04/03/2017 03:41 PM, Sven R. Kunze wrote: > On 03.04.2017 21:30, Andrew Dunstan wrote: >> On 04/03/2017 02:44 PM, Sven R. Kunze wrote: >>> On 01.04.2017 22:20, Andrew Dunstan wrote: I added documentation when I committed it for the new functions, in the FTS section. I'm not sure

Re: [HACKERS] Parallel Append implementation

2017-04-03 Thread Andres Freund
Hi, On 2017-03-24 21:32:57 +0530, Amit Khandekar wrote: > diff --git a/src/backend/executor/nodeAppend.c > b/src/backend/executor/nodeAppend.c > index a107545..e9e8676 100644 > --- a/src/backend/executor/nodeAppend.c > +++ b/src/backend/executor/nodeAppend.c > @@ -59,9 +59,47 @@ > > #include

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread Andres Freund
On 2017-04-03 20:59:42 +1200, David Rowley wrote: > Updated patch attached. > > Thanks for reviewing it. Given the time in the release cycle I'm afraid that this it's too late to get this into v10. Does anybody disagree? If not, it should be moved to the next CF. Greetings, Andres Freund --

Re: [HACKERS] SERIALIZABLE with parallel query

2017-04-03 Thread Thomas Munro
On Tue, Apr 4, 2017 at 6:41 AM, Andres Freund wrote: > Hi, > > On 2017-03-11 15:19:23 +1300, Thomas Munro wrote: >> Here is a rebased patch. > > It seems that this patch is still undergoing development, review and > performance evaluation. Therefore it seems like it'd be a bad idea to > try to ge

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Daniel Verite
Fabien COELHO wrote: > Now it could be decided that \set in psql stays simplistic because it is > not needed as much as it is with pgbench. Fine with me. It's not just that. It's that currently, if we do in psql: \set d sqrt(1 + random(1000) * 17) then we get that: \echo :d sqrt(1+ran

Re: [HACKERS] identity columns

2017-04-03 Thread Peter Eisentraut
On 3/30/17 22:57, Vitaly Burovoy wrote: > Why do you still want to leave "ADD IF NOT EXISTS" instead of using > "SET IF NOT EXISTS"? > If someone wants to follow the standard he can simply not to use "IF > NOT EXISTS" at all. Without it error should be raised. As I tried to mention earlier, it is

Re: [HACKERS] identity columns

2017-04-03 Thread Peter Eisentraut
On 4/3/17 14:19, Andres Freund wrote: > Are you going to try to merge this soon, or are you pushing this to 11? I plan to commit it this week. It was basically ready weeks ago, but had to be adjusted after the executor changes. >> +case T_NextValueExpr: >> +{ >> +

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread Claudio Freire
On Mon, Apr 3, 2017 at 5:24 PM, Andres Freund wrote: > On 2017-04-03 20:59:42 +1200, David Rowley wrote: >> Updated patch attached. >> >> Thanks for reviewing it. > > Given the time in the release cycle I'm afraid that this it's too late > to get this into v10. Does anybody disagree? If not, it

Re: [HACKERS] Unable to build doc on latest head

2017-04-03 Thread Andrew Gierth
> "Peter" == Peter Eisentraut writes: > On 4/3/17 02:44, Ashutosh Bapat wrote: >> [1] says that id.attribute is supported in stylesheets version >> 1.77.1. Do I need to update stylesheets version? How do I do it? >> Any help will be appreciated. Peter> The oldest version among the ones

Re: [HACKERS] identity columns

2017-04-03 Thread Andres Freund
On 2017-04-03 16:31:27 -0400, Peter Eisentraut wrote: > > Is it guaranteed that the caller expects an int64? I saw that > > nextvalueexpr's have a typeid field. > > It expects one of the integer types. We could cast the result of > Int64GetDatum() to the appropriate type, but that wouldn't actua

Re: [HACKERS] SERIALIZABLE with parallel query

2017-04-03 Thread Kevin Grittner
On Fri, Mar 10, 2017 at 8:19 PM, Thomas Munro wrote: > On Wed, Feb 22, 2017 at 2:01 PM, Robert Haas wrote: >> I don't think I know enough about the serializable code to review >> this, or at least not quickly, but it seems very cool if it works. >> Have you checked what effect it has on shared me

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Corey Huinker
> > I assume we want to keep that pre-existing behavior of \set in > psql, that is, making a copy of that string and associating a > name to it, whereas I guess pgbench computes a value from it and > stores that value. > Maybe a \set-variant called \expr?

Re: [HACKERS] [PATCH] Incremental sort

2017-04-03 Thread Alexander Korotkov
On Mon, Apr 3, 2017 at 10:05 PM, Andres Freund wrote: > On April 3, 2017 12:03:56 PM PDT, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >On Mon, Apr 3, 2017 at 9:34 PM, Andres Freund > >wrote: > > > >> On 2017-03-29 00:17:02 +0300, Alexander Korotkov wrote: > >> > On Tue, Mar 28, 20

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-04-03 Thread Andres Freund
On 2017-04-03 14:10:47 +1000, Vaishnavi Prabakaran wrote: > > The CF has been extended until April 7 but time is still growing short. > > Please respond with a new patch by 2017-04-04 00:00 AoE (UTC-12) or this > > submission will be marked "Returned with Feedback". > > > > > Thanks for the informa

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-04-03 Thread Robert Haas
On Thu, Mar 30, 2017 at 1:14 AM, Ashutosh Bapat wrote: > Done. Ashutosh and I spent several hours discussing this patch set today. I'm starting to become concerned about the fact that 0004 makes the partition bounds part of the PartitionScheme, because that means you can't do a partition-wise joi

Re: [HACKERS] [PATCH] Incremental sort

2017-04-03 Thread Andres Freund
Hi, On 2017-04-04 00:04:09 +0300, Alexander Korotkov wrote: > > >Thank you! > > >I already sent version of patch after David's reminder. > > >Please find rebased patch in the attachment. > > > > Cool. I think that's still a bit late for v10? > > > > I don't know. ISTM, that I addressed all the i

Re: [HACKERS] parallel explain analyze support not exercised

2017-04-03 Thread Robert Haas
On Mon, Apr 3, 2017 at 3:31 PM, Andres Freund wrote: >> If this is 'make check', then we should have 8 parallel workers >> allowed, so if we only do one of these at a time, then I think we're >> OK. But if somebody changes that configuration setting or if it's >> 'make installcheck', then the con

Re: [HACKERS] WIP: [[Parallel] Shared] Hash

2017-04-03 Thread Andres Freund
Hi, On 2017-03-31 17:53:12 +1300, Thomas Munro wrote: > Thanks very much to Rafia for testing, and to Andres for his copious > review feedback. Here's a new version. Changes: I unfortunately think it's too late to get this into v10. There's still heavy development going on, several pieces chan

Re: [HACKERS] Can't compile with profiling after BRIN autosummarization

2017-04-03 Thread Alvaro Herrera
Jeff Janes wrote: > This git bisects down to: > > commit 7526e10224f0792201e99631567bbe44492bbde4 > Author: Alvaro Herrera > Date: Sat Apr 1 14:00:53 2017 -0300 > > BRIN auto-summarization > > The lines are: > > extern void AutoVacuumRequestWork(AutoVacuumWorkItemType type, >

Re: [HACKERS] Can't compile with profiling after BRIN autosummarization

2017-04-03 Thread Alvaro Herrera
Jeff Janes wrote: > A newer gcc gave a better error message which lead me to add the line: > > #include "storage/block.h" /* for typedef BlockNumber */ > > into autovacuum.h, which fixes the problem. Ah, Peter already fixed it. -- Álvaro Herrerahttps://www.2ndQuadrant.

Re: [HACKERS] PATCH: recursive json_populate_record()

2017-04-03 Thread Andres Freund
On 2017-03-21 14:31:08 -0400, Andrew Dunstan wrote: > > > On 03/21/2017 01:37 PM, David Steele wrote: > > On 3/16/17 11:54 AM, David Steele wrote: > >> On 2/1/17 12:53 AM, Michael Paquier wrote: > >>> On Thu, Jan 26, 2017 at 6:49 AM, Tom Lane wrote: > Nikita Glukhov writes: > > On 25.01.

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread David Rowley
On 4 April 2017 at 08:24, Andres Freund wrote: > On 2017-04-03 20:59:42 +1200, David Rowley wrote: >> Updated patch attached. >> >> Thanks for reviewing it. > > Given the time in the release cycle I'm afraid that this it's too late > to get this into v10. Does anybody disagree? If not, it should

Re: [HACKERS] WIP: [[Parallel] Shared] Hash

2017-04-03 Thread Thomas Munro
On Tue, Apr 4, 2017 at 9:11 AM, Andres Freund wrote: > Hi, > > On 2017-03-31 17:53:12 +1300, Thomas Munro wrote: >> Thanks very much to Rafia for testing, and to Andres for his copious >> review feedback. Here's a new version. Changes: > > I unfortunately think it's too late to get this into v10

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread Andres Freund
On 2017-04-04 09:22:07 +1200, David Rowley wrote: > On 4 April 2017 at 08:24, Andres Freund wrote: > > On 2017-04-03 20:59:42 +1200, David Rowley wrote: > >> Updated patch attached. > >> > >> Thanks for reviewing it. > > > > Given the time in the release cycle I'm afraid that this it's too late >

Re: [HACKERS] [PATCH] Incremental sort

2017-04-03 Thread Alexander Korotkov
On Tue, Apr 4, 2017 at 12:09 AM, Andres Freund wrote: > On 2017-04-04 00:04:09 +0300, Alexander Korotkov wrote: > > > >Thank you! > > > >I already sent version of patch after David's reminder. > > > >Please find rebased patch in the attachment. > > > > > > Cool. I think that's still a bit late fo

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread Claudio Freire
On Mon, Apr 3, 2017 at 6:22 PM, David Rowley wrote: > On 4 April 2017 at 08:24, Andres Freund wrote: >> On 2017-04-03 20:59:42 +1200, David Rowley wrote: >>> Updated patch attached. >>> >>> Thanks for reviewing it. >> >> Given the time in the release cycle I'm afraid that this it's too late >> to

Re: [HACKERS] Supporting huge pages on Windows

2017-04-03 Thread Andres Freund
On 2017-04-03 04:56:45 +, Tsunakawa, Takayuki wrote: > +/* > + * EnableLockPagesPrivilege > + * > + * Try to acquire SeLockMemoryPrivilege so we can use large pages. > + */ > +static bool > +EnableLockPagesPrivilege(int elevel) > +{ > + HANDLE hToken; > + TOKEN_PRIVILEGES tp; > + LU

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Fabien COELHO
\set d sqrt(1 + random(1000) * 17) \echo :d sqrt(1+random(1000)*17) I assume we want to keep that pre-existing behavior of \set in psql, Ok. So no interpreted expression ever in psql's \set for backward compatibility. that is, making a copy of that string and associating a name to it, whe

  1   2   >