Would it make sense, as suggested by Álvaro in the "CLOG contention"
thread, to have a background process to set hint bits on tuples in
dirty pages? Processing could be loosely based around the
background writer techniques in terms of sweeping through the cache,
but it would only look at dirty pages (destined to be written
anyway) and I think we might want to further limit it to looking at
tuples with an xmin or xmax value which precede the global xmin
value and doesn't yet have a hint. It wouldn't do any writing; it
would just check visibility and set hint bits.
-Kevin