pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedautovacuum on pg_catalog tables
3+ messages / 3 participants
[nested] [flat]
* autovacuum on pg_catalog tables
@ 2021-06-04 14:40 Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
0 siblings, 1 reply; 3+ messages in thread
From: Zwettler Markus (OIZ) @ 2021-06-04 14:40 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
I would like to start a more aggressive autovacuum on pg_catalog tables like pg_largeobject.
So I tried as a superuser:
# alter table pg_catalog.pg_largeobject_metadata set (autovacuum_vacuum_scale_factor = 0, autovacuum_vacuum_threshold = 5000);
ERROR: permission denied: "pg_largeobject_metadata" is a system catalog
(How) Is it possible to change such table attributes on pg_catalog tables?
Thanks, Markus
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: autovacuum on pg_catalog tables
@ 2021-06-04 15:37 Vijaykumar Jain <vijaykumarjain.github@gmail.com>
parent: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
0 siblings, 1 reply; 3+ messages in thread
From: Vijaykumar Jain @ 2021-06-04 15:37 UTC (permalink / raw)
To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
ok, what i am sharing, *DO NOT DO IT.*
it is just to answer why it is not working :)
PostgreSQL: Documentation: 13: 19.17. Developer Options
<https://www.postgresql.org/docs/current/runtime-config-developer.html;
postgres=# alter table pg_catalog.pg_largeobject_metadata set
(AUTOVACUUM_VACUUM_COST_DELAY = 1);
ERROR: permission denied: "pg_largeobject_metadata" is a system catalog
postgres=# show allow_system_table_mods;
allow_system_table_mods
-------------------------
off
(1 row)
postgres=# set allow_system_table_mods TO 1;
SET
postgres=# show allow_system_table_mods;
allow_system_table_mods
-------------------------
on
(1 row)
postgres=# alter table pg_catalog.pg_largeobject_metadata set
(AUTOVACUUM_VACUUM_COST_DELAY = 1);
ALTER TABLE
but you can always run vacuum manually on the table.
vacuum (verbose,analyze) pg_catalog.pg_largeobject_metadata;
INFO: vacuuming "pg_catalog.pg_largeobject_metadata"
INFO: index "pg_largeobject_metadata_oid_index" now contains 0 row
versions in 1 pages
DETAIL: 0 index row versions were removed.
0 index pages have been deleted, 0 are currently reusable.
CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s.
INFO: "pg_largeobject_metadata": found 0 removable, 0 nonremovable row
versions in 0 out of 0 pages
DETAIL: 0 dead row versions cannot be removed yet, oldest xmin: 8083775
There were 0 unused item identifiers.
Skipped 0 pages due to buffer pins, 0 frozen pages.
0 pages are entirely empty.
CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s.
INFO: analyzing "pg_catalog.pg_largeobject_metadata"
INFO: "pg_largeobject_metadata": scanned 0 of 0 pages, containing 0 live
rows and 0 dead rows; 0 rows in sample, 0 estimated total rows
VACUUM
On Fri, 4 Jun 2021 at 20:10, Zwettler Markus (OIZ) <
Markus.Zwettler@zuerich.ch> wrote:
> I would like to start a more aggressive autovacuum on pg_catalog tables
> like pg_largeobject.
>
>
>
> So I tried as a superuser:
>
>
>
> # alter table pg_catalog.pg_largeobject_metadata set
> (autovacuum_vacuum_scale_factor = 0, autovacuum_vacuum_threshold = 5000);
>
> ERROR: permission denied: "pg_largeobject_metadata" is a system catalog
>
>
>
> (How) Is it possible to change such table attributes on pg_catalog tables?
>
>
>
> Thanks, Markus
>
>
>
>
>
--
Thanks,
Vijay
Mumbai, India
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [Extern] Re: autovacuum on pg_catalog tables
@ 2021-06-04 15:51 Michael Lewis <mlewis@entrata.com>
parent: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Lewis @ 2021-06-04 15:51 UTC (permalink / raw)
To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; +Cc: Vijaykumar Jain <vijaykumarjain.github@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Why not change the defaults? How many tables would hit this new threshold
and you would NOT want autovacuum to process them?
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-06-04 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 14:40 autovacuum on pg_catalog tables Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2021-06-04 15:37 ` Vijaykumar Jain <vijaykumarjain.github@gmail.com>
2021-06-04 15:51 ` Michael Lewis <mlewis@entrata.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox