Talk:Shared Database Hosting

From PostgreSQL wiki

Revision as of 15:35, 22 December 2010 by Ghenon (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In the PostgreSQL issues section:

4. no built in way to terminate connections to a database (cf. MS SQL "KILL" command)

Doesn't the pg_cancel_backend(pid) serve that function? It kills the process that the connection ties to, and thus renders the connection worthless.

Table 9-52. Server Signalling Functions Name Return Type Description pg_cancel_backend(pid int) boolean Cancel a backend's current query

Unfortunately this does not terminate the connection but the query running in the backend for that connection,
at least as far as I know, so this does not help us here, you still can't delete the database in question.
See the debates about a "pg_terminate_backend()" function on the various postgres lists

Also security through grant/revoke should be used on tablespace :

REVOKE ALL ON tablespace <TS_NAME> FROM public;

GRANT ALL ON tablespace <TS_NAME> TO <DBROLE> with grant option;

Personal tools