Re: [HACKERS] Increasing parallel workers at runtime

2017-05-17 Thread Robert Haas
On Tue, May 16, 2017 at 8:15 PM, Haribabu Kommi wrote: > Ok. In this approach, we need to share some of the gatherstate structure > members in the shared memory to access by the other background process > or some better logic to update these details whenever a new worker gets > allotted. What I'm

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Robert Haas
On Wed, May 17, 2017 at 6:29 AM, Amit Kapila wrote: > I think we can do this even without using an additional infomask bit. > As suggested by Greg up thread, we can set InvalidBlockId in ctid to > indicate such an update. Hmm. How would that work? -- Robert Haas EnterpriseDB: http://www.enterp

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-17 Thread Masahiko Sawada
On Mon, May 15, 2017 at 8:02 PM, Kyotaro HORIGUCHI wrote: > Hello, > > At Fri, 12 May 2017 17:24:07 +0900, Masahiko Sawada > wrote in >> On Fri, May 12, 2017 at 11:24 AM, Masahiko Sawada >> wrote: >> > On Thu, May 11, 2017 at 6:16 PM, Petr Jelinek >> > wrote: >> >> On 11/05/17 10:10, Masahik

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

2017-05-17 Thread Amit Kapila
On Tue, May 16, 2017 at 9:39 PM, Robert Haas wrote: > 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

[HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-05-17 Thread Jeevan Ladhe
Hi, As discussed in default partition thread[1] , here is the patch to remove has_null from PartitionBoundInfoData structure. Basically flag has_null is not needed and null_index can be

Re: [HACKERS] [POC] hash partitioning

2017-05-17 Thread amul sul
On Wed, May 17, 2017 at 11:11 AM, Ashutosh Bapat wrote: > 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] UPDATE of partition key

2017-05-17 Thread Dilip Kumar
On Wed, May 17, 2017 at 3:15 PM, Amit Kapila wrote: >> Earlier I thought that option1 is better but later I think that this >> can complicate the situation as we are firing first BR update then BR >> delete and can change the row multiple time and defining such >> behaviour can be complicated. >>

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Amit Kapila
On Mon, May 15, 2017 at 5:28 PM, Robert Haas wrote: > On Fri, May 12, 2017 at 3:07 AM, Amit Kapila wrote: >> I agree with you that it might not be straightforward to make it work, >> but now that earliest it can go is v11, do we want to try doing >> something other than just documenting it. What

Re: [HACKERS] UPDATE of partition key

2017-05-17 Thread Amit Kapila
On Wed, May 17, 2017 at 12:06 PM, Dilip Kumar wrote: > On Fri, May 12, 2017 at 4:17 PM, Amit Khandekar > wrote: >> Option 3 >> >> >> BR, AR delete triggers on source partition >> BR, AR insert triggers on destination partition. >> >> Rationale : >> Since the update is converted to delet

[HACKERS] fix hard-coded index in make_partition_op_expr

2017-05-17 Thread Jeevan Ladhe
Hi, While browsing through the partitioning code, I noticed that a recent commit f8bffe9e6d700fd34759a92e47930ce9ba7dcbd5, which fixes multi-column range partitioning constraints, introduced a function make_partition_op_expr, that takes keynum as a input parameter to identify the index of the part

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

2017-05-17 Thread Jeevan Ladhe
On Wed, May 17, 2017 at 2:28 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Tue, May 16, 2017 at 9:01 PM, Robert Haas > wrote: > > 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 adjustme

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-17 Thread Amit Kapila
On Tue, May 16, 2017 at 2:14 PM, Ashutosh Bapat wrote: > On Mon, May 15, 2017 at 9:23 PM, Robert Haas wrote: > > Also, looking at the patch, it doesn't look like it take enough care > to build execution state of new worker so that it can participate in a > running query. I may be wrong, but the e

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-17 Thread Amit Kapila
On Wed, May 17, 2017 at 5:45 AM, Haribabu Kommi wrote: > > > On Wed, May 17, 2017 at 2:35 AM, Robert Haas wrote: >> > > > Ok. In this approach, we need to share some of the gatherstate structure > members in the shared memory to access by the other background process > or some better logic to upd

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

2017-05-17 Thread Amit Langote
On 2017/05/17 17:58, Ashutosh Bapat wrote: > On Tue, May 16, 2017 at 9:01 PM, Robert Haas wrote: >> 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 patc

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

2017-05-17 Thread Masahiko Sawada
On Wed, May 17, 2017 at 11:33 AM, Masahiko Sawada wrote: > 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,

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

2017-05-17 Thread Etsuro Fujita
On 2017/05/17 17:54, Ildus Kurbangaliev wrote: On Wed, 17 May 2017 15:28:24 +0900 Michael Paquier wrote: On Tue, May 16, 2017 at 11:26 PM, Ildus Kurbangaliev wrote: 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

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

2017-05-17 Thread Ashutosh Bapat
On Tue, May 16, 2017 at 9:01 PM, Robert Haas wrote: > 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_defau

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

2017-05-17 Thread Ildus Kurbangaliev
On Wed, 17 May 2017 15:28:24 +0900 Michael Paquier wrote: > On Tue, May 16, 2017 at 11:26 PM, Ildus Kurbangaliev > wrote: > > 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 Kurbangalie

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

2017-05-17 Thread Thomas Munro
On Wed, May 17, 2017 at 6:04 PM, Amit Langote wrote: > On 2017/05/17 11:22, Thomas Munro wrote: >> Here is that patch. Thoughts? > > I looked at the patch and noticed that there might be some confusion about > what's in the EState.es_root_result_relations array. Thanks for looking at this! > ..

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-05-17 Thread Tsunakawa, Takayuki
From: Michael Paquier [mailto:michael.paqu...@gmail.com] > On Fri, Mar 31, 2017 at 9:58 PM, Ashutosh Bapat > wrote: > > Then the question is why not to allow savepoints as well? For that we > > have to fix transaction block state machine. > > I agree with this argument. I have been looking at the

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-05-17 Thread Michael Paquier
On Fri, Mar 31, 2017 at 9:58 PM, Ashutosh Bapat wrote: > Then the question is why not to allow savepoints as well? For that we > have to fix transaction block state machine. I agree with this argument. I have been looking at the patch, and what it does is definitely incorrect. Any query string in

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Tsunakawa, Takayuki
Hello Robert, Tom, Thank you for being kind enough to explain. I think I could understand your concern. From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Robert Haas > Who is right is a judgement call, but I don't think it's self-evident that >

<    1   2