Re: [pgsql-patches] Recalculating OldestXmin in a long-running vacuum
От | Tom Lane |
---|---|
Тема | Re: [pgsql-patches] Recalculating OldestXmin in a long-running vacuum |
Дата | |
Msg-id | 20222.1170353969@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [pgsql-patches] Recalculating OldestXmin in a long-running vacuum (Heikki Linnakangas <heikki@enterprisedb.com>) |
Ответы |
Re: [pgsql-patches] Recalculating OldestXmin in a
long-running vacuum
Re: [pgsql-patches] Recalculating OldestXmin in a long-running vacuum |
Список | pgsql-patches |
Heikki Linnakangas <heikki@enterprisedb.com> writes: > I have two runs of DBT-2, one with the patch and one without. > Patched: > autovac "public.stock" scans:1 pages:1285990(-0) > tuples:25303056(-2671265) CPU 95.22s/38.02u sec elapsed 10351.17 sec > Unpatched: > autovac "public.stock" scans:1 pages:1284504(-0) > tuples:25001369(-1973760) CPU 86.55s/34.70u sec elapsed 9628.13 sec So that makes this patch a good idea why? (Maybe what we need to see is the impact on the total elapsed time for the DBT-2 test, rather than just the VACUUM runtime.) BTW I've got serious reservations about whether this bit is safe: > + /* The table could've grown since vacuum started, and there > + * might already be dead tuples on the new pages. Catch them > + * as well. Also, we want to include any live tuples in the > + * new pages in the statistics. > + */ > + nblocks = RelationGetNumberOfBlocks(onerel); I seem to recall some assumptions somewhere in the system that a vacuum won't visit newly-added pages. regards, tom lane
В списке pgsql-patches по дате отправления: