By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,203 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,203 IT Pros & Developers. It's quick & easy.

CREATEDB takes too much time.

P: 1
Hi,

I seen this question already asked on this board but without any awnser... http://bytes.com/topic/postgresql/an...ses-postgresql

We have the exact same problem. Our server is hosting now around 1000 db. When we try to create new db, we have to wait around 2 mins.

Here a strace output (just the "slow" part block).

Expand|Select|Wrap|Line Numbers
  1. 1382364648.058351 rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
  2. 1382364648.058371 sendto(3, "Q\0\0\0\33CREATE DATABASE test;\n\0", 28, 0, NULL, 0) = 28
  3. 1382364648.058411 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
  4. 1382364648.058428 poll([{fd=3, events=POLLIN|POLLERR}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
  5. 1382364786.300017 recvfrom(3, "C\0\0\0\24CREATE DATABASE\0Z\0\0\0\5I", 16384, 0, NULL, NULL) = 27
  6. 1382364786.300052 rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
  7. 1382364786.300079 sendto(3, "X\0\0\0\4", 5, 0, NULL, 0) = 5
  8. 1382364786.300098 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
  9. 1382364786.300113 close(3)              = 0
  10. 1382364786.300195 exit_group(0)         = ?
  11.  
I think the time to create new db will continue to grow while we create new db.
Do you have a work around to this issue?

OS: Debian 6 64bits
Postgresql: 8.4
Oct 21 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.