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

2017-09-13 Thread Amit Khandekar
Hi, Rafia had done some testing on TPCH queries using Partition-wise join patch along with Parallel Append patch. There, we had observed that for query 4, even though the partition wise joins are under a Parallel Append, the join are all non-partial. Specifically, the partition-wise join has non

Re: [HACKERS] Parallel Hash take II

2017-09-13 Thread Prabhat Sahu
On Thu, Aug 31, 2017 at 6:23 PM, Thomas Munro wrote: > Here's a new rebased and debugged patch set. Hi Thomas, I have applied the recent patch (v19) and started testing on this feature and i got a crash with below testcase. with default setting on "postgres.conf" file create table tab1 (a in

Re: [HACKERS] Constraint exclusion for partitioned tables

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 12:17 PM, Jeevan Chalke wrote: > > > On Tue, Sep 12, 2017 at 8:12 PM, Robert Haas wrote: >> >> On Tue, Sep 12, 2017 at 7:08 AM, Jeevan Chalke >> wrote: >> > This patch clearly improves the planning time with given conditions. >> > >> > To verify that, I have created a tab

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-13 Thread Michael Paquier
On Wed, Sep 13, 2017 at 1:12 PM, Bossart, Nathan wrote: > On 9/12/17, 9:47 PM, "Michael Paquier" wrote: >> Those are minor points. The patch seems to be in good shape, and >> passes all my tests, including some pgbench'ing to make sure that >> nothing goes weird. So I'll be happy to finally switc

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-13 Thread Michael Paquier
On Wed, Sep 13, 2017 at 2:48 PM, Amit Langote wrote: > I updated the patches so that the metapage's pd_lower is set to the > correct value just before *every* point where we are about to insert a > full page image of the metapage into WAL. That's in addition to doing the > same in various metapag

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

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 12:39 AM, Robert Haas wrote: > On Tue, Sep 12, 2017 at 3:46 AM, Amit Langote > wrote: >> In this case, AcquireExecutorLocks will lock all the relations in >> PlannedStmt.rtable, which must include all partitioned tables of all >> partition trees involved in the query. Of

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

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 11:29 AM, Amit Langote wrote: > On 2017/09/12 19:56, Ashutosh Bapat wrote: >> I think the code here expects the original parent_rte and not the one >> we set around line 1169. >> >> This isn't a bug right now, since both the parent_rte s have same >> content. But I am not s

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

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 12:32 PM, Amit Khandekar wrote: > Hi, > > Rafia had done some testing on TPCH queries using Partition-wise join > patch along with Parallel Append patch. > > There, we had observed that for query 4, even though the partition > wise joins are under a Parallel Append, the joi

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

2017-09-13 Thread Amit Langote
On 2017/09/13 16:21, Ashutosh Bapat wrote: > On Wed, Sep 13, 2017 at 12:39 AM, Robert Haas wrote: >> locks taken from the executor are worthless because plancache.c will >> always do the job for us. I don't know of a case where we execute a >> saved plan without going through the plan cache, but

Re: [HACKERS] no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 7:49 AM, Amit Langote wrote: > On 2017/09/12 20:17, Ashutosh Bapat wrote: >> On Tue, Sep 12, 2017 at 2:27 PM, Amit Langote >> wrote: >>> Thanks Ashutosh for taking a look at this. >>> >>> On 2017/09/05 21:16, Ashutosh Bapat wrote: The patch needs a rebase. >>> >>> Att

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-13 Thread Amit Langote
On 2017/09/13 16:20, Michael Paquier wrote: > On Wed, Sep 13, 2017 at 2:48 PM, Amit Langote > wrote: >> I updated the patches so that the metapage's pd_lower is set to the >> correct value just before *every* point where we are about to insert a >> full page image of the metapage into WAL. That's

