BUG #16614: Stale temporary objects makes vacuum ineffective when 1 million transactions remain
От | PG Bug reporting form |
---|---|
Тема | BUG #16614: Stale temporary objects makes vacuum ineffective when 1 million transactions remain |
Дата | |
Msg-id | 16614-23e5c4c4567d1576@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #16614: Stale temporary objects makes vacuum ineffective when 1 million transactions remain
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 16614 Logged by: Giorgio Saviane Email address: gsaviane@gmail.com PostgreSQL version: 9.5.23 Operating system: Linux Description: We noticed the same issue described below occurring multiple times in some of our many Postgres 9.5 deployments. The application makes extensive use of temporary tables. Although there are scheduled activities for regularly vacuuming the database, after some months of uptime the database gets into the 1 million transactions limit. Even though we perform a manual maintenance by vacuuming in single user mode, the server keeps returning the same warning and hint: WARNING: database "mydb" must be vacuumed within (X<1000000) transactions HINT: To avoid a database shutdown, execute a database-wide VACUUM in "mydb". Any further vacuum command issued completes but the warning keeps showing up, and the remaining transactions are decremented. Only by removing all the stale temporary objects with DO $$ DECLARE rec RECORD; BEGIN FOR rec IN SELECT 'DROP schema ' || nspname || ' CASCADE' AS stmt FROM pg_catalog.pg_namespace WHERE nspname LIKE 'pg_temp%' OR nspname LIKE 'pg_toast_temp%' LOOP EXECUTE rec.stmt; END LOOP; END; $$ Makes the vacuum command complete without warnings. We think that stale temporary objects are somehow blocking the vacuuming of the database.
В списке pgsql-bugs по дате отправления: