WebFaction
Community site: login faq

Hi,

I want to drop/create a staging environment database (PostgreSQL), but it appears that there are a handful of idle processes connected, so I'm getting a "database 'foo' is being accessed by other users."

Is there any way to accomplish this without superuser privileges, as I'm on a shared plan?

I've tried disconnecting these processes. There is a 'cancel' button on the processes page in the phpPgAdmin tool, but I'm getting a message saying "Sending signal failed." From the command line, I've also tried "SELECT pg_cancel_backend(procpid) FROM pg_stat_activity WHERE datname='foo';" which throws a "must be superuser to signal other server processes" error.

Any help would be much appreciated.

Thanks

asked 06 Apr '11, 12:40

jlg
112
accept rate: 0%

edited 06 Apr '11, 12:41


You cannot create and drop databases directly from a PostgreSQL client or library - you must instead create and drop them via our control panel, or via our control panel API.

Hope that helps!

permanent link

answered 06 Apr '11, 12:43

seanf
12.2k41836
accept rate: 37%

Thank you for getting back to me so quickly!

I tried the control panel API (delete_db), but unfortunately, I'm still getting database "foo" is being accessed by other users. I didn't see anything in the API reference about disconnecting database users.

(12 Apr '11, 14:52) jlg

You may want to open a support ticket so we can take a look at your database to see what's going on.

(12 Apr '11, 15:23) aaronh ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×109
×84
×2
×1

question asked: 06 Apr '11, 12:40

question was seen: 3,839 times

last updated: 12 Apr '11, 15:23

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM