Re: [HACKERS] scan on inheritance parent with no children in current session

2017-08-15 Thread Robert Haas
On Mon, Aug 14, 2017 at 1:49 AM, Ashutosh Bapat wrote: > I have modified the comments that way. Committed with some cleanup. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list

Re: [HACKERS] scan on inheritance parent with no children in current session

2017-08-13 Thread Ashutosh Bapat
On Fri, Aug 11, 2017 at 9:08 PM, Robert Haas wrote: > > rhaas=# create table parent (a int) partition by list (a); > CREATE TABLE > rhaas=# create temp table child partition of parent for values in (1); > CREATE TABLE > rhaas=# explain verbose select * from parent; >

Re: [HACKERS] scan on inheritance parent with no children in current session

2017-08-11 Thread Robert Haas
On Sun, Aug 6, 2017 at 10:56 PM, Amit Langote wrote: > Good catch. I agree that getting an Append node after that commit is > unintentional and we should fix so that we don't get an Append. So, +1 to > your patch. I looked at the patch and the code fix seems to

Re: [HACKERS] scan on inheritance parent with no children in current session

2017-08-06 Thread Amit Langote
On 2017/08/04 18:11, Ashutosh Bapat wrote: > After that commit in session 1, we get an Append plan > postgres=# explain verbose select * from parent; > QUERY PLAN > --- > Append (cost=0.00..0.00 rows=1

[HACKERS] scan on inheritance parent with no children in current session

2017-08-04 Thread Ashutosh Bapat
Hi All, Consider a parent table which has no child in the current session, but has temporary children in other sessions. Session 1 postgres=# create table parent (a int); CREATE TABLE Session 2: postgres=# create temp table temp_child () inherits(parent); CREATE TABLE Before commit