Re: vacuumdb maintenance-db??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



you guys dropping the postgres database just like that are giving me the heebie jeebies

On Wed, Nov 9, 2022 at 2:51 PM Rui DeSousa <rui@xxxxxxxxxxxxx> wrote:


On Nov 9, 2022, at 5:25 PM, David G. Johnston <david.g.johnston@xxxxxxxxx> wrote:

On Wed, Nov 9, 2022 at 3:12 PM Rui DeSousa <rui@xxxxxxxxxxxxx> 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.  


--
Wells Oliver
wells.oliver@xxxxxxxxx

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux