Skip to content

PostgresServerStorage

Namespace: Ankus.PgConfig

Assembly: Ankus.PgConfig.dll

Removes storage that belonged to stopped PostgreSQL servers.

public static class PostgresServerStorage

Inheritance: object

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:

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.