Re: [HACKERS] Documentation improvements for partitioning

2017-03-02 Thread Amit Langote
On 2017/02/28 17:25, Simon Riggs wrote: > On 28 February 2017 at 08:14, Amit Langote > wrote: > >> OK. So, I will start writing the patch with above general skeleton and >> hopefully post it within this week and you can improve it as fit. > > Will do, thanks.

Re: [HACKERS] Statement-level rollback

2017-03-02 Thread Tsunakawa, Takayuki
From: Tom Lane [mailto:t...@sss.pgh.pa.us] > 1. The argument for this is mostly, if not entirely, "application > compatibility". But it won't succeed at providing that if every BEGIN has > to be spelled differently than it would be on other DBMSes. > Therefore there is going to be enormous

Re: [HACKERS] Statement-level rollback

2017-03-02 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Peter Eisentraut > On 2/28/17 02:39, Tsunakawa, Takayuki wrote: > > I'd like to propose statement-level rollback feature. To repeat myself, > this is requested for users to migrate from other DBMSs

Re: [HACKERS] allow referring to functions without arguments when unique

2017-03-02 Thread Michael Paquier
On Wed, Mar 1, 2017 at 11:50 AM, Peter Eisentraut wrote: > This is the "grand finale" that goes on top of the "DROP FUNCTION of > multiple functions" patch set. The purpose is to allow referring to > functions without having to spell out the argument list, when

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

2017-03-02 Thread Corey Huinker
On Fri, Mar 3, 2017 at 1:25 AM, Fabien COELHO wrote: > > > For endif, I really exagerated, "switch { defaut: " is too much, please >> accept my apology. Maybe just do the pop & error reporting? >> > It seemed like overkill, but I decided to roll with it. > > Or maybe be

Re: [HACKERS] [patch] reorder tablespaces in basebackup tar stream for backup_label

2017-03-02 Thread Michael Paquier
On Wed, Feb 22, 2017 at 9:23 PM, Bernd Helmle wrote: > The comment in the code says explicitely to add the base directory to > the end of the list, not sure if that is out of a certain reason. > > I'd say this is an oversight in the implementation. I'm currently > working on

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

2017-03-02 Thread Fabien COELHO
For endif, I really exagerated, "switch { defaut: " is too much, please accept my apology. Maybe just do the pop & error reporting? Or maybe be more explicit: switch (current state) case NONE: error no matching if; case ELSE_FALSE: case ELSE_TRUE: case ...: pop;

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-03-02 Thread Michael Paquier
On Fri, Mar 3, 2017 at 3:18 PM, Robert Haas wrote: > Hopefully I haven't broken anything; please let me know if you > encounter any issues. Reading what has just been committed... + /* +* No space found, file content is corrupted. Return NULL to the

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-03-02 Thread Robert Haas
On Mon, Feb 20, 2017 at 4:37 AM, Gilles Darold wrote: >> I think it's sufficient to just remove the file once on postmaster >> startup before trying to launch the syslogger for the first time. >> logging_collector is PGC_POSTMASTER, so if it's not turned on when the >>

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

2017-03-02 Thread Fabien COELHO
Hello Corey, v20: attempt at implementing the switch-on-all-states style. For the elif I think it is both simpler and better like that. Whether committer will agree is an unkown, as always. For endif, I really exagerated, "switch { defaut: " is too much, please accept my apology. Maybe

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-02 Thread Kuntal Ghosh
On Fri, Mar 3, 2017 at 8:41 AM, Robert Haas wrote: > On Fri, Mar 3, 2017 at 1:22 AM, Andres Freund wrote: >> the resulting hash-values aren't actually meaningfully influenced by the >> IV. Because we just xor with the IV, most hash-value that without

Re: [HACKERS] SCRAM authentication, take three

2017-03-02 Thread Michael Paquier
On Thu, Mar 2, 2017 at 9:13 PM, Kyotaro HORIGUCHI wrote: > I'm studying the normalization of Unicode so I apologize possible > stupidity in advance. > > I looked into this and have some comments. Sorry for the random > order. Thanks, this needs a lot of

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-02 Thread Ashutosh Bapat
On Thu, Mar 2, 2017 at 6:48 PM, Ashutosh Bapat wrote: > On Thu, Mar 2, 2017 at 6:06 PM, Rushabh Lathia > wrote: >> Hi, >> >> While reading through the cost_agg() I found that startup cost for the >> group aggregate is not correctly

