Distinguishing autovacuum activity in pg_stat_activity

Started by Tom Lanealmost 18 years ago9 messages
#1Tom Lane
tgl@sss.pgh.pa.us

I was just noticing that $SUBJECT is hard --- the entry in current_query
looks exactly like a manual vacuum command, and there's not anything in
the other fields that looks different either.

Since autovacuum.c is making up its pgstat_report_activity string
anyway, it would be easy to make the string look like, say,
AUTO VACUUM ANALYZE foo.bar

I think this would be a helpful change, but some might find it
confusing. Thoughts?

regards, tom lane

#2Guillaume Smet
guillaume.smet@gmail.com
In reply to: Tom Lane (#1)
Re: Distinguishing autovacuum activity in pg_stat_activity

On Jan 13, 2008 10:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

I think this would be a helpful change, but some might find it
confusing. Thoughts?

If possible, something like:
autovacuum: VACUUM ANALYZE foo.bar
could be less confusing.
It's weird to just add AUTO in front of the query.

--
Guillaume

#3Joshua D. Drake
jd@commandprompt.com
In reply to: Tom Lane (#1)
Re: Distinguishing autovacuum activity in pg_stat_activity

Tom Lane wrote:

I was just noticing that $SUBJECT is hard --- the entry in current_query
looks exactly like a manual vacuum command, and there's not anything in
the other fields that looks different either.

Since autovacuum.c is making up its pgstat_report_activity string
anyway, it would be easy to make the string look like, say,
AUTO VACUUM ANALYZE foo.bar

I think this would be a helpful change, but some might find it
confusing. Thoughts?

I find

AUTOVACUUM ANALYZE foo.bar more clear.

Joshua D. Drake

Show quoted text

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

#4Guillaume Smet
guillaume.smet@gmail.com
In reply to: Joshua D. Drake (#3)
Re: Distinguishing autovacuum activity in pg_stat_activity

On Jan 13, 2008 11:27 PM, Joshua D. Drake <jd@commandprompt.com> wrote:

AUTOVACUUM ANALYZE foo.bar more clear.

Doesn't autovacuum also trigger ANALYZE only?

That's why I proposed an 'autovacuum:' prefix.

--
Guillaume

#5Joshua D. Drake
jd@commandprompt.com
In reply to: Guillaume Smet (#4)
Re: Distinguishing autovacuum activity in pg_stat_activity

Guillaume Smet wrote:

On Jan 13, 2008 11:27 PM, Joshua D. Drake <jd@commandprompt.com> wrote:

AUTOVACUUM ANALYZE foo.bar more clear.

Doesn't autovacuum also trigger ANALYZE only?

That's why I proposed an 'autovacuum:' prefix.

Oh so:

autovacuum: vacuum
autovacuum: analyze
autovacuum: vacuum analyze

Yeah that's cool.

Joshua D. Drake

Show quoted text

--
Guillaume

#6Alvaro Herrera
alvherre@commandprompt.com
In reply to: Guillaume Smet (#2)
Re: Distinguishing autovacuum activity in pg_stat_activity

Guillaume Smet escribi�:

On Jan 13, 2008 10:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

I think this would be a helpful change, but some might find it
confusing. Thoughts?

If possible, something like:
autovacuum: VACUUM ANALYZE foo.bar
could be less confusing.
It's weird to just add AUTO in front of the query.

Whether the string is "AUTO " or "autovacuum: " seems rather the same
thing to me :-) I agree with the general idea. I think "autovacuum: "
makes it clearer that it's not part of the actual command syntax, so
maybe I'll put half a vote for that option.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

#7Guillaume Smet
guillaume.smet@gmail.com
In reply to: Alvaro Herrera (#6)
Re: Distinguishing autovacuum activity in pg_stat_activity

On Jan 14, 2008 1:31 AM, Alvaro Herrera <alvherre@commandprompt.com> wrote:

Whether the string is "AUTO " or "autovacuum: " seems rather the same
thing to me :-) I agree with the general idea.

Yeah, forgot to mention I find it a very good idea.

--
Guillaume

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#6)
Re: Distinguishing autovacuum activity in pg_stat_activity

Alvaro Herrera <alvherre@commandprompt.com> writes:

Whether the string is "AUTO " or "autovacuum: " seems rather the same
thing to me :-) I agree with the general idea. I think "autovacuum: "
makes it clearer that it's not part of the actual command syntax, so
maybe I'll put half a vote for that option.

Okay by me. Do you want to make the change?

regards, tom lane

#9Alvaro Herrera
alvherre@commandprompt.com
In reply to: Tom Lane (#8)
Re: Distinguishing autovacuum activity in pg_stat_activity

Tom Lane escribi�:

Alvaro Herrera <alvherre@commandprompt.com> writes:

Whether the string is "AUTO " or "autovacuum: " seems rather the same
thing to me :-) I agree with the general idea. I think "autovacuum: "
makes it clearer that it's not part of the actual command syntax, so
maybe I'll put half a vote for that option.

Okay by me. Do you want to make the change?

Will do (early tomorrow)

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.