Robert Haas <robertmh...@gmail.com> writes: > I think we DO hold relations open for the duration of execution > (though not necessarily between planning and execution). And there is > code in RelationClearRelation to avoid changing rd_partkey and > rd_partdesc if no logical change has occurred.
Testing with valgrind + RELCACHE_FORCE_RELEASE is sufficient to disprove that, cf current results from lousyjack (which match my own testing). The partkey *is* disappearing under us. While I've not looked into the exact reasons for that, my first guess is that the partitioned table is not held open because it's not one of the ones to be scanned. Are you prepared to change something like that at this stage of the release cycle? regards, tom lane