pgsql: Remove outdated recommendation for manual VACUUM

Started by Magnus Haganderabout 4 years ago4 messagescomitters
Jump to latest
#1Magnus Hagander
magnus@hagander.net

Remove outdated recommendation for manual VACUUM

We have had a working and tunable autovacuum
for at least a decade now, so remove the recommendation to
manually vacuum tables at least every night.
Autovacuum is now also triggered by INSERTs, so we can also
remove the recommendation to run VACUUM (ANALYZE) after lots
of INSERTs or DELETEs.

Instead, suggest using autovacuum by moving the respective
paragraph up to where the importance of VACUUM is emphasized.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-By: Magnus Hagander, Peter Geoghegan
Discussion: /messages/by-id/6f5e3da98fec14640f389d7b84c3b413833697f4.camel@cybertec.at

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/27f953ea9901c08fb3e4064f9a31e07bc30c1e6d

Modified Files
--------------
doc/src/sgml/ref/vacuum.sgml | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)

#2Bruce Momjian
bruce@momjian.us
In reply to: Magnus Hagander (#1)
Re: pgsql: Remove outdated recommendation for manual VACUUM

On Mon, Jun 27, 2022 at 05:48:41PM +0000, Magnus Hagander wrote:

Remove outdated recommendation for manual VACUUM

We have had a working and tunable autovacuum
for at least a decade now, so remove the recommendation to
manually vacuum tables at least every night.
Autovacuum is now also triggered by INSERTs, so we can also
remove the recommendation to run VACUUM (ANALYZE) after lots
of INSERTs or DELETEs.

Instead, suggest using autovacuum by moving the respective
paragraph up to where the importance of VACUUM is emphasized.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-By: Magnus Hagander, Peter Geoghegan
Discussion: /messages/by-id/6f5e3da98fec14640f389d7b84c3b413833697f4.camel@cybertec.at

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/27f953ea9901c08fb3e4064f9a31e07bc30c1e6d

Modified Files
--------------
doc/src/sgml/ref/vacuum.sgml | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)

Uh, shouldn't this doc patch be applied to all major supported Postgres
versions?

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Indecision is a decision. Inaction is an action. Mark Batterson

#3Magnus Hagander
magnus@hagander.net
In reply to: Bruce Momjian (#2)
Re: pgsql: Remove outdated recommendation for manual VACUUM

On Mon, Jun 27, 2022 at 8:57 PM Bruce Momjian <bruce@momjian.us> wrote:

On Mon, Jun 27, 2022 at 05:48:41PM +0000, Magnus Hagander wrote:

Remove outdated recommendation for manual VACUUM

We have had a working and tunable autovacuum
for at least a decade now, so remove the recommendation to
manually vacuum tables at least every night.
Autovacuum is now also triggered by INSERTs, so we can also
remove the recommendation to run VACUUM (ANALYZE) after lots
of INSERTs or DELETEs.

Instead, suggest using autovacuum by moving the respective
paragraph up to where the importance of VACUUM is emphasized.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-By: Magnus Hagander, Peter Geoghegan
Discussion:

/messages/by-id/6f5e3da98fec14640f389d7b84c3b413833697f4.camel@cybertec.at

Branch
------
master

Details
-------

https://git.postgresql.org/pg/commitdiff/27f953ea9901c08fb3e4064f9a31e07bc30c1e6d

Modified Files
--------------
doc/src/sgml/ref/vacuum.sgml | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)

Uh, shouldn't this doc patch be applied to all major supported Postgres
versions?

Not sure. If we do we'd at least have to adapt it past the point where
autovacuum handles INSERTs I think?

//Magnus

#4Bruce Momjian
bruce@momjian.us
In reply to: Magnus Hagander (#3)
Re: pgsql: Remove outdated recommendation for manual VACUUM

On Mon, Jun 27, 2022 at 09:27:29PM +0200, Magnus Hagander wrote:

Uh, shouldn't this doc patch be applied to all major supported Postgres
versions?

Not sure. If we do we'd at least have to adapt it past the point where
autovacuum handles INSERTs I think?

Oh, good point, never mind.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Indecision is a decision. Inaction is an action. Mark Batterson