pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedEnabling autovacuum per table
6+ messages / 4 participants
[nested] [flat]
* Enabling autovacuum per table
@ 2018-10-15 08:01 Rijo Roy <rjo_roy@yahoo.com>
2018-10-15 09:27 ` Re: Enabling autovacuum per table Arthur Zakirov <a.zakirov@postgrespro.ru>
2018-10-15 13:18 ` Re: Enabling autovacuum per table Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 2 replies; 6+ messages in thread
From: Rijo Roy @ 2018-10-15 08:01 UTC (permalink / raw)
To: pgsql-general
Hello Experts,
Is there any possibility for autovacuum to work on a user table if we set Alter table sometable set (autovacuum_enabled = true) ; even if the parameter autovacuum = off in Postgresql.conf
I am using Postgresql 10 on Linux 6.9.
According to me, it won't work without setting autovacuum = on except for Template0 database. What is your opinion?
Thanks, Rijo Roy
Sent from Yahoo Mail on Android
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Enabling autovacuum per table
2018-10-15 08:01 Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
@ 2018-10-15 09:27 ` Arthur Zakirov <a.zakirov@postgrespro.ru>
2018-10-15 10:25 ` Re: Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
1 sibling, 1 reply; 6+ messages in thread
From: Arthur Zakirov @ 2018-10-15 09:27 UTC (permalink / raw)
To: rjo_roy@yahoo.com <rjo_roy@yahoo.com>; pgsql-general
On 10/15/18 11:01 AM, Rijo Roy wrote:
> Hello Experts,
>
> Is there any possibility for autovacuum to work on a user table if we set
> Alter table sometable set (autovacuum_enabled = true) ; even if the
> parameter autovacuum = off in Postgresql.conf
>
> I am using Postgresql 10 on Linux 6.9.
>
> According to me, it won't work without setting autovacuum = on except
> for Template0 database. What is your opinion?
I think you are right, autovacuum won't vacuum and analyze a table
without setting autovacuum = on. But PostgreSQL might want to force
vacuum if a table is at risk of wraparound.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Enabling autovacuum per table
2018-10-15 08:01 Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
2018-10-15 09:27 ` Re: Enabling autovacuum per table Arthur Zakirov <a.zakirov@postgrespro.ru>
@ 2018-10-15 10:25 ` Rijo Roy <rjo_roy@yahoo.com>
0 siblings, 0 replies; 6+ messages in thread
From: Rijo Roy @ 2018-10-15 10:25 UTC (permalink / raw)
To: a.zakirov@postgrespro.ru <a.zakirov@postgrespro.ru>; pgsql-general
Yeah when age(relfrozenxid) goes beyond the limit Postgresql will invoke the autovacuum session to avoid a wraparound issue.. But here that's not the case..
Sent from Yahoo Mail on Android
On Mon, 15 Oct 2018 at 2:58 pm, Arthur Zakirov<a.zakirov@postgrespro.ru> wrote: On 10/15/18 11:01 AM, Rijo Roy wrote:
> Hello Experts,
>
> Is there any possibility for autovacuum to work on a user table if we set
> Alter table sometable set (autovacuum_enabled = true) ; even if the
> parameter autovacuum = off in Postgresql.conf
>
> I am using Postgresql 10 on Linux 6.9.
>
> According to me, it won't work without setting autovacuum = on except
> for Template0 database. What is your opinion?
I think you are right, autovacuum won't vacuum and analyze a table
without setting autovacuum = on. But PostgreSQL might want to force
vacuum if a table is at risk of wraparound.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Enabling autovacuum per table
2018-10-15 08:01 Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
@ 2018-10-15 13:18 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-10-16 11:39 ` Re: Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
1 sibling, 1 reply; 6+ messages in thread
From: Adrian Klaver @ 2018-10-15 13:18 UTC (permalink / raw)
To: rjo_roy@yahoo.com <rjo_roy@yahoo.com>; pgsql-general
On 10/15/18 1:01 AM, Rijo Roy wrote:
> Hello Experts,
>
> Is there any possibility for autovacuum to work on a user table if we set
> Alter table sometable set (autovacuum_enabled = true) ; even if the
> parameter autovacuum = off in Postgresql.conf
>
> I am using Postgresql 10 on Linux 6.9.
>
> According to me, it won't work without setting autovacuum = on except
> for Template0 database. What is your opinion?
The docs opinion:
https://www.postgresql.org/docs/10/static/sql-createtable.html
"autovacuum_enabled, toast.autovacuum_enabled (boolean)
Enables or disables the autovacuum daemon for a particular table.
If true, the autovacuum daemon will perform automatic VACUUM and/or
ANALYZE operations on this table following the rules discussed in
Section 24.1.6. If false, this table will not be autovacuumed, except to
prevent transaction ID wraparound. See Section 24.1.5 for more about
wraparound prevention. Note that the autovacuum daemon does not run at
all (except to prevent transaction ID wraparound) if the autovacuum
parameter is false; setting individual tables' storage parameters does
not override that. Therefore there is seldom much point in explicitly
setting this storage parameter to true, only to false.
"
>
> Thanks,
> Rijo Roy
>
> Sent from Yahoo Mail on Android
> <https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__Android...;
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Enabling autovacuum per table
2018-10-15 08:01 Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
2018-10-15 13:18 ` Re: Enabling autovacuum per table Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-10-16 11:39 ` Rijo Roy <rjo_roy@yahoo.com>
2018-10-16 12:21 ` Re: Enabling autovacuum per table Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 6+ messages in thread
From: Rijo Roy @ 2018-10-16 11:39 UTC (permalink / raw)
To: adrian.klaver@aklaver.com <adrian.klaver@aklaver.com>; pgsql-general
Thanks Adrian for sharing the facts and docs..
Is there a possibility to disable auto analyze if we set autovacuum_analyze_scale_factor to 100% and autovacuum_analyze_threshold = 0?
Thanks, Rijo Roy
Sent from Yahoo Mail on Android
On Mon, 15 Oct 2018 at 6:48 pm, Adrian Klaver<adrian.klaver@aklaver.com> wrote: On 10/15/18 1:01 AM, Rijo Roy wrote:
> Hello Experts,
>
> Is there any possibility for autovacuum to work on a user table if we set
> Alter table sometable set (autovacuum_enabled = true) ; even if the
> parameter autovacuum = off in Postgresql.conf
>
> I am using Postgresql 10 on Linux 6.9.
>
> According to me, it won't work without setting autovacuum = on except
> for Template0 database. What is your opinion?
The docs opinion:
https://www.postgresql.org/docs/10/static/sql-createtable.html
"autovacuum_enabled, toast.autovacuum_enabled (boolean)
Enables or disables the autovacuum daemon for a particular table.
If true, the autovacuum daemon will perform automatic VACUUM and/or
ANALYZE operations on this table following the rules discussed in
Section 24.1.6. If false, this table will not be autovacuumed, except to
prevent transaction ID wraparound. See Section 24.1.5 for more about
wraparound prevention. Note that the autovacuum daemon does not run at
all (except to prevent transaction ID wraparound) if the autovacuum
parameter is false; setting individual tables' storage parameters does
not override that. Therefore there is seldom much point in explicitly
setting this storage parameter to true, only to false.
"
>
> Thanks,
> Rijo Roy
>
> Sent from Yahoo Mail on Android
> <https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__Android...;
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Enabling autovacuum per table
2018-10-15 08:01 Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
2018-10-15 13:18 ` Re: Enabling autovacuum per table Adrian Klaver <adrian.klaver@aklaver.com>
2018-10-16 11:39 ` Re: Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
@ 2018-10-16 12:21 ` Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 0 replies; 6+ messages in thread
From: Laurenz Albe @ 2018-10-16 12:21 UTC (permalink / raw)
To: rjo_roy@yahoo.com <rjo_roy@yahoo.com>; adrian.klaver@aklaver.com <adrian.klaver@aklaver.com>; pgsql-general
Rijo Roy wrote:
> Is there a possibility to disable auto analyze if we set autovacuum_analyze_scale_factor
> to 100% and autovacuum_analyze_threshold = 0?
Why would you want that?
You are trying very hard to hurt yourself by disabling autovacuum;
maybe there is a better way to solve your problem.
Can you tell us more about the actual problem?
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-10-16 12:21 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 08:01 Enabling autovacuum per table Rijo Roy <rjo_roy@yahoo.com>
2018-10-15 09:27 ` Arthur Zakirov <a.zakirov@postgrespro.ru>
2018-10-15 10:25 ` Rijo Roy <rjo_roy@yahoo.com>
2018-10-15 13:18 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-10-16 11:39 ` Rijo Roy <rjo_roy@yahoo.com>
2018-10-16 12:21 ` Laurenz Albe <laurenz.albe@cybertec.at>
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