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 1d3837d8-1722-54bb-9df3-19ae5158dc88@lab.ntt.co.jp
Whole thread Raw
In response to Re: Getting ERROR: could not open file "base/13164/t3_16388" with partition table with ON COMMIT  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT
Re: Getting ERROR: could not open file "base/13164/t3_16388" withpartition table with ON COMMIT
List pgsql-hackers
On 2018/09/13 23:13, Tom Lane wrote:
> Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
>> On 2018/09/13 1:14, Tom Lane wrote:
>>> That seems excessively restrictive.  Anything that has storage (e.g.
>>> matviews) ought to be truncatable, no?
> 
>> Not by heap_truncate it seems.  The header comment of heap_truncate says
>> that it concerns itself only with ON COMMIT truncation of temporary tables:
> 
> Ah.  Well, in that case I'm OK with just a simple test for
> RELKIND_RELATION, but I definitely feel that it should be inside
> heap_truncate.  Callers don't need to know about the limited scope
> of what that does.

I guess you meant inside heap_truncate_one_rel.  I updated the patch that
way, but I wonder if we shouldn't also allow other relkinds that have
storage which RelationTruncate et al can technically deal with.

Thanks,
Amit

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Loaded footgun open_datasync on Windows
Next
From: Michael Paquier
Date:
Subject: Re: Allowing printf("%m") only where it actually works