Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

"ERROR: XX000: could not open relation with OID" when merge partitions #120

Closed
@killua001

Description

create a partition table like Issue #117

Partition infomation:

parent partition parttype partattr range_min range_max
journal journal_5 2 dt 2017年01月01日 00:20:00 2017年01月01日 00:25:00
journal journal_6 2 dt 2017年01月01日 00:25:00 2017年01月01日 00:30:00

In session 1, merge partition #5 & #6:

[xxxx@xxx:54xx/k1 M] [08-31.16:35:17]=# begin;
BEGIN
Time: 0.221 ms
[xxxx@xxx:54xx/k1 M] [08-31.16:35:24]=# select merge_range_partitions('journal_5','journal_6');
 merge_range_partitions 
------------------------
 
(1 row)
Time: 244.467 ms

In session 2, do a select:

select count(*) from journal where dt between '2017年01月01日 00:20:00' and '2017年01月01日 00:30:00';

End transaction in session 1:

[xxxx@xxx:54xx/k1 M] [08-31.16:38:23]=# end;
COMMIT
Time: 39.572 ms

ERROR in session 2:

ERROR: XX000: could not open relation with OID 166068
LOCATION: relation_open, heapam.c:1066

Should lock parent table with ACCESS EXCLUSIVE mode when merge/drop partition ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /