Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-16 Thread Ashutosh Bapat
On Wed, May 17, 2017 at 7:24 AM, Kyotaro HORIGUCHI wrote: > Hello, > > At Tue, 16 May 2017 12:45:39 -0400, Tom Lane wrote in > <22556.1494953...@sss.pgh.pa.us> >> Robert Haas writes: >> > Concretely, I think we should

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Ashutosh Bapat
On Wed, May 17, 2017 at 12:04 AM, amul sul wrote: > On Tue, May 16, 2017 at 10:00 PM, Dilip Kumar wrote: >> On Tue, May 16, 2017 at 4:22 PM, amul sul wrote: >>> v6 patch has bug in partition oid mapping and indexing, fixed in the >>>

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Thomas Munro
On Wed, May 17, 2017 at 2:39 PM, Tom Lane wrote: > Vaishnavi Prabakaran writes: >>> Tom Lane wrote: BTW, it would be a good idea for somebody to check this out on Windows, assuming there's a way to generate a keyboard EOF signal there.

[HACKERS] Fix refresh_option syntax of ALTER SUBSCRIPTION in document

2017-05-16 Thread Masahiko Sawada
Hi, While reading documentation I found refresh_option syntax of ALTER SUBSCRIPTION in documentation is not correct. ALTER SUBSCRIPTION ... REFRESH PUBLICATION WITH (refresh_option value [, ...] ) should be changed to ALTER SUBSCRIPTION ... REFRESH PUBLICATION WITH (refresh_option [= value] [,

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Ashutosh Bapat
On Wed, May 17, 2017 at 9:38 AM, Tom Lane wrote: > Ashutosh Bapat writes: >> On Tue, May 16, 2017 at 6:50 PM, Peter Eisentraut >> wrote: >>> On 5/15/17 23:45, Ashutosh Bapat wrote: +1. We should throw an

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Tom Lane
Ashutosh Bapat writes: > On Tue, May 16, 2017 at 6:50 PM, Peter Eisentraut > wrote: >> On 5/15/17 23:45, Ashutosh Bapat wrote: >>> +1. We should throw an error and add a line in documentation that >>> collation should not be

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-16 Thread Michael Paquier
On Wed, May 17, 2017 at 11:49 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier >> pqWait is internal to libpq, so we are free to set up what we want here. >> Still

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Ashutosh Bapat
On Tue, May 16, 2017 at 6:50 PM, Peter Eisentraut wrote: > On 5/15/17 23:45, Ashutosh Bapat wrote: >> +1. We should throw an error and add a line in documentation that >> collation should not be specified for hash partitioned table. > > Why is it even allowed in

Re: [HACKERS] If subscription to foreign table valid ?

2017-05-16 Thread Peter Eisentraut
On 5/14/17 23:55, Neha Khatri wrote: > With this patch the error will be like this: > > logical replication target relation public.t is not a table > > But it is possible that the referred table is Foreign Table of > Partitioned table (so actually the referred object is indeed a table). >

Re: [HACKERS] If subscription to foreign table valid ?

2017-05-16 Thread Peter Eisentraut
On 5/12/17 09:58, Petr Jelinek wrote: > So I moved the relkind check to single function and call it from all the > necessary places. See the attached committed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-16 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier > pqWait is internal to libpq, so we are free to set up what we want here. > Still I think that we should be consistent with what pqSocketCheck returns: Please let this what it is

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
Vaishnavi Prabakaran writes: >> Tom Lane wrote: >>> BTW, it would be a good idea for somebody to check this out on Windows, >>> assuming there's a way to generate a keyboard EOF signal there. > Ctrl-Z + Enter in windows generates EOF signal. I verified this issue

Re: [HACKERS] [COMMITTERS] pgsql: Tag refs/tags/REL_10_BETA1 was created

2017-05-16 Thread Tom Lane
Peter Eisentraut writes: > On 5/16/17 18:14, pg...@postgresql.org wrote: >> Tag refs/tags/REL_10_BETA1 was created. > Was this change in naming pattern intentional? Yes, it was. Andrew Dunstan suggested[1] during the two-part-version-number discussion that we

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-16 Thread Masahiko Sawada
On Wed, May 17, 2017 at 4:08 AM, Robert Haas wrote: > On Fri, May 12, 2017 at 12:30 AM, Masahiko Sawada > wrote: >> Attached small patch adds relid to these log messages if it's valid. >> I'd like to propose it for PG10 if possible, but since It's

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-16 Thread Thomas Munro
On Wed, May 17, 2017 at 10:13 AM, Kevin Grittner wrote: > On Tue, May 16, 2017 at 4:50 PM, Thomas Munro > wrote: >> >> I'm about to post a much simpler patch that collects uniform tuples >> from children, addressing the reported bug, and simply

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-16 Thread Masahiko Sawada
On Tue, May 16, 2017 at 10:06 PM, tushar wrote: > On 05/16/2017 06:35 AM, Masahiko Sawada wrote: >> >> I've updated Kuntal's patch, added regression test for option >> combination and updated documentation. > > While testing the patch - I found that after

Re: [HACKERS] synchronous_commit option is not visible after pressing TAB

2017-05-16 Thread Peter Eisentraut
On 5/16/17 19:45, Michael Paquier wrote: > On Tue, May 16, 2017 at 8:18 PM, tushar wrote: >> While creating subscription - if we press TAB button to see the available >> parameters , synchronous_commit parameter is not visible. >> >> postgres=# CREATE SUBSCRIPTION

Re: [HACKERS] Hash Functions

2017-05-16 Thread Amit Langote
On 2017/05/17 5:25, Jeff Davis wrote: > On Tuesday, May 16, 2017, Robert Haas wrote: >> I don't really find this a very practical design. If the table >> partitions are spread across different relfilenodes, then those >> relfilenodes have to have separate pg_class entries

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-16 Thread Kyotaro HORIGUCHI
Hello, At Tue, 16 May 2017 12:45:39 -0400, Tom Lane wrote in <22556.1494953...@sss.pgh.pa.us> > Robert Haas writes: > > Concretely, I think we should replace the abort_cleanup_incomplete > > flag from my previous patch with a changing_xact_state flag

Re: [HACKERS] PROVE_FLAGS

2017-05-16 Thread Andrew Dunstan
On 05/16/2017 07:44 PM, Peter Eisentraut wrote: > On 5/3/17 15:14, Andrew Dunstan wrote: >> Can someone please explain to me why we have this in Makefile.global.in? >> (from commit e9c81b60 ) >> >> PROVE_FLAGS = >> >> ISTM it's unnecessary, and prevents us from using the same named value >>

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Bruce Momjian
On Tue, May 16, 2017 at 06:06:35PM -0700, Andres Freund wrote: > On 2017-05-16 21:02:19 -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > OK, I assume we are good to go for Wednesday afternoon, UTC. Thanks for > > > the research. > > > > Yeah, I think we're ready, unless

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Andres Freund
On 2017-05-16 21:02:19 -0400, Tom Lane wrote: > Bruce Momjian writes: > > OK, I assume we are good to go for Wednesday afternoon, UTC. Thanks for > > the research. > > Yeah, I think we're ready, unless anyone has a large patch they want > to stick in first ... I've this

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Vaishnavi Prabakaran
On Wed, May 17, 2017 at 3:52 AM, Alvaro Herrera wrote: > Tom Lane wrote: > > > BTW, it would be a good idea for somebody to check this out on Windows, > > assuming there's a way to generate a keyboard EOF signal there. > > I last used a Windows command line almost two

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Tom Lane
Bruce Momjian writes: > OK, I assume we are good to go for Wednesday afternoon, UTC. Thanks for > the research. Yeah, I think we're ready, unless anyone has a large patch they want to stick in first ... regards, tom lane -- Sent via pgsql-hackers

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Bruce Momjian
On Tue, May 16, 2017 at 08:39:36PM -0400, Tom Lane wrote: > Andres Freund writes: > > There we go: > > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=calliphoridae=2017-05-16%2023:16:53=typedefs > > Yup, looks good now. Thanks! > > BTW, comparing the typedef

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Andrew Dunstan
On 05/16/2017 08:39 PM, Tom Lane wrote: > Andres Freund writes: >> There we go: >> https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=calliphoridae=2017-05-16%2023:16:53=typedefs > Yup, looks good now. Thanks! > > BTW, comparing the typedef list to what I got a

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-16 Thread Michael Paquier
On Wed, May 17, 2017 at 12:47 AM, Robert Haas wrote: > On Mon, May 15, 2017 at 9:59 PM, Michael Paquier > wrote: >> + * >> + * Returns -1 on failure, 0 if the socket is readable/writable, 1 if >> it timed out. >> */ >> pqWait is internal to

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Tom Lane
Andres Freund writes: > There we go: > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=calliphoridae=2017-05-16%2023:16:53=typedefs Yup, looks good now. Thanks! BTW, comparing the typedef list to what I got a few hours ago, I see that "Function" is now a known

Re: [HACKERS] NOT NULL constraints on range partition key columns

2017-05-16 Thread Amit Langote
On 2017/05/16 21:16, Amit Kapila wrote: > On Tue, May 16, 2017 at 3:26 PM, Amit Langote > wrote: >> On 2017/05/16 4:29, Robert Haas wrote: >>> Yeah, that's exactly why I think we should make the change Amit is >>> proposing here. If we don't, then we won't be able

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-16 Thread Haribabu Kommi
On Wed, May 17, 2017 at 2:35 AM, Robert Haas wrote: > On Tue, May 16, 2017 at 8:18 AM, Haribabu Kommi > wrote: > > In the current state of the patch, the main backend tries to start the > > extra workers only when there is no tuples that are

Re: [HACKERS] synchronous_commit option is not visible after pressing TAB

2017-05-16 Thread Michael Paquier
On Tue, May 16, 2017 at 8:18 PM, tushar wrote: > While creating subscription - if we press TAB button to see the available > parameters , synchronous_commit parameter is not visible. > > postgres=# CREATE SUBSCRIPTION sub123 CONNECTION 'dbname=postgres port=5000' >

Re: [HACKERS] PROVE_FLAGS

2017-05-16 Thread Peter Eisentraut
On 5/3/17 15:14, Andrew Dunstan wrote: > Can someone please explain to me why we have this in Makefile.global.in? > (from commit e9c81b60 ) > > PROVE_FLAGS = > > ISTM it's unnecessary, and prevents us from using the same named value > in the environment. I want to be able to use the

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Andrew Dunstan
On 05/16/2017 06:54 PM, Andres Freund wrote: > On 2017-05-16 18:43:22 -0400, Tom Lane wrote: >> Specifically, we don't seem to have entries for any of the typedefs >> associated with the ICU code, eg UChar. This is not terribly >> surprising since none of the buildfarm critters contributing

Re: [HACKERS] Hash Functions

2017-05-16 Thread Peter Eisentraut
On 5/16/17 11:10, Jeff Davis wrote: > I concur at this point. I originally thought hash functions might be > made portable, but I think Tom and Andres showed that to be too > problematic -- the issue with different encodings is the real killer. I think it would be OK that if you want to move a

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Andres Freund
On 2017-05-16 18:56:57 -0400, Tom Lane wrote: > Andres Freund writes: > > No clue if there's some switch that needs to be toggled on the buildfarm > > side to accept the typedefs, I've never looked at that side of things. > > AFAIK, not; I think it just takes any typedef

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Tom Lane
Andres Freund writes: > No clue if there's some switch that needs to be toggled on the buildfarm > side to accept the typedefs, I've never looked at that side of things. AFAIK, not; I think it just takes any typedef reports that aren't too stale.

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Andres Freund
On 2017-05-16 18:43:22 -0400, Tom Lane wrote: > Specifically, we don't seem to have entries for any of the typedefs > associated with the ICU code, eg UChar. This is not terribly > surprising since none of the buildfarm critters contributing typedef > lists are building with --with-icu. It looks

Re: [HACKERS] PG10 pgindent run

2017-05-16 Thread Tom Lane
Bruce Momjian writes: > I would like to run pgindent on the head source tree this Wednesday > afternoon, UTC. Is that OK for everyone? I've been doing some preliminary checking on what pgindent will do, and I notice that some typedef names are getting misindented because they

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-16 Thread Kevin Grittner
On Tue, May 16, 2017 at 4:50 PM, Thomas Munro wrote: > On Wed, May 17, 2017 at 9:20 AM, Kevin Grittner wrote: >> On Wed, May 10, 2017 at 7:02 AM, Thomas Munro >> wrote: >>> On Wed, May 10, 2017 at 11:10 PM, Thomas

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-16 Thread Thomas Munro
On Wed, May 17, 2017 at 9:20 AM, Kevin Grittner wrote: > On Wed, May 10, 2017 at 7:02 AM, Thomas Munro > wrote: >> On Wed, May 10, 2017 at 11:10 PM, Thomas Munro >> wrote: >>> 2. If you attach a row-level trigger

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-16 Thread Kevin Grittner
On Wed, May 10, 2017 at 7:02 AM, Thomas Munro wrote: > On Wed, May 10, 2017 at 11:10 PM, Thomas Munro > wrote: >> 2. If you attach a row-level trigger with transition tables to any >> inheritance child, it will see transition tuples

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread amul sul
On Tue, May 16, 2017 at 10:00 PM, Dilip Kumar wrote: > On Tue, May 16, 2017 at 4:22 PM, amul sul wrote: >> v6 patch has bug in partition oid mapping and indexing, fixed in the >> attached version. >> >> Now partition oids will be arranged in the

Re: [HACKERS] Hash Functions

2017-05-16 Thread Jeff Davis
On Tuesday, May 16, 2017, Robert Haas wrote: > I don't really find this a very practical design. If the table > partitions are spread across different relfilenodes, then those > relfilenodes have to have separate pg_class entries and separate > indexes, and those indexes

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-16 Thread Robert Haas
On Fri, May 12, 2017 at 12:30 AM, Masahiko Sawada wrote: > Attached small patch adds relid to these log messages if it's valid. > I'd like to propose it for PG10 if possible, but since It's not a bug > and not an open item we can add it to next CF. To me, it seems

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-16 Thread Magnus Hagander
On Tue, May 16, 2017 at 7:26 PM, Robert Haas wrote: > On Tue, May 16, 2017 at 2:17 AM, Michael Paquier > wrote: > > Perhaps DSM? It is not user-friendly to fail sporadically... > > Yeah. I've been thinking we might want to give each backend a >

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Alvaro Herrera
Tom Lane wrote: > BTW, it would be a good idea for somebody to check this out on Windows, > assuming there's a way to generate a keyboard EOF signal there. I last used a Windows command line almost two decades ago now, but Ctrl-Z used to do it. -- Álvaro Herrera

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
Robert Haas writes: > On Tue, May 16, 2017 at 1:29 PM, Tom Lane wrote: >>> I had been supposing that this was a feature addition and should be left >>> for the next commitfest. But given that it already works as-expected on >>> popular platform(s), the

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 1:29 PM, Tom Lane wrote: > I wrote: >> I had been supposing that this was a feature addition and should be left >> for the next commitfest. But given that it already works as-expected on >> popular platform(s), the fact that it doesn't work the same on

Re: [HACKERS] Relcache leak when row triggers on partitions are fired by COPY

2017-05-16 Thread Robert Haas
On Mon, May 15, 2017 at 9:17 PM, Amit Langote wrote: >> Ok, here's a patch like that. > > Thanks, looks good to me. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
I wrote: > I had been supposing that this was a feature addition and should be left > for the next commitfest. But given that it already works as-expected on > popular platform(s), the fact that it doesn't work the same on some other > platforms seems like a portability bug rather than a missing

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 2:17 AM, Michael Paquier wrote: > Perhaps DSM? It is not user-friendly to fail sporadically... Yeah. I've been thinking we might want to give each backend a backend-lifetime DSA that is created on first use. That could be useful for some

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 3:19 AM, Ashutosh Bapat wrote: > While earlier, I thought the same, I am wondering whether this is > true. Don't different collations deem different strings equal e.g one > collation may deem 'aa' and 'AA' as same but other may not. No,

Re: [HACKERS] Hash Functions

2017-05-16 Thread David Fetter
On Tue, May 16, 2017 at 08:10:39AM -0700, Jeff Davis wrote: > On Mon, May 15, 2017 at 1:04 PM, David Fetter wrote: > > As the discussion has devolved here, it appears that there are, at > > least conceptually, two fundamentally different classes of partition: > > public, which

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-16 Thread Tom Lane
Robert Haas writes: > Concretely, I think we should replace the abort_cleanup_incomplete > flag from my previous patch with a changing_xact_state flag and set > that flag around all transaction state changes, clearing it when such > changes have succeeded. On error, the

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 8:18 AM, Haribabu Kommi wrote: > In the current state of the patch, the main backend tries to start the > extra workers only when there is no tuples that are available from the > available workers. I feel that the invocation for more workers

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Dilip Kumar
On Tue, May 16, 2017 at 4:22 PM, amul sul wrote: > v6 patch has bug in partition oid mapping and indexing, fixed in the > attached version. > > Now partition oids will be arranged in the ascending order of hash > partition bound (i.e. modulus and remainder sorting order)

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
Thomas Munro writes: > On Tue, May 16, 2017 at 6:29 PM, Vaishnavi Prabakaran > wrote: >> Hi, I could not reproduce this issue. Even after Ctrl+d , subsequent COPY >> from commands reads the input properly. Is there any specific step

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-05-16 Thread Robert Haas
On Sat, May 13, 2017 at 7:27 AM, Amit Kapila wrote: > On Fri, May 12, 2017 at 9:14 AM, Tom Lane wrote: >> Robert Haas writes: >>> On Wed, May 10, 2017 at 8:39 PM, Masahiko Sawada >>> wrote: ... I'd

Re: [HACKERS] PoC: full merge join on comparison clause

2017-05-16 Thread Alexander Kuzmenkov
On 16.05.2017 18:57, Robert Haas wrote: Interesting. I suggest adding this to the next CommitFest. Thank you, added: https://commitfest.postgresql.org/14/1141/ -- Alexander Kuzmenkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-16 Thread Robert Haas
On Sun, May 7, 2017 at 11:54 AM, Robert Haas wrote: > I'm having second thoughts based on some more experimentation I did > this morning. I'll update again once I've had a bit more time to poke > at it. So the issue that I noticed here is that this problem really isn't

Re: [HACKERS] PoC: full merge join on comparison clause

2017-05-16 Thread Robert Haas
On Fri, May 12, 2017 at 7:09 AM, Alexander Kuzmenkov wrote: > As you know, at this time Postgres cannot perform a full join on a > comparison clause. For example, if we have two tables with numeric columns > and run a query like 'select * from t1 full join t2 on t1.a >

Re: [HACKERS] Patch to fix documentation about AFTER triggers

2017-05-16 Thread Robert Haas
On Mon, May 15, 2017 at 7:00 AM, Ashutosh Bapat wrote: > On Sat, May 13, 2017 at 2:45 AM, Paul Jungwirth > wrote: >> Here is a patch to amend the docs here: >> >> https://www.postgresql.org/docs/devel/static/plpgsql-trigger.html >>

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-16 Thread Robert Haas
On Mon, May 15, 2017 at 9:59 PM, Michael Paquier wrote: > + * > + * Returns -1 on failure, 0 if the socket is readable/writable, 1 if > it timed out. > */ > pqWait is internal to libpq, so we are free to set up what we want > here. Still I think that we should be

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

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 8:57 AM, Jeevan Ladhe wrote: > I have fixed the crash in attached patch. > Also the patch needed bit of adjustments due to recent commit. > I have re-based the patch on latest commit. +boolhas_default;/* Is there a

Re: [HACKERS] Hash Functions

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 11:10 AM, Jeff Davis wrote: > With hash partitioning: > * User only specifies number of partitions of the parent table; does > not specify individual partition properties (modulus, etc.) > * Dump/reload goes through the parent table (though we may

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-16 Thread Robert Haas
On Wed, May 10, 2017 at 9:48 PM, Michael Paquier wrote: > I had my eyes on the WAL sender code this morning, and I have noticed > that walsender.c is not completely consistent with the PID lookups it > does in walsender.c. In two code paths, the PID value is checked >

Re: [HACKERS] Hash Functions

2017-05-16 Thread Jeff Davis
On Mon, May 15, 2017 at 1:04 PM, David Fetter wrote: > As the discussion has devolved here, it appears that there are, at > least conceptually, two fundamentally different classes of partition: > public, which is to say meaningful to DB clients, and "private", used > for

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-16 Thread Ildus Kurbangaliev
On Tue, 16 May 2017 21:36:11 +0900 Etsuro Fujita wrote: > On 2017/05/16 21:11, Ashutosh Bapat wrote: > > On Tue, May 16, 2017 at 5:35 PM, Ildus Kurbangaliev > > wrote: > > >> I agree. Maybe this issue should be added to Postgresql

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Peter Eisentraut
On 5/16/17 03:19, Ashutosh Bapat wrote: > On Tue, May 16, 2017 at 10:03 AM, amul sul wrote: >> On Mon, May 15, 2017 at 9:13 PM, Robert Haas wrote: > Collation is only relevant for ordering, not equality. > > While earlier, I thought the same, I am

Re: [HACKERS] bumping HASH_VERSION to 3

2017-05-16 Thread Amit Kapila
On Tue, May 16, 2017 at 5:14 PM, Robert Haas wrote: > On Tue, May 16, 2017 at 7:31 AM, Amit Kapila wrote: > >> I will send an updated patch once we agree on above points. > > Sounds good. > Attached patch addresses all the comments as discussed.

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Peter Eisentraut
On 5/15/17 23:45, Ashutosh Bapat wrote: > +1. We should throw an error and add a line in documentation that > collation should not be specified for hash partitioned table. Why is it even allowed in the parser then? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-16 Thread tushar
On 05/16/2017 06:35 AM, Masahiko Sawada wrote: I've updated Kuntal's patch, added regression test for option combination and updated documentation. While testing the patch - I found that after dump/restore , we are getting an error in the log file once we enable the subscription \\create

Re: [HACKERS] GCC 7 warnings

2017-05-16 Thread Peter Eisentraut
On 5/4/17 00:21, Tom Lane wrote: > But I'd suggest waiting till after next week's releases. If there > are any problems induced by this, we'd be more likely to find them > with another three months' time before it hits the wild. done -- Peter Eisentraut http://www.2ndQuadrant.com/

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

2017-05-16 Thread Jeevan Ladhe
On Fri, May 12, 2017 at 7:34 PM, Beena Emerson wrote: > > Thank you for the updated patch. However, now I cannot create a partition > after default. > > CREATE TABLE list1 ( > a int, > b int > ) PARTITION BY LIST (a); > > CREATE TABLE list1_1 (LIKE list1); >

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread amul sul
On Tue, May 16, 2017 at 3:30 PM, amul sul wrote: > On Tue, May 16, 2017 at 1:02 PM, Ashutosh Bapat > wrote: > [...] +if (key->strategy == PARTITION_STRATEGY_HASH) +{ +ndatums = nparts; +

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-16 Thread Etsuro Fujita
On 2017/05/16 21:11, Ashutosh Bapat wrote: On Tue, May 16, 2017 at 5:35 PM, Ildus Kurbangaliev wrote: I agree. Maybe this issue should be added to Postgresql Open Items? I think there should be some complex solution that fixes not only triggers for foreign

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-16 Thread Haribabu Kommi
On Tue, May 16, 2017 at 1:53 AM, Robert Haas wrote: > On Mon, May 15, 2017 at 10:06 AM, Haribabu Kommi > wrote: > > This still needs some adjustments to fix for the cases where > > the main backend also does the scan instead of waiting for > >

Re: [HACKERS] NOT NULL constraints on range partition key columns

2017-05-16 Thread Amit Kapila
On Tue, May 16, 2017 at 3:26 PM, Amit Langote wrote: > On 2017/05/16 4:29, Robert Haas wrote: >> On Mon, May 15, 2017 at 9:12 AM, Amit Kapila wrote: >>> Can't we allow NULL to get inserted into the partition (leaf >>> partition) if the user

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-16 Thread Ashutosh Bapat
On Tue, May 16, 2017 at 5:35 PM, Ildus Kurbangaliev wrote: > > I agree. Maybe this issue should be added to Postgresql Open Items? > I think there should be some complex solution that fixes not only > triggers for foreign tables at table partitioning, but covers

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-16 Thread Ildus Kurbangaliev
On Tue, 16 May 2017 15:21:27 +0530 Ashutosh Bapat wrote: > On Mon, May 15, 2017 at 7:24 PM, Ildus Kurbangaliev > wrote: > > On Mon, 15 May 2017 17:43:52 +0530 > > Ashutosh Bapat wrote: > > > >>

Re: [HACKERS] bumping HASH_VERSION to 3

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 7:31 AM, Amit Kapila wrote: >> +snprintf(output_path, sizeof(output_path), "reindex_hash.sql"); >> >> This looks suspiciously pointless. The contents of output_path will >> always be precisely "reindex_hash.sql"; you could just char >>

Re: [HACKERS] bumping HASH_VERSION to 3

2017-05-16 Thread Amit Kapila
On Mon, May 15, 2017 at 8:57 PM, Robert Haas wrote: > On Mon, May 15, 2017 at 12:08 AM, Noah Misch wrote: >> The above-described topic is currently a PostgreSQL 10 open item. Robert, >> since you committed the patch believed to have created it, you own

[HACKERS] synchronous_commit option is not visible after pressing TAB

2017-05-16 Thread tushar
Hi, While creating subscription - if we press TAB button to see the available parameters , synchronous_commit parameter is not visible. postgres=# CREATE SUBSCRIPTION sub123 CONNECTION 'dbname=postgres port=5000' PUBLICATION pub WITH ( CONNECT COPY_DATACREATE_SLOT ENABLED

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Thomas Munro
On Tue, May 16, 2017 at 6:29 PM, Vaishnavi Prabakaran wrote: > On Tue, May 16, 2017 at 8:40 AM, Thomas Munro > wrote: >> >> >> I you hit ^d while COPY FROM STDIN is reading then subsequent COPY >> FROM STDIN commands return

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread amul sul
On Tue, May 16, 2017 at 1:17 PM, Ashutosh Bapat wrote: > Hi, > Here's patch with some cosmetic fixes to 0002, to be applied on top of 0002. > Thank you, included in v6 patch. Regards, Amul -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread amul sul
On Tue, May 16, 2017 at 1:02 PM, Ashutosh Bapat wrote: [...] >>> >>> +if (key->strategy == PARTITION_STRATEGY_HASH) >>> +{ >>> +ndatums = nparts; >>> +hbounds = (PartitionHashBound **) palloc(nparts * >>> + >>>

Re: [HACKERS] NOT NULL constraints on range partition key columns

2017-05-16 Thread Amit Langote
On 2017/05/16 4:29, Robert Haas wrote: > On Mon, May 15, 2017 at 9:12 AM, Amit Kapila wrote: >> Can't we allow NULL to get inserted into the partition (leaf >> partition) if the user uses the partition name in Insert statement? > > That would be terrible behavior - the

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-16 Thread Ashutosh Bapat
On Mon, May 15, 2017 at 7:24 PM, Ildus Kurbangaliev wrote: > On Mon, 15 May 2017 17:43:52 +0530 > Ashutosh Bapat wrote: > >> On Mon, May 15, 2017 at 2:46 PM, Ildus Kurbangaliev >> wrote: >> > On Mon,

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-16 Thread Kuntal Ghosh
Added to open item lists. On Tue, May 16, 2017 at 6:35 AM, Masahiko Sawada wrote: > On Mon, May 15, 2017 at 8:09 PM, Masahiko Sawada > wrote: >> On Mon, May 15, 2017 at 8:06 PM, Kuntal Ghosh >> wrote: >>> On Mon, May

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-16 Thread Ashutosh Bapat
On Mon, May 15, 2017 at 9:23 PM, Robert Haas wrote: > On Mon, May 15, 2017 at 10:06 AM, Haribabu Kommi > wrote: >> This still needs some adjustments to fix for the cases where >> the main backend also does the scan instead of waiting for >> the

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-05-16 Thread Masahiko Sawada
On Sat, May 13, 2017 at 8:19 PM, Amit Kapila wrote: > On Thu, May 11, 2017 at 6:09 AM, Masahiko Sawada > wrote: >> This work would be helpful not only for existing workload but also >> future works like some parallel utility commands, which is

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-16 Thread Tsunakawa, Takayuki
Hello Robert, Tom, Michael, Thanks a lot for checking my patch. Sorry, let me check Michael's review comments and reply tomorrow. Regards Takayuki Tsunakawa -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Ashutosh Bapat
Hi, Here's patch with some cosmetic fixes to 0002, to be applied on top of 0002. On Tue, May 16, 2017 at 1:02 PM, Ashutosh Bapat wrote: > On Sun, May 14, 2017 at 12:30 PM, amul sul wrote: >> On Fri, May 12, 2017 at 10:39 PM, Ashutosh Bapat >>

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Ashutosh Bapat
On Sun, May 14, 2017 at 12:30 PM, amul sul wrote: > On Fri, May 12, 2017 at 10:39 PM, Ashutosh Bapat > wrote: >> On Fri, May 12, 2017 at 6:08 PM, amul sul wrote: >>> Hi, >>> >>> Please find the following updated patches

Re: [HACKERS] Event triggers + table partitioning cause server crash in current master

2017-05-16 Thread Mark Dilger
> On May 15, 2017, at 9:37 PM, Amit Langote > wrote: > > On 2017/05/16 1:18, Mark Dilger wrote: >> >>> On May 15, 2017, at 6:49 AM, Mark Dilger wrote: >>> >>> I can confirm that this fixes the crash that I was seeing. I have read >>>

Re: [HACKERS] [POC] hash partitioning

2017-05-16 Thread Ashutosh Bapat
On Tue, May 16, 2017 at 10:03 AM, amul sul wrote: > On Mon, May 15, 2017 at 9:13 PM, Robert Haas wrote: Collation is only relevant for ordering, not equality. While earlier, I thought the same, I am wondering whether this is true. Don't different

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Vaishnavi Prabakaran
On Tue, May 16, 2017 at 8:40 AM, Thomas Munro wrote: > > I you hit ^d while COPY FROM STDIN is reading then subsequent COPY > FROM STDIN commands return immediately. Hi, I could not reproduce this issue. Even after Ctrl+d , subsequent COPY from commands reads

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-16 Thread Michael Paquier
On Sat, May 13, 2017 at 10:53 AM, Robert Haas wrote: > On Wed, May 10, 2017 at 10:05 PM, Michael Paquier > wrote: >> Regarding the patch, this is way to close to the progress facility >> already in place. So why don't you extend it for the

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

2017-05-16 Thread Michael Paquier
On Fri, May 12, 2017 at 1:06 PM, Bossart, Nathan wrote: > On 5/11/17, 7:20 PM, "Michael Paquier" wrote: >> It seems to me that it would have been less invasive to loop through >> vacuum() for each relation. Do you foresee advantages in allowing >>