Re: [HACKERS] Parallel Append implementation

2017-04-04 Thread Amit Khandekar
On 4 April 2017 at 01:47, Andres Freund wrote: >> +typedef struct ParallelAppendDescData >> +{ >> + LWLock pa_lock;/* mutual exclusion to choose >> next subplan */ >> + int pa_first_plan; /* plan to choose while >> wrapping around plans */ >>

Re: [HACKERS] Statement timeout behavior in extended queries

2017-04-04 Thread Tatsuo Ishii
>> If what Tatsuo-san said to Tom is correct (i.e. each Parse/Bind/Execute >> starts and stops the timer), then it's a concern and the patch should not be >> ready for committer. However, the current patch is not like that -- it >> seems to do what others in this thread are expecting. > > Oh,

[HACKERS] proposal: Introduction a commontype as new polymorphic type

2017-04-04 Thread Pavel Stehule
Hi I am still little bit unhappy with missing functionality in our generic types. If I write function fx(anyelement, anyelement) returns anyelement postgres=# create or replace function fx(anyelement, anyelement) returns anyelement as $$ select greather($1,$2) $$ language sql; CREATE FUNCTION po

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

2017-04-04 Thread Daniel Gustafsson
> On 04 Apr 2017, at 05:52, Alvaro Herrera wrote: > > 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 strc

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-04 Thread Fabien COELHO
Hello Pavel, The expression evaluation is interesting question, but there is a workaround - we can use \gset already. Yes, that is a good point. It is a little bit inconvenient because it requires a dummy variable name each time for testing. SELECT whatever AS somename \gset \if :somen

Re: [HACKERS] multivariate statistics (v25)

2017-04-04 Thread David Rowley
On 1 April 2017 at 04:25, David Rowley wrote: > I've attached an updated patch. I've made another pass at this and ended up removing the tryextstats variable. We now only try to use extended statistics when clauselist_selectivity() is given a valid RelOptInfo with rtekind == RTE_RELATION, and of

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-04 Thread Pavel Stehule
2017-04-04 9:53 GMT+02:00 Fabien COELHO : > > Hello Pavel, > > The expression evaluation is interesting question, but there is a >> workaround - we can use \gset already. >> > > Yes, that is a good point. It is a little bit inconvenient because it > requires a dummy variable name each time for tes

Re: [HACKERS] ANALYZE command progress checker

2017-04-04 Thread Amit Langote
On 2017/04/04 15:30, Masahiko Sawada wrote: >> We can report progress in terms of individual blocks only inside >> acquire_sample_rows(), which seems undesirable when one thinks that we >> will be resetting the target for every child table. We should have a >> global target that considers all chil

Re: [HACKERS] postgres_fdw bug in 9.6

2017-04-04 Thread Etsuro Fujita
On 2017/04/04 14:38, Ashutosh Bapat wrote: Probably we should use "could not be created" instead of "was not created" in "... a local path suitable for EPQ checks was not created". Done. "outer_path should not require relations from inner_path" may be reworded as "outer paths should not be pa

Re: [HACKERS] Some never executed code regarding the table sync worker

2017-04-04 Thread Kyotaro HORIGUCHI
Hi, At Sat, 1 Apr 2017 02:35:00 +0900, Masahiko Sawada wrote in > Hi all, > > After launched the sync table worker it enters ApplyWorkerMain > function. And then the table sync worker calls > LogicalRepSyncTableStart to synchronize the target table. Sure, > In > LogicalRepSyncTableStart, fin

Re: [HACKERS] Some never executed code regarding the table sync worker

2017-04-04 Thread Masahiko Sawada
On Tue, Apr 4, 2017 at 6:26 PM, Kyotaro HORIGUCHI wrote: > Hi, > > At Sat, 1 Apr 2017 02:35:00 +0900, Masahiko Sawada > wrote in >> Hi all, >> >> After launched the sync table worker it enters ApplyWorkerMain >> function. And then the table sync worker calls >> LogicalRepSyncTableStart to synch

Re: [HACKERS] Compiler warning in costsize.c

2017-04-04 Thread David Rowley
On 4 April 2017 at 16:22, Michael Paquier wrote: > 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\

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

2017-04-04 Thread Stas Kelvich
> On 4 Apr 2017, at 04:23, Masahiko Sawada wrote: > > > I reviewed this patch but when I tried to build contrib/test_decoding > I got the following error. > Thanks! Yes, seems that 18ce3a4a changed ProcessUtility_hook signature. Updated. > There are still some unnecessary code in v5 patch.

Re: [HACKERS] WIP: Covering + unique indexes.

2017-04-04 Thread Anastasia Lubennikova
01.04.2017 02:31, Peter Geoghegan: * index_truncate_tuple() should have as an argument the number of attributes. No need to "#include utils/rel.h" that way. Will fix. * I think that we should store this (the number of attributes), and use it directly when comparing, per my remarks to Tom over

Re: [HACKERS] Compiler warning in costsize.c

2017-04-04 Thread Michael Paquier
On Tue, Apr 4, 2017 at 7:03 PM, David Rowley wrote: > On 4 April 2017 at 16:22, Michael Paquier wrote: >> 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

[HACKERS] Parallel Bitmap Heap Scan - Prefetch pages are not updated properly

2017-04-04 Thread Dilip Kumar
While analyzing the coverage for the prefetching part, I found an issue that prefetch_pages were not updated properly while executing in parallel mode. Attached patch fixes the same. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com parallel_bitmap_prefetch_fix.patch Descriptio

Re: [HACKERS] Supporting huge pages on Windows

2017-04-04 Thread Craig Ringer
On 4 Apr. 2017 14:22, "Andres Freund" wrote: On 2017-01-05 03:12:09 +, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Magnus Hagander > > For the pg_ctl changes, we're going from removing all privilieges from

Re: [HACKERS] Page Scan Mode in Hash Index

2017-04-04 Thread Amit Kapila
On Sun, Apr 2, 2017 at 4:14 AM, Ashutosh Sharma wrote: > > Please note that these patches needs to be applied on top of [1]. > Few more review comments: 1. - page = BufferGetPage(so->hashso_curbuf); + blkno = so->currPos.currPage; + if (so->hashso_bucket_buf == so->currPos.buf) + { + buf = so->

Re: [HACKERS] asynchronous execution

2017-04-04 Thread Kyotaro HORIGUCHI
Hello, At Sun, 2 Apr 2017 12:21:14 -0400, Corey Huinker wrote in > > > > > > I'll continue working on this from this point aiming to the next > > commit fest. > > > > > This probably will not surprise you given the many commits in the past 2 > weeks, but the patches no longer apply to master:

Re: [HACKERS] Page Scan Mode in Hash Index

2017-04-04 Thread Amit Kapila
On Mon, Mar 27, 2017 at 7:04 PM, Ashutosh Sharma wrote: > > My guess (which could be wrong) is that so->hashso_bucket_buf = >> InvalidBuffer should be moved back up higher in the function where it >> was before, just after the first if statement, and that the new >> condition so->hashso_bucket_buf

Re: [HACKERS] FDW and parallel execution

2017-04-04 Thread Kyotaro HORIGUCHI
Hi, At Sun, 02 Apr 2017 16:30:24 +0300, Konstantin Knizhnik wrote in <58e0fcf0.2070...@postgrespro.ru> > Hi hackers and personally Robet (you are the best expert in both > areas). > I want to ask one more question concerning parallel execution and FDW. > Below are two plans for the same query (T

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

2017-04-04 Thread Mithun Cy
On Tue, Apr 4, 2017 at 9:18 AM, Robert Haas wrote: > Committed. Thanks Robert, And also sorry, one unfortunate thing happened in the last patch while fixing one of the review comments a variable disappeared from the equation @_hash_spareindex. splitpoint_phases += - (((num

Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256

2017-04-04 Thread Heikki Linnakangas
On 03/31/2017 10:10 AM, Michael Paquier wrote: On Wed, Mar 8, 2017 at 10:39 PM, Robert Haas wrote: On Tue, Mar 7, 2017 at 10:01 PM, Michael Paquier wrote: I kinda hope Heikki is going to step up to the plate here, because I think he understands most of it already. The second person who knows

Re: [HACKERS] UPDATE of partition key

2017-04-04 Thread Amit Khandekar
On 3 April 2017 at 17:13, Amit Langote wrote: > Hi Amit, > > Thanks for updating the patch. Since ddl.sgml got updated on Saturday, > patch needs a rebase. Rebased now. > >> On 31 March 2017 at 16:54, Amit Khandekar wrote: >>> On 31 March 2017 at 14:04, Amit Langote >>> wrote: On 2017/0

Re: [HACKERS] Making clausesel.c Smarter

2017-04-04 Thread David Rowley
On 4 April 2017 at 13:35, Claudio Freire wrote: > 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 qua

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

2017-04-04 Thread Masahiko Sawada
On Tue, Apr 4, 2017 at 10:09 AM, Kyotaro HORIGUCHI wrote: > 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 I'd like to propose this because >> > this cannot be back-

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

2017-04-04 Thread Robert Haas
On Tue, Apr 4, 2017 at 6:33 AM, Mithun Cy wrote: > On Tue, Apr 4, 2017 at 9:18 AM, Robert Haas wrote: >> Committed. > > Thanks Robert, > > And also sorry, one unfortunate thing happened in the last patch while > fixing one of the review comments a variable disappeared from the > equation > @_hash

Re: [HACKERS] Page Scan Mode in Hash Index

2017-04-04 Thread Robert Haas
On Tue, Apr 4, 2017 at 6:29 AM, Amit Kapila wrote: > On Mon, Mar 27, 2017 at 7:04 PM, Ashutosh Sharma > wrote: >> My guess (which could be wrong) is that so->hashso_bucket_buf = >>> InvalidBuffer should be moved back up higher in the function where it >>> was before, just after the first if stat

Re: [HACKERS] Parallel Append implementation

2017-04-04 Thread Robert Haas
On Tue, Apr 4, 2017 at 12:47 AM, Andres Freund wrote: > I don't think the parallel seqscan is comparable in complexity with the > parallel append case. Each worker there does the same kind of work, and > if one of them is behind, it'll just do less. But correct sizing will > be more important wi

Re: [HACKERS] wait event documentation

2017-04-04 Thread Robert Haas
On Mon, Apr 3, 2017 at 11:57 PM, Amit Langote wrote: > By the way, wonder if it wouldn't make sense to take the whole Table 28.1. > Dynamic Statistics Views into a new section (perhaps before 28.2 Viewing > Locks or after), since those views display information different from what > the statistics

Re: [HACKERS] wait event documentation

2017-04-04 Thread Amit Langote
On Tue, Apr 4, 2017 at 9:05 PM, Robert Haas wrote: > On Mon, Apr 3, 2017 at 11:57 PM, Amit Langote > wrote: >> By the way, wonder if it wouldn't make sense to take the whole Table 28.1. >> Dynamic Statistics Views into a new section (perhaps before 28.2 Viewing >> Locks or after), since those vie

Re: [HACKERS] postgres_fdw bug in 9.6

2017-04-04 Thread Ashutosh Bapat
On Tue, Apr 4, 2017 at 2:31 PM, Etsuro Fujita wrote: > > I rebased the patch also. Please find attached an updated version of the > patch. > Thanks, marking this as "ready for committer". -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

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

2017-04-04 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > 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 th

Re: [HACKERS] Logical replication origin tracking fix

2017-04-04 Thread Peter Eisentraut
On 3/24/17 10:48, Petr Jelinek wrote: > On 10/03/17 05:59, Petr Jelinek wrote: >> while discussing with Craig issues around restarting logical replication >> stream related to the patch he posted [1], I realized that we track >> wrong origin LSN in the logical replication apply. >> >> We currently

Re: [HACKERS] Logical replication SnapBuildInitalSnapshot spelling

2017-04-04 Thread Peter Eisentraut
On 3/24/17 11:04, Marko Tiikkaja wrote: > Commit 7c4f52409a8c7d85ed169bbbc1f6092274d03920 seems to have introduced > an alternative spelling of "initial". Fixed in the attached. This was committed as part of other changes already. -- Peter Eisentraut http://www.2ndQuadrant.com/ Pos

Re: [HACKERS] Making clausesel.c Smarter

2017-04-04 Thread David Rowley
On 3 April 2017 at 20:59, David Rowley wrote: > Updated patch attached. I did a little benchmarking on this to learn how planning time is affected. Master = 9fa6e08d4a16f9b0461743cff35781e16308c106 Patched = 9fa6e08d4a16f9b0461743cff35781e16308c106 + smarter_clausesel_2017-04-03.patch Config:

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

2017-04-04 Thread David Steele
On 3/31/17 10:45 AM, David Steele wrote: > On 3/29/17 8:13 AM, Rahila Syed wrote: > >> Thanks for reporting. I have identified the problem and have a fix. >> Currently working on allowing >> adding a partition after default partition if the default partition does >> not have any conflicting rows.

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

2017-04-04 Thread Peter Eisentraut
On 4/3/17 23:41, Ashutosh Bapat wrote: > I forgot to specify the platform in my mail. It's Ubuntu 12.04 64bit. I > have docbook-xsl 1.76.1+dfsg-1ubuntu1. Looks like I need to update it to > 1.77.1, but 12.04 doesn't support it readily, will need to force an upgrade. You can just uninstall the docb

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-04 Thread Alexander Korotkov
On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund wrote: > 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

Re: [HACKERS] PDF build is broken

2017-04-04 Thread Peter Eisentraut
On 3/30/17 12:03, Devrim Gündüz wrote: >> But I also suggest that you try out the FOP based builds, >> because the jadetex-based builds will probably go away soon. > > Can you please let me know how I will do it? Any docs somewhere? Please see this thread: https://www.postgresql.org/message-id/8

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-04 Thread David Steele
On 4/4/17 8:55 AM, Alexander Korotkov wrote: > On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund > I'm inclined to push this to the next CF, it seems we need a lot more > benchmarking here. > > > No objections. This submission has been moved to CF 2017-07. Thanks, -- -David da...@pgmaste

Re: [HACKERS] Comment typo in logical/worker.c

2017-04-04 Thread Peter Eisentraut
On 4/3/17 02:11, Masahiko Sawada wrote: > Attached fixes a comment typo in logical/worker.c file. committed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@

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

2017-04-04 Thread David Steele
Hi Tomas, On 4/1/17 5:40 AM, Ashutosh Sharma wrote: > > Apart from above comments, your patch looks good to me. I have also > marked this patch as 'Waiting for Author' in the commitfest. Thanks. The CF has been extended until April 7 but time is still growing short and this thread has been idle

Re: [HACKERS] Should we cacheline align PGXACT?

2017-04-04 Thread Simon Riggs
On 4 April 2017 at 08:58, David Steele wrote: > On 4/4/17 8:55 AM, Alexander Korotkov wrote: >> On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund > >> I'm inclined to push this to the next CF, it seems we need a lot more >> benchmarking here. >> >> >> No objections. > > This submission has bee

Re: [HACKERS] Parallel Bitmap Heap Scan - Prefetch pages are not updated properly

2017-04-04 Thread Robert Haas
On Tue, Apr 4, 2017 at 6:24 AM, Dilip Kumar wrote: > While analyzing the coverage for the prefetching part, I found an > issue that prefetch_pages were not updated properly while executing in > parallel mode. > > Attached patch fixes the same. Wow, OK. Committed. -- Robert Haas EnterpriseDB: h

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

2017-04-04 Thread Vicky Vergara
Thanks, you answered so fast that I know I am stepping into dangerous grounds. But I would like to know more about your experience. Any links that you can give me to read about the code and/or issues regarding the ip4r experience? Vicky De: Andrew Gierth E

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

2017-04-04 Thread Simon Riggs
On 4 April 2017 at 09:05, David Steele wrote: > Hi Tomas, > > On 4/1/17 5:40 AM, Ashutosh Sharma wrote: >> >> Apart from above comments, your patch looks good to me. I have also >> marked this patch as 'Waiting for Author' in the commitfest. Thanks. > > The CF has been extended until April 7 but t

Re: [HACKERS] New CORRESPONDING clause design

2017-04-04 Thread David Steele
On 4/1/17 1:54 PM, Tom Lane wrote: > > I'll set this back to Waiting on Author, but I think the chances of > getting to a committable patch before the end of the commitfest are > about nil. I think this is especially true now that another three days have passed. This submission has been marked "

[HACKERS] Re: [COMMITTERS] pgsql: Add COMMENT and SECURITY LABEL support for publications and subs

2017-04-04 Thread Peter Eisentraut
On 3/25/17 12:24, Stephen Frost wrote: >> Add COMMENT and SECURITY LABEL support for publications and subscriptions > > Isn't this missing psql tab completion, and pg_dump support? And > regression tests for the latter? I have added the tab completion support. Attached is a patch that adds the

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

2017-04-04 Thread Rahila Syed
Hello, Please find attached an updated patch. Following has been accomplished in this update: 1. A new partition can be added after default partition if there are no conflicting rows in default partition. 2. Solved the crash reported earlier. Thank you, Rahila Syed On Tue, Apr 4, 2017 at 6:22

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

2017-04-04 Thread David Steele
On 4/4/17 9:11 AM, Simon Riggs wrote: > On 4 April 2017 at 09:05, David Steele wrote: >> Hi Tomas, >> >> On 4/1/17 5:40 AM, Ashutosh Sharma wrote: >>> >>> Apart from above comments, your patch looks good to me. I have also >>> marked this patch as 'Waiting for Author' in the commitfest. Thanks. >>

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

2017-04-04 Thread Vicky Vergara
Thanks, > It is not safe due views - that are saved in post analyze form. What is post analyze form? any link that you can give me to read about it? Thanks De: Pavel Stehule Enviado: lunes, 3 de abril de 2017 11:21 p. m. Para: Vicky Vergara Cc: pgsql-hackers

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

2017-04-04 Thread Robert Haas
On Tue, Apr 4, 2017 at 9:32 AM, David Steele wrote: > My goal is to help people focus on patches that have a chance. At this > point I think that includes poking authors who are not being responsive > using the limited means at my disposal. +1. Pings on specific threads can help clear things up

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-04 Thread Robert Haas
On Mon, Apr 3, 2017 at 12:02 PM, Joe Conway wrote: >> 0002 looks extremely straightforward, but I wonder if we could get one >> of the people on this list who knows about sepgsql to have a look? >> (Stephen Frost, Joe Conway, KaiGai Kohei...) > > Will have a look later today. I think it is now to

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

2017-04-04 Thread Peter Eisentraut
On 4/3/17 11:32, Andres Freund wrote: > That doesn't strike as particularly future proof. We intentionally > leave objects behind pg_regress runs, but that only works if we actually > run them... I generally agree with the sentiments expressed later in this thread. But just to clarify what I mean

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

2017-04-04 Thread David Steele
On 4/4/17 9:43 AM, Robert Haas wrote: > On Tue, Apr 4, 2017 at 9:32 AM, David Steele wrote: >> My goal is to help people focus on patches that have a chance. At this >> point I think that includes poking authors who are not being responsive >> using the limited means at my disposal. > > +1. Pin

[HACKERS] Re: [COMMITTERS] pgsql: Add COMMENT and SECURITY LABEL support for publications and subs

2017-04-04 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 3/25/17 12:24, Stephen Frost wrote: > >> Add COMMENT and SECURITY LABEL support for publications and subscriptions > > > > Isn't this missing psql tab completion, and pg_dump support? And > > regression tests for the latter

[HACKERS] v10 Open Item Ownership

2017-04-04 Thread Noah Misch
The release management team has determined the following: An open item "owner" is a person taking overall responsibility for the work required to close a particular PostgreSQL 10 open item. Tasks required to close an open item may include performing tests, persuading issue reporters to pr

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-04 Thread Joe Conway
On 04/04/2017 06:45 AM, Robert Haas wrote: > On Mon, Apr 3, 2017 at 12:02 PM, Joe Conway wrote: >>> 0002 looks extremely straightforward, but I wonder if we could get one >>> of the people on this list who knows about sepgsql to have a look? >>> (Stephen Frost, Joe Conway, KaiGai Kohei...) >> >> W

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

2017-04-04 Thread David Steele
Hi Anastasia, On 3/13/17 9:14 PM, Peter Geoghegan wrote: > On Wed, Jan 25, 2017 at 3:11 PM, Peter Geoghegan wrote: >> On Wed, Jan 25, 2017 at 3:11 PM, Tom Lane wrote: >>> Please. You might want to hit the existing ones with a separate patch, >>> but it doesn't much matter; I'd be just as happy

Re: [HACKERS] Parallel Append implementation

2017-04-04 Thread Robert Haas
On Mon, Apr 3, 2017 at 4:17 PM, Andres Freund wrote: > I'm afraid this is too late for v10 - do you agree? Yeah, I think so. The benefit of this will be a lot more once we get partitionwise join and partitionwise aggregate working, but that probably won't happen for this release, or at best in l

Re: [HACKERS] background sessions

2017-04-04 Thread Robert Haas
On Sat, Mar 18, 2017 at 1:10 PM, Robert Haas wrote: > On Sat, Mar 18, 2017 at 10:59 AM, Petr Jelinek > wrote: >>> shm_redirect_to_shm_mq() wasn't really designed to be used this way; >>> it's designed for use by the worker, not the process that launched it. >>> If an error occurs while output is

Re: [HACKERS] Logical decoding on standby

2017-04-04 Thread Craig Ringer
Hi all Here's the final set of three patches on top of what's already committed. The first is catalog_xmin logging, which is unchanged from the prior post. The 2nd is support for conflict with recovery, with changes that should address Andres's concerns there. The 3rd actually enables decoding

Re: [HACKERS] Logical decoding on standby

2017-04-04 Thread Craig Ringer
On 4 April 2017 at 22:32, Craig Ringer wrote: > Hi all > > Here's the final set of three patches on top of what's already committed. > > The first is catalog_xmin logging, which is unchanged from the prior post. > > The 2nd is support for conflict with recovery, with changes that > should address

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-04-04 Thread Stephen Frost
Greetings, * Craig Ringer (cr...@2ndquadrant.com) wrote: > On 31 March 2017 at 04:29, Stephen Frost wrote: > > > Unless people wish to object, I'll use Michael's patch to remove > > --verbose from the top level tomorrow. > > Sounds good. > > Maybe add > > To get more detailed output from test

Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional

2017-04-04 Thread Stephen Frost
* David Steele (da...@pgmasters.net) wrote: > On 3/22/17 4:42 PM, Peter Eisentraut wrote: > >On 3/22/17 15:14, Stephen Frost wrote: > >>>-SELECT * FROM pg_stop_backup(false); > >>>+SELECT * FROM pg_stop_backup(false [, true ]); > >>> > >>>I think that it's better to get rid of "[" and "]" from the

Re: [HACKERS] postgres_fdw: support parameterized foreign joins

2017-04-04 Thread Arthur Zakirov
On 23.03.2017 15:45, Etsuro Fujita wrote: Done. Also, I added regression tests and revised code and comments a bit. (As for create_foreignscan_path(), I haven't done anything about that yet.) Please find attached a new version created on top of [1]. Thank you! I didn't notice that it is ne

Re: [HACKERS] Making clausesel.c Smarter

2017-04-04 Thread Claudio Freire
On Tue, Apr 4, 2017 at 8:12 AM, David Rowley wrote: > Result Comparison > > Master median tps Patch median tps comparison > Test 1 6993.7 6714.3 104.16% > Test 2 7053.1 6921.6 101.90% > Test 3 5137.2 4954.2 103.69% > Test 4 27.1 19.4 139.72% > Test 5 54.1 51.4 105.28% > Test 6 9328.1 9478.2 98.42%

Re: [HACKERS] Making clausesel.c Smarter

2017-04-04 Thread Claudio Freire
On Tue, Apr 4, 2017 at 8:21 AM, David Rowley wrote: > On 4 April 2017 at 13:35, Claudio Freire wrote: >> 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

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

2017-04-04 Thread Maksim Milyutin
On 01.03.2017 13:53, Maksim Milyutin wrote: Hi hackers! 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 problem of creating index on key

Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional

2017-04-04 Thread David Steele
On 4/4/17 11:42 AM, Stephen Frost wrote: > * David Steele (da...@pgmasters.net) wrote: >> On 3/22/17 4:42 PM, Peter Eisentraut wrote: >>> On 3/22/17 15:14, Stephen Frost wrote: > -SELECT * FROM pg_stop_backup(false); > +SELECT * FROM pg_stop_backup(false [, true ]); > > I think that

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

2017-04-04 Thread Robert Haas
On Tue, Apr 4, 2017 at 9:07 AM, Vicky Vergara wrote: > you answered so fast that I know I am stepping into dangerous grounds. > > But I would like to know more about your experience. > > Any links that you can give me to read about the code and/or issues > regarding the ip4r experience? I can't c

Re: [HACKERS] ANALYZE command progress checker

2017-04-04 Thread Robert Haas
On Tue, Apr 4, 2017 at 4:57 AM, Amit Langote wrote: > Hmm, you're right. It could be counted with a separate variable > initialized to 0 and incremented every time we decide to add a row to the > final set of sampled rows, although different implementations of > AcquireSampleRowsFunc have differe

Re: [HACKERS] sequence data type

2017-04-04 Thread Peter Eisentraut
On 3/30/17 22:47, Vitaly Burovoy wrote: > It seemed not very hard to fix it. > Please find attached patch to be applied on top of your one. > > I've added more tests to cover different cases of changing bounds when > data type is changed. Committed all that. Thanks! -- Peter Eisentraut

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

2017-04-04 Thread Robert Haas
On Mon, Apr 3, 2017 at 6:08 AM, Kuntal Ghosh wrote: > 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

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-04 Thread Mike Palmiotto
On Tue, Apr 4, 2017 at 10:19 AM, Joe Conway wrote: > On 04/04/2017 06:45 AM, Robert Haas wrote: >> On Mon, Apr 3, 2017 at 12:02 PM, Joe Conway wrote: 0002 looks extremely straightforward, but I wonder if we could get one of the people on this list who knows about sepgsql to have a look?

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

2017-04-04 Thread Ashutosh Sharma
Hi, As I am not seeing any response from Tomas for last 2-3 days and since the commit-fest is coming towards end, I have planned to work on the review comments that I had given few days back and submit the updated patch. PFA new version of patch that takes care of all the review comments given by

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-04-04 Thread Joe Conway
On 04/04/2017 09:55 AM, Mike Palmiotto wrote: > On Tue, Apr 4, 2017 at 10:19 AM, Joe Conway wrote: >> On 04/04/2017 06:45 AM, Robert Haas wrote: >>> On Mon, Apr 3, 2017 at 12:02 PM, Joe Conway wrote: > 0002 looks extremely straightforward, but I wonder if we could get one > of the people

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

2017-04-04 Thread Keith Fiske
On Mon, Apr 3, 2017 at 11:33 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > >>> Thankfully since native partitioning still uses inheritance internally for the most part, pg_partman works pretty well without nearly as much change as I thought I would need.

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

2017-04-04 Thread Pavel Stehule
2017-04-04 15:40 GMT+02:00 Vicky Vergara : > Thanks, > > > > It is not safe due views - that are saved in post analyze form. > > > What is post analyze form? any link that you can give me to read about it? > The Query pipe line is: parsing, analyze, optimalization, execution when you change a AP

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

2017-04-04 Thread Masahiko Sawada
On Tue, Apr 4, 2017 at 7:06 PM, Stas Kelvich wrote: > >> On 4 Apr 2017, at 04:23, Masahiko Sawada wrote: >> >> >> I reviewed this patch but when I tried to build contrib/test_decoding >> I got the following error. >> > > Thanks! > > Yes, seems that 18ce3a4a changed ProcessUtility_hook signature.

Re: [HACKERS] identity columns

2017-04-04 Thread Tom Lane
Peter Eisentraut writes: > On 4/3/17 14:19, Andres Freund wrote: > + *op->resvalue = > Int64GetDatum(nextval_internal(op->d.nextvalueexpr.seqid, false)); >> Is it guaranteed that the caller expects an int64? I saw that >> nextvalueexpr's have a typeid field. > It expects on

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

2017-04-04 Thread Andres Freund
On 2017-04-04 13:06:13 +0300, Stas Kelvich wrote: > That is just argument against Andres concern that prepared transaction > is able to deadlock with decoding process — at least no such cases in > regression tests. There's few longer / adverse xacts, that doesn't say much. > And that concern is

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

2017-04-04 Thread Tomas Vondra
On 04/04/2017 06:52 PM, Robert Haas wrote: On Mon, Apr 3, 2017 at 6:08 AM, Kuntal Ghosh wrote: 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_co

Re: [HACKERS] Compiler warning in costsize.c

2017-04-04 Thread Tom Lane
Michael Paquier writes: > 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' : > unreferenced local variable [C:\Users\ioltas\git\postgres\postgres.vcxproj] >

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-04-04 Thread Petr Jelinek
So this is what I came up with on plane. Generalized the loading functionality into load_library_function which that can load either known postgres functions or call load_external_function. I am not quite sure if fmgr.c is best place to put it, but I didn't want to include stuff from executor in b

Re: [HACKERS] multivariate statistics (v25)

2017-04-04 Thread Tomas Vondra
On 04/04/2017 09:55 AM, David Rowley wrote: On 1 April 2017 at 04:25, David Rowley wrote: I've attached an updated patch. I've made another pass at this and ended up removing the tryextstats variable. We now only try to use extended statistics when clauselist_selectivity() is given a valid Re

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

2017-04-04 Thread Tomas Vondra
Thanks. I planned to look into this today, but you've been faster ;-) regards Tomas On 04/04/2017 06:55 PM, Ashutosh Sharma wrote: Hi, As I am not seeing any response from Tomas for last 2-3 days and since the commit-fest is coming towards end, I have planned to work on the review comments tha

Re: [HACKERS] WIP: Covering + unique indexes.

2017-04-04 Thread Peter Geoghegan
On Tue, Apr 4, 2017 at 3:07 AM, Anastasia Lubennikova wrote: >> * I think that we should store this (the number of attributes), and >> use it directly when comparing, per my remarks to Tom over on that >> other thread. We should also use the free bit within >> IndexTupleData.t_info, to indicate th

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

2017-04-04 Thread David Steele
On 4/4/17 12:55 PM, Ashutosh Sharma wrote: > > As I am not seeing any response from Tomas for last 2-3 days and since > the commit-fest is coming towards end, I have planned to work on the > review comments that I had given few days back and submit the updated > patch. PFA new version of patch tha

[HACKERS] psql - add special variable to reflect the last query status

2017-04-04 Thread Fabien COELHO
After some discussions about what could be useful since psql scripts now accepts tests, this patch sets a few variables which can be used by psql after a "front door" (i.e. actually typed by the user) query: - RESULT_STATUS: the status of the query - ERROR: whether the query failed - ERROR

Re: [HACKERS] Parallel Append implementation

2017-04-04 Thread Andres Freund
On 2017-04-04 08:01:32 -0400, Robert Haas wrote: > On Tue, Apr 4, 2017 at 12:47 AM, Andres Freund wrote: > > I don't think the parallel seqscan is comparable in complexity with the > > parallel append case. Each worker there does the same kind of work, and > > if one of them is behind, it'll just

Re: [HACKERS] Logical decoding on standby

2017-04-04 Thread Andres Freund
On 2017-04-04 22:32:40 +0800, Craig Ringer wrote: > I'm much happier with this. I'm still fixing some issues in the tests > for 03 and tidying them up, but 03 should allow 01 and 02 to be > reviewed in their proper context now. To me this very clearly is too late for v10, and now should be moved t

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

2017-04-04 Thread Andres Freund
On 2017-03-13 18:14:07 -0700, Peter Geoghegan wrote: > From 5351b5db257cb39832647d9117465c0217e6268b Mon Sep 17 00:00:00 2001 > From: Peter Geoghegan > Date: Thu, 13 Oct 2016 10:54:31 -0700 > Subject: [PATCH 1/2] Avoid copying within tuplesort_gettupleslot(). s/Avoid/Allow to avoid/ > Add a "cop

[HACKERS] bug in SlabAlloc / VALGRIND_MAKE_MEM_DEFINED

2017-04-04 Thread Tomas Vondra
Hi, Andres nagged to me about valgrind runs taking much longer since 9fab40ad introduced the SlabContext into reorderbuffer.c. And by "longer" I mean hours instead of minutes. After a bit of investigation I stumbled on this line in slab.c: VALGRIND_MAKE_MEM_DEFINED(chunk, SlabChunkGetPoint

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

2017-04-04 Thread Peter Geoghegan
On Tue, Apr 4, 2017 at 1:32 PM, Andres Freund wrote: > s/Avoid/Allow to avoid/ WFM. >> + * >> + * Callers cannot rely on memory for tuple in returned slot remaining valid >> + * past any subsequent manipulation of the sorter, such as another fetch of >> + * input from sorter. (The sorter may re

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-04-04 Thread Pavel Stehule
2017-04-04 22:05 GMT+02:00 Fabien COELHO : > > After some discussions about what could be useful since psql scripts now > accepts tests, this patch sets a few variables which can be used by psql > after a "front door" (i.e. actually typed by the user) query: > > - RESULT_STATUS: the status of the

Re: [HACKERS] PATCH: recursive json_populate_record()

2017-04-04 Thread Andrew Dunstan
On 04/03/2017 05:17 PM, Andres Freund wrote: > 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:

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

2017-04-04 Thread Keith Fiske
On Tue, Apr 4, 2017 at 9:30 AM, Rahila Syed wrote: > Hello, > > Please find attached an updated patch. > Following has been accomplished in this update: > > 1. A new partition can be added after default partition if there are no > conflicting rows in default partition. > 2. Solved the crash repor

Re: [HACKERS] bug in SlabAlloc / VALGRIND_MAKE_MEM_DEFINED

2017-04-04 Thread Tomas Vondra
On 04/04/2017 10:42 PM, Tomas Vondra wrote: Hi, Andres nagged to me about valgrind runs taking much longer since 9fab40ad introduced the SlabContext into reorderbuffer.c. And by "longer" I mean hours instead of minutes. After a bit of investigation I stumbled on this line in slab.c: VALGRIND

  1   2   >