Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oss5d-0000vs-Cv for pgsql-admin@arkaria.postgresql.org; Wed, 09 Nov 2022 20:54:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oss5c-0003gP-8H for pgsql-admin@arkaria.postgresql.org; Wed, 09 Nov 2022 20:54:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oss5b-0003gG-QF for pgsql-admin@lists.postgresql.org; Wed, 09 Nov 2022 20:54:27 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oss5Z-0000P1-E9 for pgsql-admin@lists.postgresql.org; Wed, 09 Nov 2022 20:54:27 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-13bd2aea61bso192405fac.0 for ; Wed, 09 Nov 2022 12:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=AbrMM/09XaiAYD62XP/76PQq+OcCbFnHI931xxrmmVs=; b=jEenan3PZ4d2KyzYhZsXBWn/3e26d56wQ5GgVG8vCWCGlYvsFKidyT27LQSsJ22Ko1 n/vhLHsDLftJoDPBL5Ql5ZNmiQHye/gOEBQWR56+M85mpLRweq+RuTVlMDCQqotdiCXd p/IG6sLlxMUGUjRmQDyp2WpP+9hv+389zusEwEqLEmoB2w9XzsyMObifU+KhfJG7Ojuh 0N40T2QOR9yzRaIlNGIeGmFbfuSGG9ytDXwYrCra+LDBTkV07fO8AMpdFGjR1rh+0fND xKGCqp7EhhJYowvhoNte9qWVQlquFYO7DW7ErSUVOZtJxCMMO8ln618Kaf2ZAf9XoPSy XGBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=AbrMM/09XaiAYD62XP/76PQq+OcCbFnHI931xxrmmVs=; b=NWIyl/ku8KCZ9kiII/nHAD0VUUbs5fMU4XKu/zG5GHoIr/elm+g/T5xKxwc2+hDKw2 qMzS+PVxUeC+T+y2tdrSDzeqZm7KP+E8nICAizbPYRb1Rm8RSOWkh9OM8c3k1dH/XBGw dsdweD+bqbz0p4veDI78zSI0VkdDedX+NcofjewRigyqaIC17KxFPtXIer9Y1fXhnANV GmL/K9XFhfAXiBFbrTKBNn1H3jvBOF63TMmgLQthHng1s3nbQL0HgNUm35C0RUcGvFha T0HsmnhZ+RXOdHzdBIQLcH8xZkJJjC4ytk56dWorx3wCL/WFJPDOf4RY81sy7Nnwpkpo 6j+Q== X-Gm-Message-State: ACrzQf3n/Xi42WJgX0K42HS2i04HrYsWbIVkhMpM1mwDAnMBxZaeg/Yx CI3vPmWjytIaa9cYkCuh0umX52k7Jjc= X-Google-Smtp-Source: AMsMyM5TlizjvoxPtZ8Zt29zd/TTUW2MptYMCghF38oCXFM4xQGuPk2Wod3RE5pDdFTrO1un8iU7kw== X-Received: by 2002:a05:6870:d686:b0:12a:f869:cb90 with SMTP id z6-20020a056870d68600b0012af869cb90mr45692482oap.242.1668027263231; Wed, 09 Nov 2022 12:54:23 -0800 (PST) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id ck12-20020a056830648c00b00661abb66319sm5646401otb.37.2022.11.09.12.54.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Nov 2022 12:54:22 -0800 (PST) Content-Type: multipart/alternative; boundary="------------4YOks0atlM9UR0b4Dr72vX5T" Message-ID: <92175f50-42f4-bb90-83cd-02b3407c0b56@gmail.com> Date: Wed, 9 Nov 2022 14:54:21 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: vacuumdb maintenance-db?? Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: <36bb2141-52e0-e75a-ea4a-5f2236b76c26@gmail.com> From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------4YOks0atlM9UR0b4Dr72vX5T Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/9/22 14:39, David G. Johnston wrote: > On Wed, Nov 9, 2022 at 1:29 PM Ron wrote: > > > https://www.postgresql.org/docs/13/app-vacuumdb.html > > | > --maintenance-db=/|dbname|/| > > Specifies the name of the database to connect to *to discover > which databases should be vacuumed*, when|-a|/|--all|is used. If > not specified, the|postgres|database will be used, or if that does > not exist,|template1|will be used. > > /*Presumably*/ this means that I can create a tiny database with one > table that lists a set of databases. Or maybe not. > > Where is this documented? > > > It means that in order to query any data from a cluster you must already > be connected to a database.  Any database.  Though to actually vacuum a > database you must be connected specifically to it. > > I have no clue what you are getting at with your presumption and what > specifically you are looking for documentation on.  The few places that > deal with "whole cluster" type situations, such as here, document the > need, like you've quoted here, to connect to a database first before > getting said cluster-level information. I think I misread the docs, mentally adding the word "not" to "when -a/--all is used". But this raises a different question: when does the postgres database not exist? -- Angular momentum makes the world go 'round. --------------4YOks0atlM9UR0b4Dr72vX5T Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/9/22 14:39, David G. Johnston wrote:
On Wed, Nov 9, 2022 at 1:29 PM Ron <ronljohnsonjr@gmail.com> wrote:

https://www.postgresql.org/docs/13/app-vacuumdb.html


--maintenance-db=dbname

Specifies the name of the database to connect to to discover which databases should be vacuumed, when -a/--all is used. If not specified, the postgres database will be used, or if that does not exist, template1 will be used.

Presumably this means that I can create a tiny database with one table that lists a set of databases. Or maybe not.

Where is this documented?
   

It means that in order to query any data from a cluster you must already be connected to a database.  Any database.  Though to actually vacuum a database you must be connected specifically to it.

I have no clue what you are getting at with your presumption and what specifically you are looking for documentation on.  The few places that deal with "whole cluster" type situations, such as here, document the need, like you've quoted here, to connect to a database first before getting said cluster-level information.

I think I misread the docs, mentally adding the word "not" to "when -a/--all is used".

But this raises a different question: when does the postgres database not exist?

--
Angular momentum makes the world go 'round.
--------------4YOks0atlM9UR0b4Dr72vX5T--