PostgresServerStorage
Namespace: Ankus.PgConfig
Assembly: Ankus.PgConfig.dll
Removes storage that belonged to stopped PostgreSQL servers.
public static class PostgresServerStorageInheritance: object
Methods
Section titled “Methods”Delete(string)
Section titled “Delete(string)”Deletes a directory tree after the servers using it have stopped.
public static void Delete(string path)Parameters:
path — string
The directory to delete. A missing directory is already deleted.
Exceptions:
- IOException: A file remained in use or the directory could not be deleted.
- UnauthorizedAccessException: Access to a file or directory remained denied.
On Windows, a stopped server’s processes can still hold handles to its files for a short time after
pg_ctl stop returns. Like PostgreSQL’s own Windows unlink, deletion retries access and sharing
failures every 100 milliseconds for up to 10 seconds, then reports the last failure. Other platforms delete once.