Re: Improve behavior of concurrent ANALYZE/VACUUM
От | Michael Paquier |
---|---|
Тема | Re: Improve behavior of concurrent ANALYZE/VACUUM |
Дата | |
Msg-id | 20180823050813.GB1158@paquier.xyz обсуждение исходный текст |
Ответ на | Re: Improve behavior of concurrent ANALYZE/VACUUM ("Bossart, Nathan" <bossartn@amazon.com>) |
Ответы |
Re: Improve behavior of concurrent ANALYZE/VACUUM
|
Список | pgsql-hackers |
On Wed, Aug 22, 2018 at 03:49:16PM +0000, Bossart, Nathan wrote: > I think so, since this is the only ownership checks we do on > individual partitions. Another simple way to test this would be to > create a partitioned table with a different owner than the partitions > and to run VACUUM as the partitioned table owner. In this case, we > would still rely on the checks in vacuum_rel() and analyze_rel(). IMO > this is a reason to avoid skipping gathering the individual partitions > based upon the ownership of the partitioned table. It's true that > this wouldn't fix the locking issue for partitions, but the > aforementioned edge case is still present with 0002 anyway. Plus, it > would add a bit more consistency to partition handling in VACUUM. Normal regression tests are less costly than isolation tests, so let's use them as possible. What you attached is covering only a portion of all the scenarios though, as it is as well interesting to see what happens if another user owns only the partitioned table, only one partition, and the partitioned as well as at least one partition. I have extended your patch as attached. It applies on top of HEAD. Once applied with the other patch one can easily stop the difference in behavior, and this stresses the ownership checks in vacuum_rel() and analyze_rel() as well. Perhaps we could begin by that? > We should probably return false here. Oh, my compiler complained here as well. Fixed it on my branch. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: