Hi Ildar, On 2016/05/16 22:12, Ildar Musin wrote: > Hi Amit, > > I'm running some experiments based on your infrastructure trying to > optimize SELECT queries. At some point I need to get PartitionDesc for > relation and to do it I'm using RelationGetPartitionDesc() function. > Problem is that this function copies relcache data and it can be quite > slow for large amounts (thousands) of partitions. The comment to the > function says that we cannot use relation->rd_partdesc pointer to relcache > because of possibility of relcache invalidation. Could you please tell is > it possible that relcache invalidation occurs during SELECT/UPDATE/DELETE > query?
Hmm, I think invalidation would not occur mid-query since it would have acquired a lock on the table. So the copying may be unnecessary though I may be wrong. I will study other similar code and see if that is so. Thanks, Amit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers