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

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

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 >>

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

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

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

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

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

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

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

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

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread Claudio Freire
On Mon, Apr 3, 2017 at 5:59 AM, David Rowley wrote: >> +static void addCachedSelectivityRangeVar(CachedSelectivityClause >> **cslist, Node *var, >> bool varonleft, bool isLTsel, Selectivity s2); >> >> You're changing clause -> var throughout the code

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread Claudio Freire
On Mon, Apr 3, 2017 at 8:52 PM, David Rowley wrote: >> One last observation: >> >> +/* >> + * An IS NOT NULL test is a no-op if there's any other strict quals, >> + * so if that's the case, then we'll only apply this, otherwise >> we'll >> +

Re: [HACKERS] show "aggressive" or not in autovacuum logs

2017-04-03 Thread Kyotaro HORIGUCHI
Hello, At Fri, 31 Mar 2017 18:20:23 +0900, Masahiko Sawada wrote in > On Wed, Mar 29, 2017 at 12:46 PM, Kyotaro HORIGUCHI > wrote: > > Hello, it would be too late but

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread Claudio Freire
On Mon, Apr 3, 2017 at 9:19 PM, Claudio Freire wrote: > On Mon, Apr 3, 2017 at 8:52 PM, David Rowley > wrote: >>> One last observation: >>> >>> +/* >>> + * An IS NOT NULL test is a no-op if there's any other strict >>> quals,

Re: [HACKERS] wait event documentation

2017-04-03 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Robert Haas > Instead of continuing to repair this every time it gets broken, I propose > that we break this into one table that lists all the wait_event_type values > -- LWLock, Lock, BufferPin,

Re: [HACKERS] [PATCH] Incremental sort

2017-04-03 Thread Robert Haas
On Mon, Apr 3, 2017 at 5:09 PM, Andres Freund wrote: > To me this hasn't gotten even remotely enough performance evaluation. > And I don't think it's fair to characterize it as pending since 2013, > given it was essentially "waiting on author" for most of that. This is

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-04-03 Thread Pavan Deolasee
On Fri, Mar 31, 2017 at 12:31 PM, Dilip Kumar wrote: > On Thu, Mar 30, 2017 at 5:27 PM, Amit Kapila > wrote: > > I am not sure if we can consider it as completely synthetic because we > > might see some similar cases for json datatypes. Can we

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-03 Thread Pavel Stehule
2017-04-03 21:24 GMT+02:00 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

Re: [HACKERS] Parallel Append implementation

2017-04-03 Thread Andres Freund
On 2017-04-03 22:13:18 -0400, Robert Haas wrote: > On Mon, Apr 3, 2017 at 4:17 PM, Andres Freund wrote: > > Hm. I'm not really convinced by the logic here. Wouldn't it be better > > to try to compute the minimum total cost across all workers for > > 1..#max_workers for the

Re: [HACKERS] [PATCH] Incremental sort

2017-04-03 Thread Andres Freund
On 2017-04-03 22:18:21 -0400, Robert Haas wrote: > On Mon, Apr 3, 2017 at 5:09 PM, Andres Freund wrote: > > To me this hasn't gotten even remotely enough performance evaluation. > > And I don't think it's fair to characterize it as pending since 2013, > > given it was

[HACKERS] Remove pg_stat_progress_vacuum from Table 28.2

2017-04-03 Thread Amit Langote
It seems pg_stat_progress_vacuum is not supposed to appear in the table titled "Collected Statistics Views". It was added by c16dc1aca. Attached patch fixes that. Thanks, Amit >From 779fd54f0e30455e0393252a4ba4514d23e0af15 Mon Sep 17 00:00:00 2001 From: amit Date: Tue,

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-04-03 Thread Robert Haas
On Sat, Apr 1, 2017 at 3:29 AM, Mithun Cy wrote: > On Sat, Apr 1, 2017 at 12:31 PM, Mithun Cy wrote: >> Also adding a patch which implements the 2nd way. > Sorry, I forgot to add sortbuild_hash patch, which also needs similar > changes for

Re: [HACKERS] ANALYZE command progress checker

2017-04-03 Thread Amit Langote
On 2017/03/30 17:39, Masahiko Sawada wrote: > On Wed, Mar 29, 2017 at 5:38 PM, vinayak wrote: I have updated the patch. > > I reviewed v7 patch. > > When I ran ANALYZE command to the table having 5 millions rows with 3 > child tables, the progress report I got shows the strange result. The

Re: [HACKERS] ANALYZE command progress checker

2017-04-03 Thread Amit Langote
On 2017/04/04 14:15, Amit Langote wrote: > On 2017/04/04 14:12, Amit Langote wrote: >> Two kinds of statistics are collected if the table is a inheritance parent. >> >> First kind considers the table by itself and calculates regular >> single-table statistics using rows sampled from the only

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tatsuo Ishii
> The patch doesn't seem to behave like that. The Parse message calls > start_xact_command() -> enable_statement_timeout() -> enable_timeout(), and > set stmt_timer_started to true. Subsequent Bind and Execute messages call > enable_statement_timeout(), but enable_statement_timeout() doesn't

Re: [HACKERS] Making clausesel.c Smarter

2017-04-03 Thread David Rowley
On 4 April 2017 at 11:35, Claudio Freire wrote: > I'd prefer it if all occurrences of the concept were changed, to > maintain consistency. > That would include variables used to hold expressions that refer to > these as well, as in the case of: > > +Node

Re: [HACKERS] delta relations in AFTER triggers

2017-04-03 Thread Thomas Munro
On Tue, Apr 4, 2017 at 3:41 AM, Kevin Grittner wrote: > 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

Re: [HACKERS] logical decoding of two-phase transactions

2017-04-03 Thread Masahiko Sawada
On Thu, Mar 30, 2017 at 12:55 AM, Stas Kelvich wrote: > >> On 28 Mar 2017, at 18:08, Andres Freund wrote: >> >> On 2017-03-28 15:55:15 +0100, Simon Riggs wrote: >>> >>> >>> That assertion is obviously false... the plugin can resolve this in >>>

Re: [HACKERS] If an extension library is loaded during pg_upgrade, can it tell?

2017-04-03 Thread Chapman Flack
On 04/03/17 22:08, Bruce Momjian wrote: > On Mon, Apr 3, 2017 at 09:53:34PM -0400, Chapman Flack wrote: >> Hi, >> >> Is there any distinctive state that could be checked by extension code >> to determine that it has been loaded incidentally during the operation >> of pg_upgrade rather than under

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tatsuo Ishii > No. Parse, bind and Execute message indivually stops and starts the > statement_timeout timer with the patch. Unless there's a lock conflict, > parse and bind will take very short

Re: [HACKERS] wait event documentation

2017-04-03 Thread Amit Langote
On 2017/04/03 22:32, Robert Haas wrote: > 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

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-04-03 Thread Haribabu Kommi
On Thu, Mar 30, 2017 at 12:00 PM, Haribabu Kommi wrote: > > > On Wed, Mar 29, 2017 at 11:04 PM, Andreas Karlsson > wrote: > >> On 03/29/2017 05:43 AM, Haribabu Kommi wrote: >> > Updated patch attached. >> >> I get a test failure in the pg_upgrade

Re: [HACKERS] Parallel Append implementation

2017-04-03 Thread Amit Khandekar
Thanks Andres for your review comments. Will get back with the other comments, but meanwhile some queries about the below particular comment ... On 4 April 2017 at 10:17, Andres Freund wrote: > On 2017-04-03 22:13:18 -0400, Robert Haas wrote: >> On Mon, Apr 3, 2017 at 4:17

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

2017-04-03 Thread Etsuro Fujita
On 2017/04/04 3:21, Andres Freund wrote: 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. Honestly, I'm not

Re: [HACKERS] If an extension library is loaded during pg_upgrade, can it tell?

2017-04-03 Thread Bruce Momjian
On Mon, Apr 3, 2017 at 09:53:34PM -0400, Chapman Flack wrote: > Hi, > > Is there any distinctive state that could be checked by extension code > to determine that it has been loaded incidentally during the operation > of pg_upgrade rather than under normal conditions? > > PL/Java ordinarily

Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

2017-04-03 Thread Alvaro Herrera
Daniel Gustafsson wrote: > 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

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tatsuo Ishii > Actually the statement timer is replaced with new statement timer value > in enable_statement_timeout(). The patch doesn't seem to behave like that. The Parse message calls

Re: [HACKERS] postgres_fdw bug in 9.6

2017-04-03 Thread Ashutosh Bapat
Probably we should use "could not be created" instead of "was not created" in "... a local path suitable for EPQ checks was not created". "outer_path should not require relations from inner_path" may be reworded as "outer paths should not be parameterized by the inner relations". "neither path

[HACKERS] If an extension library is loaded during pg_upgrade, can it tell?

2017-04-03 Thread Chapman Flack
Hi, Is there any distinctive state that could be checked by extension code to determine that it has been loaded incidentally during the operation of pg_upgrade rather than under normal conditions? PL/Java ordinarily checks what version of its schema is around, but that may be premature while

Re: [HACKERS] Parallel Append implementation

2017-04-03 Thread Robert Haas
On Mon, Apr 3, 2017 at 4:17 PM, Andres Freund wrote: > Hm. I'm not really convinced by the logic here. Wouldn't it be better > to try to compute the minimum total cost across all workers for > 1..#max_workers for the plans in an iterative manner? I.e. try to map > each of

Re: [HACKERS] Fix obsolete comment in GetSnapshotData

2017-04-03 Thread Robert Haas
On Sun, Apr 2, 2017 at 9:29 PM, Craig Ringer wrote: > You're right, I muddled it with PROCARRAY_VACUUM_FLAG. > > PROCARRAY_FLAGS_VACUUM is sufficient. Committed that way. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --

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 Mon, Apr 3, 2017 at 10:45 PM, Keith Fiske wrote: > > 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

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

2017-04-03 Thread Ashutosh Bapat
On Tue, Apr 4, 2017 at 2:01 AM, Andrew Gierth wrote: > > "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

Re: [HACKERS] Instead of DROP function use UPDATE pg_proc in an upgrade extension script

2017-04-03 Thread Pavel Stehule
2017-04-04 6:17 GMT+02:00 Vicky Vergara : > > Hello, > > > When creating an extension upgrade sql script, because the function does > not have the same parameter names and/or parameters type and/or the result > types changes, there is the need to drop the function

[HACKERS] Compiler warning in costsize.c

2017-04-03 Thread Michael Paquier
Hi all, In builds where USE_ASSERT_CHECKING is not enabled, costsize.c can generate warnings. Here is for example with MSVC: src/backend/optimizer/path/costsize.c(4520): warning C4101: 'rte' : unreferen ced local variable [C:\Users\ioltas\git\postgres\postgres.vcxproj]

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-04-03 Thread Pavan Deolasee
On Thu, Mar 30, 2017 at 11:17 PM, Bruce Momjian wrote: > On Tue, Mar 21, 2017 at 04:04:58PM -0400, Bruce Momjian wrote: > > On Tue, Mar 21, 2017 at 04:56:16PM -0300, Alvaro Herrera wrote: > > > Bruce Momjian wrote: > > > > On Tue, Mar 21, 2017 at 04:43:58PM -0300, Alvaro

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

2017-04-03 Thread Andres Freund
On 2017-04-04 08:57:33 +0900, Michael Paquier wrote: > On Tue, Apr 4, 2017 at 8:26 AM, Andres Freund wrote: > > On 2017-04-04 09:24:23 +1000, Vaishnavi Prabakaran wrote: > >> Just quickly, Is it not ok to consider only the code patch for this CF > >> without test patch? > > >

Re: [HACKERS] make check-world output

2017-04-03 Thread Noah Misch
On Mon, Apr 03, 2017 at 03:03:44PM +0900, Michael Paquier wrote: > On Sat, Apr 1, 2017 at 4:28 PM, Noah Misch wrote: > > The pg_upgrade test suite originated in an age when "make check-world" was > > forbidden to depend on Perl; the choice was a shell script or a C program. >

Re: [HACKERS] [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint

2017-04-03 Thread Robert Haas
On Fri, Mar 31, 2017 at 10:02 PM, Ashutosh Sharma wrote: > As suggested, I am now acquiring lock inside the caller function. > Attached is the patch having this changes. Thanks. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-03 Thread Tatsuo Ishii
> Where is the statement_timeout timer stopped when processing Parse and Bind > messages? Actually the statement timer is replaced with new statement timer value in enable_statement_timeout(). > Do you mean the following sequence of operations are performed in this patch? > > Parse(statement1)

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

2017-04-03 Thread Ashutosh Bapat
On Mon, Apr 3, 2017 at 8:36 PM, Tom Lane wrote: > 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

[HACKERS] Instead of DROP function use UPDATE pg_proc in an upgrade extension script

2017-04-03 Thread Vicky Vergara
Hello, When creating an extension upgrade sql script, because the function does not have the same parameter names and/or parameters type and/or the result types changes, there is the need to drop the function because otherwise the CREATE OR REPLACE of the new signature will fail. So for

Re: [HACKERS] Instead of DROP function use UPDATE pg_proc in an upgrade extension script

2017-04-03 Thread Andrew Gierth
> "Vicky" == Vicky Vergara writes: Vicky> UPDATE pg_proc SET [...] Vicky> So, I want to know how "safe" can you consider the second Vicky> method, and what kind of other objects do I need to test besides Vicky> views. Speaking from personal experience (I did

Re: [HACKERS] ANALYZE command progress checker

2017-04-03 Thread Amit Langote
On 2017/04/04 14:12, Amit Langote wrote: > Two kinds of statistics are collected if the table is a inheritance parent. > > First kind considers the table by itself and calculates regular > single-table statistics using rows sampled from the only available heap > (by calling do_analyze_rel() with

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

2017-04-03 Thread Michael Paquier
On Tue, Apr 4, 2017 at 7:38 AM, Stephen Frost wrote: > Not good if it lowers the coverage, but hopefully that's fixable. Have you > analyzed where we're reducing coverage..? The current set of tests is just running pg_upgrade using the same version for the source and target

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

2017-04-03 Thread Michael Paquier
On Tue, Apr 4, 2017 at 8:26 AM, Andres Freund wrote: > On 2017-04-04 09:24:23 +1000, Vaishnavi Prabakaran wrote: >> Just quickly, Is it not ok to consider only the code patch for this CF >> without test patch? > > I'd say no, it's not acceptable. This is too much new code for

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

2017-04-03 Thread Dilip Kumar
On Mon, Apr 3, 2017 at 11:22 PM, Andres Freund wrote: > That's better than before, but I'd appreciate working on a bit more > coverage. E.g. rescans probably aren't exercised in that test, right? > > If you have time & energy, it'd also be good to expand the tests to > cover

Re: [HACKERS] ANALYZE command progress checker

2017-04-03 Thread vinayak
On 2017/03/30 17:39, Masahiko Sawada wrote: On Wed, Mar 29, 2017 at 5:38 PM, vinayak wrote: On 2017/03/25 4:30, Robert Haas wrote: On Fri, Mar 24, 2017 at 3:41 AM, vinayak wrote: I have updated the patch. You can't change

Re: [HACKERS] Documentation improvements for partitioning

2017-04-03 Thread Robert Haas
On Mon, Apr 3, 2017 at 12:52 AM, Amit Langote wrote: > I noticed what looks like a redundant line (or an incomplete sentence) in > the paragraph about multi-column partition keys. In the following text: > > + partitioning, if desired. Of course, this will

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 *

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,

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

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

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.

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

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

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] 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?

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

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

[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

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

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

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:

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

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] 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.

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

[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] 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

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

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

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

[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] 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

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

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

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

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. > > -

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

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

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

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

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 >

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. >

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] [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

  1   2   >