Thread: BUG #17196: old_snapshot_threshold is not honored if there is a transaction

BUG #17196: old_snapshot_threshold is not honored if there is a transaction

From
PG Bug reporting form
Date:
The following bug has been logged on the website:

Bug reference:      17196
Logged by:          Jobin Augustine
Email address:      jobin.augustine@percona.com
PostgreSQL version: 13.4
Operating system:   Any
Description:

I am not quite sure whether this should be called a "Bug". But I thought of
reporting because many suffer and has a potential for user abuse.

Problem:
A user can just create a table and then issue SELECT ... FOR UPDATE on that
table. This will prevent all vacuums to be held up across all tables in
PostgreSQL, even if we set a limit to  old_snapshot_threshold. The entire
database will become heavily bloated, hence unresponsive, resulting in a
service denial situation.
This is causing problems for OpenSource Projects like ActiveMQ when they use
PostgreSQL (They are using workarounds now).
http://spatula.net/mt/blog/2014/02/postgresql-activemq-autovacuum-hell.html