On Wed, Oct 5, 2016 at 11:21 AM, <digoal@126.com> wrote:
> I set old_snapshot_threshold to 1min, but it's no effect to prevent bloat?
> BEGIN
> postgres=# insert into test01 values (1);
> INSERT 0 1
> [no COMMIT or ROLLBACK of this transaction]
> another session :
> [other modifications and vacuums]
> [no early cleanup or "snapshot too old" error]
> why ? It's a bug?
This feature does not attempt to perform early cleanup on (or past)
a transaction which has acquired a transaction ID (normally through
data modification) and which has not completed. In other words, it
helps with long-running read-only transactions, but a long-running
transaction which writes can still cause bloat.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company