More aggressive vacuuming of unlogged relations?

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: More aggressive vacuuming of unlogged relations?
Date: 2020-10-27 19:58:40
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


The patch in [1] makes the horizon logic in procarray.c aware of temp
tables not needing to care about other session's snapshots (also
discussed in[2]). Extending a7212be8b9e, which did that for VACUUM, but
not HOT pruning etc.

While polishing that patch I was wondering whether there are other
classes of relations that we might want to treat differently. And
there's one more that we don't special case right now: unlogged tables.

As unlogged tables aren't replicated via physical rep, we don't need to
apply vacuum_defer_cleanup_age, hot standby feedback and slot based

The obvious question is, is that worth doing? My intuition is that yes,
it probably is: Unlogged tables are often used for hotly updated
transient state, allowing that to be cleaned up more aggressively will
reduce bloat.



Andres Freund


Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2020-10-27 20:00:17 Re: cutting down the TODO list thread
Previous Message Anastasia Lubennikova 2020-10-27 19:56:23 Re: [patch] Fix checksum verification in base backups for zero page headers