pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Alan Stange <stange@rentec.com>
To: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: [INTERNET] Re: auto vacuum question
Date: Mon, 28 Aug 2023 13:48:59 -0700
Message-ID: <a37aa146-5b8a-5784-07f1-a185c3c7ec0b@aklaver.com> (raw)
In-Reply-To: <bb889531-e768-496e-8618-c7dbeeb1ec60@rentec.com>
References: <f04e52fe-cc44-41f8-bc5b-818309bb482f@rentec.com>
	<41a740be-a8d7-b5c0-3054-c9bb7df4d362@aklaver.com>
	<bb889531-e768-496e-8618-c7dbeeb1ec60@rentec.com>

On 8/28/23 13:19, Alan Stange wrote:
> On 8/28/23 16:11, Adrian Klaver wrote:
>> On 8/28/23 13:06, Alan Stange wrote:
>>> All,
>>>

>> Are you sure that is coming from autovacuum?
>>
>> What are the log lines preceding the WARNING?
>>
>> What is the complete warning line?
> Thank you for your quick response.
> 
> The prefix to the logfile lines are a datetime stamp and then a number,
> 2062375 in the example that I happen to be looking at now.
> 
> I am 99.9% that these log lines came from the autovacuum, as it went on
> for days, whereas a regular vacuum on our multi-TB data base takes a
> couple of hours.   We don't have any explicit vacuum or analyze jobs
> running or scheduled.

I went back to the source for a refresher:

https://doxygen.postgresql.org/autovacuum_8c_source.html

The autovacuum system is structured in two different kinds of processes: 
the autovacuum launcher and the autovacuum worker.  The launcher is an
always-running process, started by the postmaster when the autovacuum 
GUC parameter is set.  The launcher schedules autovacuum workers to be 
started when appropriate.  The workers are the processes which execute 
the actual vacuuming; they connect to a database as determined in the 
launcher, and once connected they examine the catalogs to select the 
tables to vacuum.


...

Connect to the selected database, specifying no particular user


I read that as the autovacuumn process runs directly from the backend 
and not as any user. Therefore it should not be running into a user 
permissions problem.

1) Is this the community version of Postgres?

2) Did you do any other changes when you altered the superuser?

3) Did the log lines before the Warning have anything useful?

4) Are you sure there is not some admin app running that is doing VACUUMs?

> 
> Alan
> 
> 
>>
>>> We restored the superuser role to the original 'red' login role and
>>> these messages went away.
>>>
>>> We are not running any explicit vacuum's.    As far as I can tell, these
>>> warnings were comming from the autovacuum processes, and we did also
>>> notice that some query stats became stale which I assume is related to
>>> these same warnings.
>>>
>>>
>>> So, I'm wondering how we can move the superuser role from role A to B,
>>> so that the autovacuum process will still work?   I googled around a
>>> bit, but didn't come up with anything useful for this.
>>>
>>> Thank you,
>>>
>>> Alan
>>>
>>>
> 
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (9+ messages)  latest in thread

Message-ID: <a37aa146-5b8a-5784-07f1-a185c3c7ec0b@aklaver.com>
Permalink:  ../a37aa146-5b8a-5784-07f1-a185c3c7ec0b@aklaver.com/
Also on:    postgresql.org/message-id/a37aa146-5b8a-5784-07f1-a185c3c7ec0b@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, stange@rentec.com
  Subject: Re: [INTERNET] Re: auto vacuum question
  In-Reply-To: <a37aa146-5b8a-5784-07f1-a185c3c7ec0b@aklaver.com>
  References: <f04e52fe-cc44-41f8-bc5b-818309bb482f@rentec.com> <41a740be-a8d7-b5c0-3054-c9bb7df4d362@aklaver.com> <bb889531-e768-496e-8618-c7dbeeb1ec60@rentec.com> <a37aa146-5b8a-5784-07f1-a185c3c7ec0b@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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