pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Rui DeSousa <rui@crazybean.net>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: vacuumdb maintenance-db??
Date: Wed, 9 Nov 2022 17:51:24 -0500
Message-ID: <62E3B896-85A3-45D3-8C46-9DA7683F66AE@crazybean.net> (raw)
In-Reply-To: <CAKFQuwa9G-zBao=3M9ZE1sNhJg9jWYErGgB6LROPj_cO+jxtFQ@mail.gmail.com>
References: <36bb2141-52e0-e75a-ea4a-5f2236b76c26@gmail.com>
<CAKFQuwZyzOjF9_89t253TMhvwNSUfDrroBV_o_y3YQNRynd2BA@mail.gmail.com>
<92175f50-42f4-bb90-83cd-02b3407c0b56@gmail.com>
<BDFB940A-D9F3-430D-9F62-F31133846835@crazybean.net>
<CAKFQuwa9G-zBao=3M9ZE1sNhJg9jWYErGgB6LROPj_cO+jxtFQ@mail.gmail.com>
> On Nov 9, 2022, at 5:25 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
> On Wed, Nov 9, 2022 at 3:12 PM Rui DeSousa <rui@crazybean.net <mailto:rui@crazybean.net>> wrote:
>
> I always drop the postgres database; no need for it; and I also drop the public schema too. I usually use a database name that corresponds to the given project.
>
> I don't see the point of going to that effort - I'd rather just make the defaults remain available and ensure they are only accessible to the bootstrap superuser via the cluster owner. That way you don't have to document your special environment for the next DBA that assumes "sudo -U postgres psql" is just going to work (and have a schema sitting there waiting for them to quickly do whatever semi-permanent stuff they are doing).
>
> I would not want my production databases used for "maintenance purposes". And using template1 as the maintenance database seems like a poor choice as well; too easy to make a mistake that will show up next time you perform CREATE DATABASE.
>
> David J.
>
What maintenance would you do on an empty database?
Also, most environments that I’ve seen create a new database and leave the default postgres database empty — then complain when it alerts due to wraparound thresholds. Why do I need a support ticket only to login to an unused/empty database to vacuum it?
Setup the PGDATABASE environment variable; and “sudo -U postgres psql” works as expected. =
view thread (14+ messages) latest in thread
Message-ID: <62E3B896-85A3-45D3-8C46-9DA7683F66AE@crazybean.net> Permalink: ../62E3B896-85A3-45D3-8C46-9DA7683F66AE@crazybean.net/ Also on: postgresql.org/message-id/62E3B896-85A3-45D3-8C46-9DA7683F66AE@crazybean.net ·
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 using the --to and --cc options: reply via email To: pgsql-admin@postgresql.org Cc: rui@crazybean.net, david.g.johnston@gmail.com, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org Subject: Re: vacuumdb maintenance-db?? In-Reply-To: <62E3B896-85A3-45D3-8C46-9DA7683F66AE@crazybean.net> * 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