Search Postgresql Archives

Re: safelly erasing dirs/files

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

 



Joao Ferreira gmail wrote:
How can I safelly erase (with rm command in Linux) files or dirs
concerning a specific database ?
You can't do it with rm; you need to execute the SQL "drop" command somehow to clean up all the references to that database. If you want to remove a database from the command line, there's a wrapper script named dropdb you can use to do that:

http://www.postgresql.org/docs/current/static/app-dropdb.html

Note that removing a database will require connecting to the server as a superuser or owner of the database. If you want to do that in a script, you might need to setup a .pgpass file: http://www.postgresql.org/docs/current/static/libpq-pgpass.html

--
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@xxxxxxxxxxxxxxx  www.2ndQuadrant.com


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux