Re: ON COMMIT actions and inheritance

2018-11-08 Thread Michael Paquier
On Thu, Nov 08, 2018 at 12:53:18PM -0500, Robert Haas wrote: > On Thu, Nov 8, 2018 at 4:04 AM Michael Paquier wrote: >> Even if the style gets heavier, I have also the following in my box: >> When used on a partitioned table, this action drops its partitions and >> when used on tables with inherit

Re: ON COMMIT actions and inheritance

2018-11-08 Thread Robert Haas
On Thu, Nov 8, 2018 at 4:04 AM Michael Paquier wrote: > Even if the style gets heavier, I have also the following in my box: > When used on a partitioned table, this action drops its partitions and > when used on tables with inheritance children, it drops the depending > children. It should be "d

Re: ON COMMIT actions and inheritance

2018-11-08 Thread Amit Langote
On 2018/11/08 18:03, Michael Paquier wrote: > On Thu, Nov 08, 2018 at 04:46:46PM +0900, Amit Langote wrote: >> How about: >> When used on tables with inheritance children (including partitioned >> tables), this also drops the children (partitions). > > Even if the style gets heavier, I have also t

Re: ON COMMIT actions and inheritance

2018-11-08 Thread Michael Paquier
On Thu, Nov 08, 2018 at 04:46:46PM +0900, Amit Langote wrote: > How about: > When used on tables with inheritance children (including partitioned > tables), this also drops the children (partitions). Even if the style gets heavier, I have also the following in my box: When used on a partitioned ta

Re: ON COMMIT actions and inheritance

2018-11-07 Thread Amit Langote
Hi, Thank you updating the patch and adding notes to the documentation about the points I raised. On 2018/11/07 9:53, Michael Paquier wrote: > On Tue, Nov 06, 2018 at 07:04:17PM +0900, Amit Langote wrote: >> Agree with keeping it simple. Maybe, we could (should?) document that the >> only ON COM

Re: ON COMMIT actions and inheritance

2018-11-06 Thread Michael Paquier
On Tue, Nov 06, 2018 at 07:04:17PM +0900, Amit Langote wrote: > Agree with keeping it simple. Maybe, we could (should?) document that the > only ON COMMIT action that works when specified with partitioned parent > table is DROP (other actions are essentially ignored)? I have been thinking about t

Re: ON COMMIT actions and inheritance

2018-11-06 Thread Michael Paquier
On Tue, Nov 06, 2018 at 09:53:37AM -0300, Alvaro Herrera wrote: > While you're there -- I think the CCI after the heap_truncate is not > needed. Could as well get rid of it ... Yes, I have noticed the comment saying so. I did not really want to bother about that part yet for this patch as that c

Re: ON COMMIT actions and inheritance

2018-11-06 Thread Alvaro Herrera
While you're there -- I think the CCI after the heap_truncate is not needed. Could as well get rid of it ... -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: ON COMMIT actions and inheritance

2018-11-06 Thread Amit Langote
Hi, On 2018/11/06 12:03, Michael Paquier wrote: > On Mon, Nov 05, 2018 at 02:37:05PM +0900, Amit Langote wrote: >> Michael pointed out a problem with specifying different ON COMMIT actions >> on a temporary inheritance parent and its children: >> >> https://www.postgresql.org/message-id/2018110205

Re: ON COMMIT actions and inheritance

2018-11-05 Thread Michael Paquier
On Mon, Nov 05, 2018 at 02:37:05PM +0900, Amit Langote wrote: > Michael pointed out a problem with specifying different ON COMMIT actions > on a temporary inheritance parent and its children: > > https://www.postgresql.org/message-id/20181102051804.GV1727%40paquier.xyz Thanks for starting a new t

ON COMMIT actions and inheritance

2018-11-04 Thread Amit Langote
Hi, Michael pointed out a problem with specifying different ON COMMIT actions on a temporary inheritance parent and its children: https://www.postgresql.org/message-id/20181102051804.GV1727%40paquier.xyz The problem is that when PreCommit_on_commit_actions() executes an ON COMMIT DROP action on