Re: Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT
Date
Msg-id 2bf804fb-7417-4539-51c5-f6419f1e8741@lab.ntt.co.jp
Whole thread Raw
In response to Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT  (Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>)
Responses Re: Getting ERROR: could not open file "base/13164/t3_16388" with partition table with ON COMMIT
List pgsql-hackers
On 2018/09/12 19:29, Rajkumar Raghuwanshi wrote:
> Hi,
> 
> I am getting below error while creating temp root partition table with on
> commit. getting same error from v10 onwards.
> 
> [edb@localhost bin]$ ./psql postgres
> psql (10.5)
> Type "help" for help.
> 
> postgres=# CREATE TEMP TABLE test ( c1 varchar, c2 int) PARTITION BY RANGE
> (c1) ON COMMIT DELETE ROWS;
> ERROR:  could not open file "base/13164/t3_16388": No such file or directory

Oops, good catch.

The infamous missing-relkind-check in heap_truncate() seems to be behind
this.  Perhaps, a patch like the attached will do?

Thanks,
Amit

Attachment

pgsql-hackers by date:

Previous
From: Rajkumar Raghuwanshi
Date:
Subject: Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT
Next
From: Peter Eisentraut
Date:
Subject: Re: Collation versioning