On Fri, 7 Jun 2019 at 19:06, Martin Lund Askøe
<martinlundaskoe@gmail.com> wrote:
> Do you know if there is any way to force update the relcache entry during my 'attach'-transaction?
You could just do a dummy insert after the ATTACH PARTITION
transaction ends and before the transaction where you start inserting
the data. Something like:
insert into partition_table_2019_01_01 (id, some_info, e_timestamp)
select 1,'',now() where 1=0;
That'll build and cache the partition bound in the partitions relcache entry.
I'm curious to know why you have concerns about the AccessShareLock on
the partitioned table being held during the insert. Can you explain
that?
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services