Re: [HACKERS] WAL Consistency checking for hash indexes

2017-03-02 Thread Amit Kapila
On Tue, Feb 28, 2017 at 11:06 AM, Kuntal Ghosh wrote: > Hello everyone, > > I've attached a patch which implements WAL consistency checking for > hash indexes. This feature is going to be useful for developing and > testing of WAL logging for hash index. > I think it

Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)

2017-03-02 Thread Robert Haas
On Mon, Feb 20, 2017 at 9:43 PM, Tomas Vondra wrote: > BTW I've noticed the pageinspect version is 1.6, but we only have > pageinspect--1.5.sql (and upgrade script to 1.6). Not sure that's entirely > intentional? Actually, that's the New Way. See

Re: [HACKERS] Instability in select_parallel regression test

2017-03-02 Thread Robert Haas
On Mon, Feb 27, 2017 at 8:07 AM, Amit Kapila wrote: >> My guess is that if we apply the fix I suggested above, it'll be good >> enough. If that turns out not to be true, then I guess we'll have to >> deal with that, but why not do the easy thing first? > > Okay, that is

Re: [HACKERS] error detail when partition not found

2017-03-02 Thread Amit Langote
On 2017/03/03 12:43, Robert Haas wrote: > On Mon, Feb 27, 2017 at 9:54 AM, Amit Langote > wrote: >> Updated patch is attached. > > Committed with one grammatical change to the comments. Thanks. I've marked this as fixed on the open item wiki page. Thanks, Amit

Re: [HACKERS] Radix tree for character conversion

2017-03-02 Thread Michael Paquier
On Thu, Mar 2, 2017 at 2:20 PM, Kyotaro HORIGUCHI wrote: > 5) Just remove plain map files and all related code. Addition to >that, Makefile stores hash digest of authority files in >Unicode/authoriy_hashes.txt or something that is managed by >git.

Re: [HACKERS] error detail when partition not found

2017-03-02 Thread Robert Haas
On Mon, Feb 27, 2017 at 9:54 AM, Amit Langote wrote: > Updated patch is attached. Committed with one grammatical change to the comments. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-02 Thread Robert Haas
On Fri, Mar 3, 2017 at 1:22 AM, Andres Freund wrote: > the resulting hash-values aren't actually meaningfully influenced by the > IV. Because we just xor with the IV, most hash-value that without the IV > would have fallen into a single hash-bucket, fall into a single >

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-02 Thread Andreas Karlsson
On 03/02/2017 02:25 AM, Jim Nasby wrote: On 2/28/17 11:21 AM, Andreas Karlsson wrote: The only downside I can see to this approach is that we no logner will able to reindex catalog tables concurrently, but in return it should be easier to confirm that this approach can be made work. Another

Re: [HACKERS] Adding support for Default partition in partitioning

2017-03-02 Thread Robert Haas
On Wed, Mar 1, 2017 at 6:29 AM, Rahila Syed wrote: > 3. Handling adding a new partition to a partitioned table >with default partition. >This will require moving tuples from existing default partition to > newly created partition if they satisfy its partition

Re: [HACKERS] [PATCH] SortSupport for macaddr type

2017-03-02 Thread Neha Khatri
Hi Brandur, Couple of typo corrections required in patch: s/converstion/conversion s/go the heap/go to the heap The performance results you shared are for he Index Creation operation. Are there similar results for the sorting using ORDER BY queries too? Just curious. Regards, Neha

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-02 Thread Amit Langote
On 2017/03/02 21:48, Robert Haas wrote: > On Thu, Mar 2, 2017 at 3:52 PM, Amit Langote > wrote: >>> think we should omit this logic (and change the documentation to >>> match). That is, a database-wide ANALYZE should update the statistics >>> for each child as well

Re: [HACKERS] snapbuild woes

2017-03-02 Thread Petr Jelinek
On 03/03/17 01:53, Erik Rijkers wrote: > On 2017-03-03 01:30, Petr Jelinek wrote: > > With these patches: > > 0001-Use-asynchronous-connect-API-in-libpqwalreceiver.patch > 0002-Fix-after-trigger-execution-in-logical-replication.patch >

Re: [HACKERS] snapbuild woes

2017-03-02 Thread Erik Rijkers
On 2017-03-03 01:30, Petr Jelinek wrote: With these patches: 0001-Use-asynchronous-connect-API-in-libpqwalreceiver.patch 0002-Fix-after-trigger-execution-in-logical-replication.patch 0003-Add-RENAME-support-for-PUBLICATIONs-and-SUBSCRIPTION.patch

Re: [HACKERS] snapbuild woes

2017-03-02 Thread Petr Jelinek
On 26/02/17 01:43, Petr Jelinek wrote: > On 24/02/17 22:56, Petr Jelinek wrote: >> On 22/02/17 03:05, Petr Jelinek wrote: >>> On 13/12/16 00:38, Petr Jelinek wrote: On 12/12/16 23:33, Andres Freund wrote: > On 2016-12-12 23:27:30 +0100, Petr Jelinek wrote: >> On 12/12/16 22:42, Andres

Re: [HACKERS] brin autosummarization -- autovacuum "work items"

2017-03-02 Thread Thomas Munro
On Wed, Mar 1, 2017 at 6:06 PM, Thomas Munro wrote: > On Wed, Mar 1, 2017 at 5:58 PM, Alvaro Herrera > wrote: >> I think one of the most serious issues with BRIN indexes is how they >> don't get updated automatically as the table is

Re: [HACKERS] brin autosummarization -- autovacuum "work items"

2017-03-02 Thread Thomas Munro
On Wed, Mar 1, 2017 at 6:06 PM, Thomas Munro wrote: > On Wed, Mar 1, 2017 at 5:58 PM, Alvaro Herrera > wrote: >> I think one of the most serious issues with BRIN indexes is how they >> don't get updated automatically as the table is

Re: [HACKERS] Cleanup: avoid direct use of ip_posid/ip_blkid

2017-03-02 Thread Peter Geoghegan
On Thu, Mar 2, 2017 at 8:25 AM, Peter Eisentraut wrote: > I wonder why we allow that. Shouldn't the tid type reject input that > has ip_posid == 0? InvalidOffsetNumber (that is, 0) is something that I wouldn't like to bet doesn't make it out to disk at some

[HACKERS] [GSoC] Personal presentation and request for clarification

2017-03-02 Thread João Miguel Afonso
Dear community member(s), I am João Afonso, a Portuguese MSc student and I'm writing to ask some information about the GSoC projects. For the reasons explained below, PostgreSQL was the organisation that I most identify with, so I am trying to introduce myself to the community. This way, as I

Re: [HACKERS] delta relations in AFTER triggers

2017-03-02 Thread Kevin Grittner
On Thu, Mar 2, 2017 at 9:04 AM, David Steele wrote: > On 2/20/17 10:43 PM, Thomas Munro wrote: >> Based on a suggestion from Robert off-list I tried inserting into a >> delta relation from a trigger function and discovered that it >> segfaults: >> >> * frame #0:

Re: [HACKERS] [PATCH] SortSupport for macaddr type

2017-03-02 Thread Julien Rouhaud
On Tue, Feb 28, 2017 at 08:58:24AM -0800, Brandur Leach wrote: > Hi Julien, > Hello Brandur, > Thanks for the expedient reply, even after I'd dropped the > ball for so long :) :) > Cool! I just re-read my own comment a few days later and I > think that it still mostly makes sense, but

Re: [HACKERS] PATCH: two slab-like memory allocators

