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

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

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

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

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

Re: ON COMMIT actions and inheritance

2018-11-06 Thread Michael Paquier
est%'; + relname + + temp_parted_oncommit_test + temp_parted_oncommit_test1 +(2 rows) + +drop table temp_parted_oncommit_test; +-- Check dependencies between ON COMMIT actions with inheritance trees. +-- Using ON COMMIT DROP on a parent removes the whole set

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

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: >> >>

Re: ON COMMIT actions and inheritance

2018-11-05 Thread Michael Paquier
'temp_parted_oncommit_test%'; + relname + + temp_parted_oncommit_test + temp_parted_oncommit_test1 +(2 rows) + +drop table temp_parted_oncommit_test; +-- Check dependencies between ON COMMIT actions with inheritance trees. +-- Using ON COMMIT DROP on a parent removes the whole set. +begin; +create te

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