Re: [HACKERS] [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel

2017-09-13 Thread Alexey Chernyshov
On Sat, 9 Sep 2017 13:53:35 +0530 Ashutosh Sharma wrote: > > Finally, i got some time to look into this patch and surprisingly I > didn't find any function returning information at page level instead > all the SQL functions are returning information at index level. > Therefore, i too feel that i

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Christoph Berg
Re: Konstantin Knizhnik 2017-09-01 > + Functional index is based on on projection function: function which > extract subset of its argument. > + In mathematic such functions are called non-injective. For injective > function if any attribute used in the indexed > + expression

Re: [HACKERS] [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel

2017-09-13 Thread Ashutosh Sharma
On Wed, Sep 13, 2017 at 1:15 PM, Alexey Chernyshov wrote: > On Sat, 9 Sep 2017 13:53:35 +0530 > Ashutosh Sharma wrote: > >> >> Finally, i got some time to look into this patch and surprisingly I >> didn't find any function returning information at page level instead >> all the SQL functions are r

Re: [HACKERS] no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

2017-09-13 Thread Amit Langote
On 2017/09/13 16:42, Ashutosh Bapat wrote: > On Wed, Sep 13, 2017 at 7:49 AM, Amit Langote wrote: >> In the attached updated patch, I created separate .source files in >> src/test/regress/input and output directories called fdw_handler.source >> and put the test_fdw_handler function definition ther

Re: [HACKERS] no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 1:27 PM, Amit Langote wrote: > On 2017/09/13 16:42, Ashutosh Bapat wrote: >> On Wed, Sep 13, 2017 at 7:49 AM, Amit Langote wrote: >>> In the attached updated patch, I created separate .source files in >>> src/test/regress/input and output directories called fdw_handler.sour

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-09-13 Thread Alvaro Herrera
Kyotaro HORIGUCHI wrote: > The CF status of this patch turned into "Waiting on Author" by > automated CI checking. I object to automated turning of patches to waiting on author by machinery. Sending occasional reminder messages to authors making them know about outdated patches seems acceptable

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-09-13 Thread Kyotaro HORIGUCHI
At Wed, 13 Sep 2017 11:43:06 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170913.114306.67844218.horiguchi.kyot...@lab.ntt.co.jp> horiguchi.kyotaro> At Thu, 07 Sep 2017 21:59:56 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170907.215956.110216588.horiguchi.kyot...@

Re: [HACKERS] generated columns

2017-09-13 Thread Andreas Karlsson
On 09/13/2017 04:04 AM, Simon Riggs wrote: On 31 August 2017 at 05:16, Peter Eisentraut wrote: - index support (and related constraint support) Presumably you can't index a VIRTUAL column. Or at least I don't think its worth spending time trying to make it work. I think end users would be s

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Fabien COELHO
Finally, as vertical scrolling is mandatory, I would be fine with skipping lines with entries for readability, but it is just a matter of taste and I expect there should be half a dozen different opinions on the matter of formatting. FWIW, +1 to extra lines from me - I find it way more readabl

Re: [HACKERS] no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

2017-09-13 Thread Amit Langote
On 2017/09/13 16:59, Ashutosh Bapat wrote: > On Wed, Sep 13, 2017 at 1:27 PM, Amit Langote > wrote: >> On 2017/09/13 16:42, Ashutosh Bapat wrote: >>> On Wed, Sep 13, 2017 at 7:49 AM, Amit Langote wrote: In the attached updated patch, I created separate .source files in src/test/regress/i

Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=

2017-09-13 Thread Aleksander Alekseev
Hi Tom, > Thanks for reviewing! I assume this is against the prior version of the > patch, though, not the one I just posted with updates for contrib. > Do you want to look at those? > > regards, tom lane No, I reviewed the latest v4 patch right after you submitted it. --

Re: [HACKERS] generated columns

2017-09-13 Thread Simon Riggs
On 13 September 2017 at 09:09, Andreas Karlsson wrote: > On 09/13/2017 04:04 AM, Simon Riggs wrote: >> >> On 31 August 2017 at 05:16, Peter Eisentraut >> wrote: >>> >>> - index support (and related constraint support) >> >> >> Presumably you can't index a VIRTUAL column. Or at least I don't think

Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=

2017-09-13 Thread Kuntal Ghosh
On Tue, Sep 12, 2017 at 9:47 PM, Tom Lane wrote: > Aleksander Alekseev writes: >> The following review has been posted through the commitfest application: >> make installcheck-world: tested, passed >> Implements feature: tested, passed >> Spec compliant: tested, passed >> Documen

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-13 Thread Kyotaro HORIGUCHI
At Wed, 13 Sep 2017 13:16:52 +0900, Michael Paquier wrote in > On Wed, Sep 13, 2017 at 1:13 PM, Kyotaro HORIGUCHI > wrote: > > This patch creates a new memory context "Vacuum" under > > PortalContext in vacuum.c, but AFAICS the current context there > > is PortalHeapMemory, which has the same e

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

2017-09-13 Thread Fabien COELHO
Hello Tom, I put back SetResultVariables function which is called twice, for SQL queries and the new descriptions. It worked out of the box with DECLARE which is just another SQL statement, so maybe I did not understood the cursor issue you were signaling... No, I was concerned about ExecQuer

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-13 Thread Kyotaro HORIGUCHI
Hello, At Wed, 13 Sep 2017 17:28:20 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170913.172820.141647434.horiguchi.kyot...@lab.ntt.co.jp> > The context exists there before the patch but anyway using the > context as per-portal context that doesn't need freeing seems to > result in

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-09-13 Thread Kyotaro HORIGUCHI
At Wed, 13 Sep 2017 15:05:31 +1200, Thomas Munro wrote in > It doesn't compile for me, because your patch removed the definition > of HEAP_INSERT_SKIP_WAL but hasn't removed that reference to it. > > I'm not sure what happened. Is it possible that your patch was not > created by diffing again

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Dean Rasheed
Robert Haas writes: > On Tue, Sep 12, 2017 at 9:58 AM, Alvaro Herrera > wrote: >> Did anything happen on this, or did we just forget it completely? > > I forgot it. :-( > > I really think we should fix this. Ah, sorry. This was for me to follow up, and I dropped the ball. Here's a patch resto

Re: [HACKERS] new function for tsquery creartion

2017-09-13 Thread Victor Drobny
On 2017-09-09 06:03, Thomas Munro wrote: Please send a rebased version of the patch for people to review and test as that one has bit-rotted. Hello, Thank you for interest. In the attachment you can find rebased version(based on 69835bc8988812c960f4ed5aeee86b62ac73602a commit) -- Victor Drobny P

[HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Ashutosh Sharma
Hi, I am getting the following error message when trying to build latest PG source on Windows, Error 1 error C2065: 'LDAP_NO_ATTRS' : undeclared identifier C:\Users\ashu\pgsql\src\backend\libpq\auth.c 2468 I think, it got introduced in the following git commit, commit 83aaac41c66959a3ebaec7daad

Re: [HACKERS] utility commands benefiting from parallel plan

2017-09-13 Thread Haribabu Kommi
On Wed, Sep 13, 2017 at 4:17 PM, Rafia Sabih wrote: > On Fri, Sep 1, 2017 at 12:31 PM, Haribabu Kommi > wrote: > > > > Hi All, > > > > Attached a rebased patch that supports parallelism for the queries > > that are underneath of some utility commands such as CREATE TABLE AS > > and CREATE MATERI

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Amit Langote
Hi Dean, On 2017/09/13 17:51, Dean Rasheed wrote: > Robert Haas writes: >> On Tue, Sep 12, 2017 at 9:58 AM, Alvaro Herrera >> wrote: >>> Did anything happen on this, or did we just forget it completely? >> >> I forgot it. :-( >> >> I really think we should fix this. > > Ah, sorry. This was fo

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Thomas Munro
On Wed, Sep 13, 2017 at 8:58 PM, Ashutosh Sharma wrote: > I am getting the following error message when trying to build latest > PG source on Windows, > > Error 1 error C2065: 'LDAP_NO_ATTRS' : undeclared identifier > C:\Users\ashu\pgsql\src\backend\libpq\auth.c 2468 > > I think, it got introduced

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Alvaro Herrera
Aleksander Alekseev wrote: > Agree, especially regarding build logs. All of this currently is only an > experiment. For some reason I got a weird feeling that at this time it > will be not quite successful one. If there will be too many false > positives I'll just return the patches back to "Needs

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

2017-09-13 Thread Fabien COELHO
One thing we could think about if this seems too high is to drop ROW_COUNT. I'm unconvinced that it has a real use-case, and it seems to be taking more than its share of the work in non-error cases, because it turns out that PQcmdTuples() is not an amazingly cheap function. I do think that a

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Thomas Munro
On Wed, Sep 13, 2017 at 9:11 PM, Thomas Munro wrote: > On Wed, Sep 13, 2017 at 8:58 PM, Ashutosh Sharma > wrote: >> I am getting the following error message when trying to build latest >> PG source on Windows, >> >> Error 1 error C2065: 'LDAP_NO_ATTRS' : undeclared identifier >> C:\Users\ashu\pg

Re: [HACKERS] increasing the default WAL segment size

2017-09-13 Thread Andres Freund
Hi, On 2017-09-06 20:24:16 +0530, Beena Emerson wrote: > > - pg_standby's RetrieveWALSegSize() does too much for it's name. It > > seems quite weird that a function named that way has the section below > > "/* check if clean up is necessary */" > > we set 2 cleanup related variables once Wal

Re: [HACKERS] pgbench regression test failure

2017-09-13 Thread Fabien COELHO
I have a serious, serious dislike for tests that seem to work until they're run on a heavily loaded machine. I'm not that sure the error message was because of that. No, this particular failure (probably) wasn't. But now that I've realized that this test case is timing-sensitive, I'm worri

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Ashutosh Sharma
Hi Thomas, On Wed, Sep 13, 2017 at 2:57 PM, Thomas Munro wrote: > On Wed, Sep 13, 2017 at 9:11 PM, Thomas Munro > wrote: >> On Wed, Sep 13, 2017 at 8:58 PM, Ashutosh Sharma >> wrote: >>> I am getting the following error message when trying to build latest >>> PG source on Windows, >>> >>> Erro

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Aleksander Alekseev
Hi Tomas, I appreciate your feedback, although it doesn't seem to be completely fair. Particularly: > You gave everyone about 4 hours to object This is not quite accurate since my proposal was sent 2017-09-11 09:41:32 and this thread started - 2017-09-12 14:14:55. > You just changed the status

[HACKERS] Inconsistencies between pg_settings and postgresql.conf

2017-09-13 Thread Adrian Escoms
Hello, We are working with postgresql.conf configuration file and we have found some discrepancies between it and pg_settings in terms of categories and subcategories (we have split the field category in pg_settings by '/', the first part being 'category', the second 'subcategory') We suggest to c

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

2017-09-13 Thread Amit Khandekar
On 13 September 2017 at 13:05, Ashutosh Bapat wrote: > On Wed, Sep 13, 2017 at 12:32 PM, Amit Khandekar > wrote: >> Hi, >> >> Rafia had done some testing on TPCH queries using Partition-wise join >> patch along with Parallel Append patch. >> >> There, we had observed that for query 4, even thoug

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Langote
On 2017/09/11 18:56, Amit Langote wrote: > Attached updated patch does it that way for both partitioned table indexes > and leaf partition indexes. Thanks for pointing it out. It seems to me we don't really need the first patch all that much. That is, let's keep PartitionDispatchData the way it

Re: [HACKERS] Supporting huge pages on Windows

2017-09-13 Thread Ashutosh Sharma
On Wed, Sep 13, 2017 at 7:11 AM, Tsunakawa, Takayuki wrote: > Hi Thomas, Magnus > > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Thomas Munro >> Since it only conflicts with c7b8998e because of pgindent whitespace >> movement, I applied it wi

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Konstantin Knizhnik
On 13.09.2017 10:51, Christoph Berg wrote: Re: Konstantin Knizhnik 2017-09-01 + Functional index is based on on projection function: function which extract subset of its argument. + In mathematic such functions are called non-injective. For injective function if any attribute u

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Christoph Berg
Re: Konstantin Knizhnik 2017-09-13 <2393c4b3-2ec4-dc68-4ea9-670597b56...@postgrespro.ru> > > > On 13.09.2017 10:51, Christoph Berg wrote: > > Re: Konstantin Knizhnik 2017-09-01 > > > > > + Functional index is based on on projection function: function > > > which extract subset of its ar

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Amit Khandekar
On 13 September 2017 at 15:32, Amit Langote wrote: > On 2017/09/11 18:56, Amit Langote wrote: >> Attached updated patch does it that way for both partitioned table indexes >> and leaf partition indexes. Thanks for pointing it out. > > It seems to me we don't really need the first patch all that m

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Konstantin Knizhnik
On 13.09.2017 13:14, Christoph Berg wrote: Re: Konstantin Knizhnik 2017-09-13 <2393c4b3-2ec4-dc68-4ea9-670597b56...@postgrespro.ru> On 13.09.2017 10:51, Christoph Berg wrote: Re: Konstantin Knizhnik 2017-09-01 + Functional index is based on on projection function: function which e

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Ashutosh Sharma
Hi, On Wed, Sep 13, 2017 at 3:15 PM, Ashutosh Sharma wrote: > Hi Thomas, > > On Wed, Sep 13, 2017 at 2:57 PM, Thomas Munro > wrote: >> On Wed, Sep 13, 2017 at 9:11 PM, Thomas Munro >> wrote: >>> On Wed, Sep 13, 2017 at 8:58 PM, Ashutosh Sharma >>> wrote: I am getting the following error

Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-13 Thread Ants Aasma
On Thu, Aug 31, 2017 at 9:02 AM, Andrey Borodin wrote: > When we have accumulated diff blocknumbers for most of segments we can > significantly speed up method of WAL scanning. If we have blocknumbers for > all segments we can skip WAL scanning at all. Have you measured that the WAL scanning is

Re: [HACKERS] UPDATE of partition key

2017-09-13 Thread amul sul
On Sun, Sep 10, 2017 at 8:47 AM, Amit Kapila wrote: > On Fri, Sep 8, 2017 at 4:51 PM, amul sul wrote: > > On Thu, May 18, 2017 at 9:13 AM, Amit Kapila > > wrote: > >> > >> On Wed, May 17, 2017 at 5:17 PM, Robert Haas > >> wrote: > >> > On Wed, May 17, 2017 at 6:29 AM, Amit Kapila > > >> > wr

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Simon Riggs
On 13 September 2017 at 11:30, Konstantin Knizhnik wrote: > The only reason of all this discussion about terms is that I need to choose > name for correspondent index option. > Simon think that we do not need this option at all. In this case we should > not worry about right term. > From my point

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Arseny Sher
Peter Eisentraut writes: > We can break this in any number of ways: > > - (your patch) Kill workers right away after ALTER SUBSCRIPTION DISABLE, > thus breaking the appearance of transactional DDL somewhat. > ... > - Have DROP SUBSCRIPTION attempt to kill workers if the subscription is > disabled

Re: [HACKERS] GatherMerge misses to push target list

2017-09-13 Thread Rushabh Lathia
On Wed, Sep 6, 2017 at 10:04 AM, Amit Kapila wrote: > During my recent work on costing of parallel paths [1], I noticed that > we are missing to push target list below GatherMerge in some simple > cases like below. > > Test prepration > - > create or replace function simple_fu

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Daniel Gustafsson
> On 13 Sep 2017, at 11:49, Aleksander Alekseev > wrote: > > Hi Tomas, > > I appreciate your feedback, although it doesn't seem to be completely > fair. I would like to stress one thing (and I am speaking only for myself here), this has been feedback and not criticism. Your (and everyone invo

Re: [HACKERS] Getting error message with latest PG source on Windows.

2017-09-13 Thread Peter Eisentraut
On 9/13/17 06:39, Ashutosh Sharma wrote: > Error 1 error C2065: 'LDAP_NO_ATTRS' : undeclared identifier > C:\Users\ashu\pgsql\src\backend\libpq\auth.c 2468 Googling around I see some indications that the macro may not be defined in all implementations and that some other proj

Re: [HACKERS] Supporting huge pages on Windows

2017-09-13 Thread Magnus Hagander
On Wed, Sep 13, 2017 at 3:41 AM, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > Hi Thomas, Magnus > > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Thomas Munro > > Since it only conflicts with c7b8998e because of pgindent whi

[HACKERS] Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-09-13 Thread Peter Eisentraut
On 3/30/17 14:04, Fujii Masao wrote: > On Thu, Mar 23, 2017 at 9:59 PM, Peter Eisentraut wrote: >> Logical replication support for initial data copy > > + case T_SQLCmd: > + if (MyDatabaseId == InvalidOid) > + ereport(ERROR, > + (errmsg("not connected to database"))); > > This error message does

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Tomas Vondra
Hi Aleksander, On 09/13/2017 11:49 AM, Aleksander Alekseev wrote: > Hi Tomas, > > I appreciate your feedback, although it doesn't seem to be completely > fair. Particularly: > >> You gave everyone about 4 hours to object > > This is not quite accurate since my proposal was sent 2017-09-11 > 09:

Re: [HACKERS] Parallel Hash take II

2017-09-13 Thread Prabhat Sahu
Hi Thomas, Setting with lower "shared_buffers" and "work_mem" as below, query getting crash but able to see explain plan. shared_buffers = 1MB work_mem = 1MB max_parallel_workers_per_gather = 4 max_parallel_workers = 8 enable_mergejoin = off enable_nestloop = off enable_hashjoin = on force_paral

Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-13 Thread Andrey Borodin
Hi! Thank you for your interest and experiment results. > 13 сент. 2017 г., в 15:43, Ants Aasma написал(а): > > On Thu, Aug 31, 2017 at 9:02 AM, Andrey Borodin wrote: >> When we have accumulated diff blocknumbers for most of segments we can >> significantly speed up method of WAL scanning. If w

Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-13 Thread Tomas Vondra
On 09/13/2017 07:53 AM, Andrey Borodin wrote: >> * I see there are conditions like this: >> >>    if(xlogreader->blocks[nblock].forknum == MAIN_FORKNUM) >> >> Why is it enough to restrict the block-tracking code to main fork? >> Aren't we interested in all relation forks? > fsm, vm and others are

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Bruce Momjian
On Wed, Sep 13, 2017 at 01:35:17AM +0200, Andreas Joseph Krogh wrote: > På onsdag 13. september 2017 kl. 01:00:20, skrev Bruce Momjian < > br...@momjian.us>: > (I know this isn't exactly -hackers food, but it seems natural to end this > thread here) >   > Ok, thanks. > It is clearer what happens no

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 4:51 AM, Dean Rasheed wrote: > A drawback to doing this is that we lose compatibility with syntaxes > supported by other databases, which was part of the reason for > choosing the terms MINVALUE and MAXVALUE in the first place. > > So thinking about this afresh, my preferen

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2017-09-13 Thread Jesper Pedersen
Hi, On 08/29/2017 05:04 AM, Mithun Cy wrote: Test Setting: = Server configuration: ./postgres -c shared_buffers=8GB -N 300 -c min_wal_size=15GB -c max_wal_size=20GB -c checkpoint_timeout=900 -c maintenance_work_mem=1GB -c checkpoint_completion_target=0.9 -c wal_buffers=256MB & pgbench c

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 5:05 AM, Amit Langote wrote: >> So thinking about this afresh, my preference would actually be to just >> canonicalise the values stored rather than erroring out. > > Coincidentally, I just wrote the patch for canonicalizing stored values, > instead of erroring out. Please

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Alvaro Herrera
Tom Lane wrote: > Peter Eisentraut writes: > > - Disallow DROP SUBSCRIPTION in a transaction under certain > > circumstances, for example if a transaction has previously manipulated > > the same subscription. > ISTM the second of those (refuse to drop an in-use subscription) is > by far the leas

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Tom Lane
Fabien COELHO writes: >> I'll assign this patch to next commitfest > Probably it needs some rebase after Tom committed result status variables. > As it is a style thing, ISTM that the patch is ready if most people agree > that it is better this way and there is no strong veto against. FWIW, I t

Re: [HACKERS] [POC] hash partitioning

2017-09-13 Thread Jesper Pedersen
Hi Amul, On 09/08/2017 08:40 AM, amul sul wrote: Rebased 0002 against this commit & renamed to 0001, PFA. This patch needs a rebase. Best regards, Jesper -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/

Re: [HACKERS] SCRAM protocol documentation

2017-09-13 Thread Peter Eisentraut
On 8/11/17 09:27, Peter Eisentraut wrote: > On 8/11/17 09:06, Álvaro Hernández Tortosa wrote: >> Strictly speaking the RFC assumes that the username is at least 1 >> character. I understand this was precisely Peter's original comment. > > Well, my main point was that the documentation, the c

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Pavel Stehule
2017-09-13 16:11 GMT+02:00 Tom Lane : > Fabien COELHO writes: > >> I'll assign this patch to next commitfest > > > Probably it needs some rebase after Tom committed result status > variables. > > > As it is a style thing, ISTM that the patch is ready if most people agree > > that it is better thi

Re: [HACKERS] OpenFile() Permissions Refactor

2017-09-13 Thread David Steele
Hi Peter, Here's a new patch based on your review. Where I had a question I made a choice as described below: On 9/1/17 1:58 PM, David Steele wrote: > On 9/1/17 1:15 PM, Peter Eisentraut wrote: >> On 8/29/17 12:15, David Steele wrote: >> >> I wonder whether we even need that much flexibility. W

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Andreas Joseph Krogh
På onsdag 13. september 2017 kl. 15:26:27, skrev Bruce Momjian mailto:br...@momjian.us>>: On Wed, Sep 13, 2017 at 01:35:17AM +0200, Andreas Joseph Krogh wrote: [snip] > I know I'm being a little nitty-gritty here, but if it helps me understand it > might help others. I have applied the attach

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Alvaro Herrera
Most of the time I suppose you'd search (using the pager's search function) whatever you're looking for, rather than read the whole page from top to bottom. Why is it that we're not opening the pager automatically when this help is invoked via psql --help=variables? "\? variables" already does th

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Dean Rasheed
On 13 September 2017 at 14:53, Robert Haas wrote: > On Wed, Sep 13, 2017 at 4:51 AM, Dean Rasheed > wrote: >> A drawback to doing this is that we lose compatibility with syntaxes >> supported by other databases, which was part of the reason for >> choosing the terms MINVALUE and MAXVALUE in the

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Masahiko Sawada
On Wed, Sep 13, 2017 at 8:00 PM, Arseny Sher wrote: > Peter Eisentraut writes: >> We can break this in any number of ways: >> >> - (your patch) Kill workers right away after ALTER SUBSCRIPTION DISABLE, >> thus breaking the appearance of transactional DDL somewhat. >> ... >> - Have DROP SUBSCRIPTI

Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=

2017-09-13 Thread Tom Lane
Kuntal Ghosh writes: > On Tue, Sep 12, 2017 at 9:47 PM, Tom Lane wrote: >> Aleksander Alekseev writes: >>> The following review has been posted through the commitfest application: >>> make installcheck-world: tested, passed >>> Implements feature: tested, passed >>> Spec compliant:

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Tom Lane
Alvaro Herrera writes: > Why is it that we're not opening the pager automatically when this help > is invoked via psql --help=variables? "\? variables" already does that. Hm, given that output from a -c option does get paginated (I just checked), maybe that should happen.

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-13 Thread Masahiko Sawada
On Thu, Sep 14, 2017 at 12:04 AM, Masahiko Sawada wrote: > On Wed, Sep 13, 2017 at 8:00 PM, Arseny Sher wrote: >> Peter Eisentraut writes: >>> We can break this in any number of ways: >>> >>> - (your patch) Kill workers right away after ALTER SUBSCRIPTION DISABLE, >>> thus breaking the appearanc

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-09-13 Thread Stephen Frost
Tom, all, * Stephen Frost (sfr...@snowman.net) wrote: > Alright, here's an updated patch which cleans things up a bit and adds > comments to explain what's going on. I also updated the comments in > acl.h to explain that ordering actually does matter. Getting back to this, here's rebased patches

Re: [HACKERS] Inconsistencies between pg_settings and postgresql.conf

2017-09-13 Thread Adrian Escoms
Hi, I realized that the parameter 'shared_preload_libraries' used to belong to category 'Resource Usage / Kernel Resources' but since postgresql version 9.4 it was changed in pg_settings to 'Client Connection Defaults / Shared Library Preloading' but in postgresql.conf it remains unchanged. I atta

Re: [HACKERS] Surjective functional indexes

2017-09-13 Thread Konstantin Knizhnik
On 13.09.2017 14:00, Simon Riggs wrote: On 13 September 2017 at 11:30, Konstantin Knizhnik wrote: The only reason of all this discussion about terms is that I need to choose name for correspondent index option. Simon think that we do not need this option at all. In this case we should not wo

Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-09-13 Thread Daniel Gustafsson
> On 15 May 2017, at 07:26, Michael Paquier wrote: > > On Tue, May 2, 2017 at 2:28 AM, Pierre Ducroquet wrote: > >> I will submit this patch in the current commit fest. > > I have not spotted any flaws in the refactored logic. This patch no longer applies, could you take a look at it and subm

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 10:54 AM, Dean Rasheed wrote: > Oracle, MySQL and DB2 all use MINVALUE/MAXVALUE. Actually, Oracle and > MySQL only use MAXVALUE, not MINVALUE, because they don't allow gaps > between partitions and the first partition implicitly starts at > MINVALUE, so the bounds that we c

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > I have applied the attached patch to show examples of using rsync on > PGDATA and tablespaces, documented that rsync is only useful when in > link mode, and explained more clearly how rsync handles links. You can > see the results here: > >

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 6:02 AM, Amit Langote wrote: > It seems to me we don't really need the first patch all that much. That > is, let's keep PartitionDispatchData the way it is for now, since we don't > really have any need for it beside tuple-routing (EIBO as committed didn't > need it for on

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

2017-09-13 Thread Ashutosh Bapat
On Wed, Sep 13, 2017 at 12:51 PM, Ashutosh Bapat wrote: > On Wed, Sep 13, 2017 at 12:39 AM, Robert Haas wrote: >> On Tue, Sep 12, 2017 at 3:46 AM, Amit Langote >> wrote: >>> In this case, AcquireExecutorLocks will lock all the relations in >>> PlannedStmt.rtable, which must include all partition

Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-09-13 Thread Pierre Ducroquet
On Wednesday, September 13, 2017 6:01:43 PM CEST you wrote: > > On 15 May 2017, at 07:26, Michael Paquier > > wrote:> > > On Tue, May 2, 2017 at 2:28 AM, Pierre Ducroquet wrote: > >> I will submit this patch in the current commit fest. > > > > I have not spotted any flaws in the refactored log

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-13 Thread Michael Banck
On Tue, Sep 12, 2017 at 07:38:40PM -0400, Stephen Frost wrote: > Further, really, I think we should provide a utility to do all of the > above instead of using rsync- and that utility should do some additional > things, such as: > > - Check that the control file on the primary and replica show tha

Re: [HACKERS] Small patch for pg_basebackup argument parsing

2017-09-13 Thread Pierre Ducroquet
On Wednesday, September 13, 2017 2:06:50 AM CEST Daniel Gustafsson wrote: > > On 05 Jul 2017, at 08:32, Michael Paquier > > wrote:> > > On Wed, Jul 5, 2017 at 2:57 PM, Ryan Murphy wrote: > >> I tried to apply your patch to test it (though reading Robert's last > >> comment it seems we wish to ha

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread Fabien COELHO
Hello Tom, Probably it needs some rebase after Tom committed result status variables. As it is a style thing, ISTM that the patch is ready if most people agree that it is better this way and there is no strong veto against. FWIW, I think it's a bad idea. We already nearly-doubled the vert

[HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Jeff Janes
In 10beta4 and 11dev, If I run the below it enters an uninterruptible state. After the insert starts, I give 15 or seconds or so until the memory usage starts to grow due to enqueued triggers checks. Then I can't interrupt it with either ctrl-C in psql or kill -15 from another terminal. I have t

Re: [HACKERS] proposal: psql: check env variable PSQL_PAGER

2017-09-13 Thread Thomas Munro
On Wed, Sep 6, 2017 at 4:12 AM, Pavel Stehule wrote: > 2017-09-05 18:06 GMT+02:00 Tom Lane : >> Pushed, with some fooling with the documentation (notably, >> re-alphabetizing relevant lists). >> > Thank you very much I've started setting PSQL_PAGER="~/bin/pspg -s0" to try your new column-aware pa

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Andres Freund
Hi, On 2017-09-13 14:28:34 -0700, Jeff Janes wrote: > In 10beta4 and 11dev, If I run the below it enters an uninterruptible > state. After the insert starts, I give 15 or seconds or so until the > memory usage starts to grow due to enqueued triggers checks. Then I can't > interrupt it with either

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Jeff Janes
On Wed, Sep 13, 2017 at 2:41 PM, Andres Freund wrote: > Hi, > > On 2017-09-13 14:28:34 -0700, Jeff Janes wrote: > > In 10beta4 and 11dev, If I run the below it enters an uninterruptible > > state. After the insert starts, I give 15 or seconds or so until the > > memory usage starts to grow due t

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Tom Lane
Jeff Janes writes: > In 10beta4 and 11dev, If I run the below it enters an uninterruptible > state. After the insert starts, I give 15 or seconds or so until the > memory usage starts to grow due to enqueued triggers checks. Then I can't > interrupt it with either ctrl-C in psql or kill -15 from

Re: [HACKERS] uninterruptible state in 10beta4

2017-09-13 Thread Tom Lane
Andres Freund writes: > Indeed that seems plausible. I guess something like the attached should > fix the issue? Ah, I see you came to the same conclusion I did. But see comment about adding a comment. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-ha

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

2017-09-13 Thread Robert Haas
On Wed, Sep 13, 2017 at 12:56 PM, Ashutosh Bapat wrote: > I debugged what happens in case of query "select 1 from t1 union all > select 2 from t1;" with the current HEAD (without multi-level > expansion patch attached). It doesn't set partitioned_rels in Append > path that gets converted into Appe

Re: [HACKERS] [RFC] What would be difficult to make data models pluggable for making PostgreSQL a multi-model database?

2017-09-13 Thread Henry
I was just reading the Postgresql 11 roadmap and it mentions native graph support. I would be interested in following the design work for this. Would this require a the new pluggable storage which is currently in development or would the existing storage engine be sufficient? I am just wondering i

  1   2   >