2017-03-02 Thread Tomas Vondra
On 03/01/2017 05:29 AM, Andres Freund wrote: On 2017-02-28 20:18:35 -0800, Andres Freund wrote: - Andres, hoping the buildfarm turns greener Oh well, that didn't work. Investigating. Attaches is the last part of the patch series, rebased to current master and adopting the new chunk header

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Alvaro Herrera
Pavel Stehule wrote: > 2017-03-02 19:32 GMT+01:00 Alvaro Herrera : > > > So in the old (non-executor-node) implementation, you could attach WITH > > ORDINALITY to the xmltable expression and it would count the output > > rows, regardless of which XML document it comes

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-02 Thread Andres Freund
On 2017-03-01 11:05:33 +0530, Kuntal Ghosh wrote: > On Wed, Mar 1, 2017 at 10:53 AM, Andres Freund wrote: > > On 2017-03-01 10:47:45 +0530, Kuntal Ghosh wrote: > >> if (insertdist > curdist) > >> { > >> swap the entry to be inserted with the current entry. > >> Try to insert

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-02 Thread Andres Freund
Hi, On 2017-03-01 10:39:11 +0530, Kuntal Ghosh wrote: > On Wed, Mar 1, 2017 at 9:33 AM, Kuntal Ghosh > wrote: > > On Wed, Mar 1, 2017 at 9:19 AM, Andres Freund wrote: > >> That's without the patch in > >>

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

2017-03-02 Thread Corey Huinker
> > > For me, it is only slightly better: I think that for helping understanding > and maintenance, the automaton state transitions should be all clear and > loud in just one place, so I would really like to see a single common > structure: > > if (is "if") switch on all states; > else if (is

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Pavel Stehule
2017-03-02 19:32 GMT+01:00 Alvaro Herrera : > So in the old (non-executor-node) implementation, you could attach WITH > ORDINALITY to the xmltable expression and it would count the output > rows, regardless of which XML document it comes from. With the new >

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Alvaro Herrera
So in the old (non-executor-node) implementation, you could attach WITH ORDINALITY to the xmltable expression and it would count the output rows, regardless of which XML document it comes from. With the new implementation, the grammar no longer accepts it. To count output rows, you still need to

Re: [HACKERS] I propose killing PL/Tcl's "modules" infrastructure

2017-03-02 Thread Tom Lane
Jim Nasby writes: > On 2/27/17 2:42 PM, Tom Lane wrote: >> + SET pltcl.start_proc = 'no_such_function'; >> + select tcl_int4add(1, 2); >> + ERROR: function no_such_function() does not exist > Can the error message be more explicit somehow? Otherwise people will be >

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Pavel Stehule
Dne 2. 3. 2017 18:14 napsal uživatel "Alvaro Herrera" < alvhe...@2ndquadrant.com>: Pavel Stehule wrote: > It is documented already > > "If the PATH matches an empty tag the result is an empty string" Hmm, okay. But what we have here is not an empty tag, but a tag that is completely missing. I

[HACKERS] Two phase commit in ECPG

2017-03-02 Thread Masahiko Sawada
Hi all, I found that ecpg has not been supporting COMMIT PREPARED and ROLLBACK PREPARED since version 9.0.2. For example, if the test code does, EXEC SQL BEGIN; EXEC SQL INSERT INTO t1 VALUES(1); EXEC SQL PREPARE TRANSACTION 'gxid'; EXEC SQL COMMIT PREPARED 'gxid'; I got error "COMMIT

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Alvaro Herrera
Pavel Stehule wrote: > It is documented already > > "If the PATH matches an empty tag the result is an empty string" Hmm, okay. But what we have here is not an empty tag, but a tag that is completely missing. I don't think those two cases should be treated in the same way ... > Attached new

Re: [HACKERS] Cost model for parallel CREATE INDEX

2017-03-02 Thread Peter Geoghegan
On Thu, Mar 2, 2017 at 5:50 AM, Robert Haas wrote: > On Wed, Mar 1, 2017 at 12:58 AM, Peter Geoghegan wrote: >> * This scales based on output size (projected index size), not input >> size (heap scan input). Apparently, that's what we always do right >> now.

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

2017-03-02 Thread Petr Jelinek
On 02/03/17 13:23, Craig Ringer wrote: > On 2 March 2017 at 16:20, Stas Kelvich wrote: >> >>> On 2 Mar 2017, at 11:00, Craig Ringer wrote: >>> >>> We already have it, because we just decoded the PREPARE TRANSACTION. >>> I'm preparing a patch

Re: [HACKERS] Faster methods for getting SPI results

2017-03-02 Thread Jon Nelson
On Thu, Mar 2, 2017 at 10:03 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 12/20/16 23:14, Jim Nasby wrote: > > I've been looking at the performance of SPI calls within plpython. > > There's a roughly 1.5x difference from equivalent python code just in > > pulling data out

Re: [HACKERS] Cleanup: avoid direct use of ip_posid/ip_blkid

2017-03-02 Thread Peter Eisentraut
On 2/22/17 08:38, Pavan Deolasee wrote: > One reason why these macros are not always used is because they > typically do assert-validation to ensure ip_posid has a valid value. > There are a few places in code, especially in GIN and also when we are > dealing with user-supplied TIDs when we might

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-03-02 Thread Masahiko Sawada
On Thu, Mar 2, 2017 at 11:56 AM, vinayak wrote: > > On 2017/02/28 16:54, Masahiko Sawada wrote: > > I've created a wiki page[1] describing about the design and > functionality of this feature. Also it has some examples of use case, > so this page would be helpful

Re: [HACKERS] Backport of pg_statistics typos fix

2017-03-02 Thread Peter Eisentraut
On 2/8/17 14:54, Robert Haas wrote: > BTW, looking at that commit, this change looks to have adjusted this > from being wrong to still being wrong: > > -Allow pg_statistics to be reset by calling > pg_stat_reset() (Christopher) > +Allow pg_statistic to be reset by calling > pg_stat_reset()

Re: [HACKERS] Faster methods for getting SPI results

2017-03-02 Thread Peter Eisentraut
On 12/20/16 23:14, Jim Nasby wrote: > I've been looking at the performance of SPI calls within plpython. > There's a roughly 1.5x difference from equivalent python code just in > pulling data out of the SPI tuplestore. Some of that is due to an > inefficiency in how plpython is creating result

Re: [HACKERS] Enabling replication connections by default in pg_hba.conf

2017-03-02 Thread Peter Eisentraut
On 2/3/17 17:47, Michael Paquier wrote: > On Fri, Feb 3, 2017 at 4:59 AM, Simon Riggs wrote: >>> It's weirdly inconsistent now. You need a "replication" line in >>> pg_hba.conf to connect for logical decoding, but you can't restrict that >>> to a specific database because

Re: [HACKERS] Speedup twophase transactions

2017-03-02 Thread David Steele
Nikhil, On 2/27/17 12:19 AM, Nikhil Sontakke wrote: > Hi Michael, > > Thanks for taking a look at the patch. > > twophase.c: In function ‘PrepareRedoAdd’: > twophase.c:2539:20: warning: variable ‘gxact’ set but not used > [-Wunused-but-set-variable] > GlobalTransaction gxact;

Re: [HACKERS] Proposal for changes to recovery.conf API

2017-03-02 Thread David Steele
Hi Simon, On 2/25/17 2:43 PM, Simon Riggs wrote: > On 25 February 2017 at 13:58, Michael Paquier > wrote: > >> - trigger_file is removed. >> FWIW, my only complain is about the removal of trigger_file, this is >> useful to detect a trigger file on a different

Re: [HACKERS] delta relations in AFTER triggers

2017-03-02 Thread David Steele
Hi Kevin, On 2/20/17 10:43 PM, Thomas Munro wrote: > On Tue, Feb 21, 2017 at 7:14 AM, Thomas Munro > wrote: >> On Fri, Jan 20, 2017 at 2:49 AM, Kevin Grittner wrote: >>> Attached is v9 which fixes bitrot from v8. No other changes. >>> >>> Still

Re: [HACKERS] [PATCH] kNN for btree

2017-03-02 Thread David Steele
Hi Alexander, On 2/16/17 11:20 AM, Robert Haas wrote: > On Thu, Feb 16, 2017 at 10:59 AM, Tom Lane wrote: >> Robert Haas writes: >>> On Thu, Feb 16, 2017 at 8:05 AM, Alexander Korotkov >>> wrote: My idea is that we need

Re: [HACKERS] multivariate statistics (v25)

2017-03-02 Thread Tomas Vondra
On 03/02/2017 07:42 AM, Kyotaro HORIGUCHI wrote: Hello, At Thu, 2 Mar 2017 04:05:34 +0100, Tomas Vondra wrote in OK, attached is v24 of the patch series, addressing most of the reported issues and comments

Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument

2017-03-02 Thread David Steele
Peter, On 2/1/17 12:59 AM, Michael Paquier wrote: > On Thu, Jan 26, 2017 at 8:16 AM, Tom Lane wrote: >> [ in the service of closing out this thread... ] >> >> Peter Geoghegan writes: >>> Finally, 0003-* is a Valgrind suppression borrowed from my parallel >>>

Re: [HACKERS] [Doc fix] Wrong explanation about tsquery_phrase

2017-03-02 Thread Tom Lane
"Seki, Eiji" writes: > I found a wrong explanation about tsquery_phrase. I was slightly confused > when I tried to use it. Yes, this was definitely an oversight in 028350f61; thanks for catching it! I think though that it would read better if it simply said

[HACKERS] Questions about MergeAppend

2017-03-02 Thread Ronan Dunklau
Hello, Looking into the MergeAppendPath generation, I'm a bit surprised by several things: - When generating the mergeappendpath, we use a dummy path to take the sort cost into account for non-sorted subpaths. This is called with the base relation tuples instead of the subpath estimated

Re: [HACKERS] Indirect indexes

2017-03-02 Thread David Steele
Hi Álvaro, On 1/31/17 11:54 PM, Michael Paquier wrote: > On Sat, Dec 31, 2016 at 7:35 AM, Alvaro Herrera > wrote: >> Attached is v4, which fixes a couple of relatively minor bugs. There >> are still things to tackle before this is committable, but coding review >> of

Re: [HACKERS] Cost model for parallel CREATE INDEX

2017-03-02 Thread Robert Haas
On Wed, Mar 1, 2017 at 12:58 AM, Peter Geoghegan wrote: > * This scales based on output size (projected index size), not input > size (heap scan input). Apparently, that's what we always do right > now. Actually, I'm not aware of any precedent for that. I'd just pass the heap size

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-03-02 Thread Amit Kapila
On Sun, Feb 26, 2017 at 10:16 PM, Robert Haas wrote: > On Wed, Feb 22, 2017 at 11:49 PM, Mithun Cy > wrote: >> Hi all thanks, >> I have tried to fix all of the comments given above with some more >> code cleanups. > > While reading this patch

Re: [HACKERS] [PATCH] ALTER DEFAULT PRIVILEGES with GRANT/REVOKE ON SCHEMAS

2017-03-02 Thread David Steele
On 1/18/17 7:18 PM, Petr Jelinek wrote: > On 10/01/17 17:33, Matheus de Oliveira wrote: >> >> On Mon, Jan 9, 2017 at 10:58 AM, Ashutosh Sharma > > wrote: >> >> > Also, should I add translations for that error message in other >> languages

Re: [HACKERS] Parallel bitmap heap scan

2017-03-02 Thread Robert Haas
On Tue, Feb 28, 2017 at 9:18 PM, Dilip Kumar wrote: > 0001- same as previous with some changes for freeing the shared memory stuff. > 0002- nodeBitmapHeapScan refactoring, this applies independently > 0003- actual parallel bitmap stuff applies on top of 0001 and 0002 0002

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-02 Thread Ashutosh Bapat
On Thu, Mar 2, 2017 at 6:06 PM, Rushabh Lathia wrote: > Hi, > > While reading through the cost_agg() I found that startup cost for the > group aggregate is not correctly assigned. Due to this explain plan is > not printing the correct startup cost. > > Without patch: > >

Re: [HACKERS] [POC] hash partitioning

2017-03-02 Thread amul sul
On Wed, Mar 1, 2017 at 3:50 PM, Yugo Nagata wrote: > ​[]​ > > I Agree that it is unavoidable partitions number in modulo hashing, > > but we can do in other hashing technique. Have you had thought about > > Linear hashing[1] or Consistent hashing​[2]?​ This will allow

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-02 Thread Robert Haas
On Thu, Mar 2, 2017 at 3:52 PM, Amit Langote wrote: >> think we should omit this logic (and change the documentation to >> match). That is, a database-wide ANALYZE should update the statistics >> for each child as well as for the parent. Otherwise direct queries

[HACKERS] Print correct startup cost for the group aggregate.

2017-03-02 Thread Rushabh Lathia
Hi, While reading through the cost_agg() I found that startup cost for the group aggregate is not correctly assigned. Due to this explain plan is not printing the correct startup cost. Without patch: postgres=# explain select aid, sum(abalance) from pgbench_accounts where filler like '%foo%'

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

2017-03-02 Thread Craig Ringer
On 2 March 2017 at 16:20, Stas Kelvich wrote: > >> On 2 Mar 2017, at 11:00, Craig Ringer wrote: >> >> We already have it, because we just decoded the PREPARE TRANSACTION. >> I'm preparing a patch revision to demonstrate this. > > Yes, we already

Re: [HACKERS] SCRAM authentication, take three

2017-03-02 Thread Kyotaro HORIGUCHI
I'm studying the normalization of Unicode so I apologize possible stupidity in advance. At Thu, 2 Mar 2017 15:50:34 +0900, Michael Paquier wrote in > On Tue, Feb 21, 2017 at 9:53 AM, Michael Paquier

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-02 Thread Robert Haas
On Thu, Mar 2, 2017 at 3:54 PM, Amit Kapila wrote: > On Thu, Mar 2, 2017 at 3:50 PM, Robert Haas wrote: >> On Tue, Feb 28, 2017 at 5:25 PM, Amit Kapila wrote: >>> When such a function (that contains statements which have

Re: [HACKERS] update comments about CatalogUpdateIndexes

2017-03-02 Thread Robert Haas
On Tue, Feb 28, 2017 at 10:45 PM, Tomas Vondra wrote: > commit 2f5c9d9c9ce removed CatalogUpdateIndexes and replaced it with > CatalogTupleInsert/CatalogTupleUpdate, which do both the operation and index > update. > > But there remained three places in comments still

Re: [pgsql-www] [HACKERS] Small issue in online devel documentation build

2017-03-02 Thread Fabien COELHO
After asking around, and testing with a colleague, we got the same strange size behavior on firefox mac as well. There are 2 possible solutions: (1) do not nest in the first place (i.e. apply the patch I sent). (2) do use absolute sizes in the CSS, not relative ones like "1.3em" which

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-03-02 Thread Maksim Milyutin
On 02.03.2017 11:41, Robert Haas wrote: Sounds generally good. One thing to keep in mind is that - in this system - a UNIQUE index on the parent doesn't actually guarantee uniqueness across the whole partitioning hierarchy unless it so happens that the index columns or expressions are the same

Re: [HACKERS] [PATCH] SortSupport for macaddr type

2017-03-02 Thread Robert Haas
On Tue, Feb 28, 2017 at 10:28 PM, Brandur Leach wrote: > * I've been generating a new OID value with the > `unused_oids` script, but pretty much every time I rebase > I collide with someone else's addition and need to find a > new one. Is it better for me to pick an

Re: [pgsql-www] [HACKERS] Small issue in online devel documentation build

2017-03-02 Thread Fabien COELHO
I'm not sure whether it is a stylesheet issue: it is the stylesheet as interpreted by chrome... all is fine with firefox. Whether the bug is in chrome or the stylesheet or elsewhere is well beyond my HTML/CSS skills, but I can ask around. After asking around, and testing with a colleague,

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-02 Thread Amit Kapila
On Thu, Mar 2, 2017 at 3:50 PM, Robert Haas wrote: > On Tue, Feb 28, 2017 at 5:25 PM, Amit Kapila wrote: >> When such a function (that contains statements which have parallel >> plans) is being executed as part of another parallel plan, it can >>

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-02 Thread Amit Langote
On 2017/03/02 18:36, Robert Haas wrote: > On Tue, Feb 28, 2017 at 11:35 AM, Amit Langote wrote: >>> In acquire_inherited_sample_rows(), instead of inserting a whole >>> stanza of logic just above the existing dispatch on relkind, I think >>> we can get by with a very slightly update to what's

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-02 Thread Robert Haas
On Tue, Feb 28, 2017 at 5:25 PM, Amit Kapila wrote: > When such a function (that contains statements which have parallel > plans) is being executed as part of another parallel plan, it can > allow spawning workers unboundedly. Assume a query like select * > from t1

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

2017-03-02 Thread Fabien COELHO
Hello Corey, Tom was pretty adamant that invalid commands are not executed. So in a case like this, with ON_ERROR_STOP off: \if false \echo 'a' \elif true \echo 'b' \elif invalid \echo 'c' \endif Both 'b' and 'c' should print, because "\elif invalid" should not execute. The code I had before

Re: [HACKERS] [Doc fix] Wrong explanation about tsquery_phrase

2017-03-02 Thread Robert Haas
On Tue, Feb 28, 2017 at 3:24 PM, Seki, Eiji wrote: > I found a wrong explanation about tsquery_phrase. I was slightly confused > when I tried to use it. > > The current document explains tsquery_phrase as the followings[1]. > > - Function: tsquery_phrase(query1 tsquery,

Re: [HACKERS] Documentation improvements for partitioning

2017-03-02 Thread Robert Haas
On Mon, Feb 27, 2017 at 5:14 PM, Simon Riggs wrote: >> I like the idea of merging what are now two chapters into one and call it >> Partitioned Tables, retaining the text that describes concepts > > +1 > > ...but how? > > 5.10 Partitioned Tables and Related Solutions >

Re: [HACKERS] Re: new high availability feature for the system with both asynchronous and synchronous replication

2017-03-02 Thread Robert Haas
On Tue, Feb 28, 2017 at 10:26 AM, Higuchi, Daisuke wrote: > I create POC patch for my proposal of new feature for high availability. > I want to discuss about this feature. But this feature might be PG11 > because discussion is not enough. > > This patch enables

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-02 Thread Robert Haas
On Tue, Feb 28, 2017 at 11:35 AM, Amit Langote wrote: > How about the documentation changes in the attached updated 0001? I know > that this page needs a much larger rewrite as we are discussing in the > other thread. Looks good. >> In

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-03-02 Thread Surafel Temesgen
As far as my understanding the issue at that time was inability to process creation of a database and connecting to it with one query string and that can be solved by fixing transaction restriction checks for CREATE DATABASE or disallowing multiple queries in PQexe. If the issue solved and

Re: [HACKERS] [POC] hash partitioning

2017-03-02 Thread Yugo Nagata
Hi Aleksander , Thank you for reviewing the patch. On Wed, 1 Mar 2017 17:08:49 +0300 Aleksander Alekseev wrote: > Hi, Yugo. > > Today I've had an opportunity to take a closer look on this patch. Here are > a few things that bother me. > > 1a) There are missing

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-03-02 Thread Robert Haas
On Wed, Mar 1, 2017 at 4:23 PM, Maksim Milyutin wrote: > As I've understood from thread [1] the main issue of creating local indexes > for partitions is supporting REINDEX and DROP INDEX operations on parent > partitioned tables. Furthermore Robert Haas mentioned the

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

2017-03-02 Thread Stas Kelvich
> On 2 Mar 2017, at 11:00, Craig Ringer wrote: > > We already have it, because we just decoded the PREPARE TRANSACTION. > I'm preparing a patch revision to demonstrate this. Yes, we already have it, but if server reboots between commit prepared (all prepared state is

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Pavel Stehule
2017-03-02 8:04 GMT+01:00 Pavel Stehule : > Hi > > 2017-03-02 1:12 GMT+01:00 Alvaro Herrera : > >> >> I've been giving this a look. I started by tweaking the docs once >> again, and while verifying that the example works as expected, I >>

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

2017-03-02 Thread Craig Ringer
On 2 March 2017 at 16:00, Craig Ringer wrote: > What about if we ROLLBACK PREPARED after > we made the snapshot visible? Yeah, I'm pretty sure that's going to be a problem actually. You're telling the snapshot builder that an xact committed at PREPARE TRANSACTION time.

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

2017-03-02 Thread Craig Ringer
On 2 March 2017 at 15:27, Stas Kelvich wrote: > >> On 2 Mar 2017, at 01:20, Petr Jelinek wrote: >> >> The info gets removed on COMMIT PREPARED but at that point >> there is no real difference between replicating it as 2pc or 1pc since >>