Re: Not HOT enough
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2011-11-23T19:33:18Z
Lists: pgsql-hackers
Attachments
- fix_getsnapshotdata.v3.patch (application/octet-stream) patch v3
On Wed, Nov 23, 2011 at 6:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> The real question is do we favour HOT cleanup on those small 8 tables, >> or do we favour HOT cleanup of every other table? > > No, the real question is why not think a little harder and see if we can > come up with a solution that doesn't involve making some cases worse to > make others better. Slightly modified patch attached. When we access a shared relation and the page is prunable we re-derive the cutoff value using GetOldestXmin. That code path is rarely taken. In particular, pg_shdepend is only accessed during object creation/alter/drop, so this isn't a path we can't spare a small amount little extra on, just like the trade-off we've taken to make locking faster for DML while making DDL a little slower. If this is still unacceptable, then I'll have to look at reducing impact on pg_shdepend from temp tables - which is still a plan. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services