Re: Multiple backend connections
От | Doug McNaught |
---|---|
Тема | Re: Multiple backend connections |
Дата | |
Msg-id | m3r8928yj0.fsf@varsoon.wireboard.com обсуждение исходный текст |
Ответ на | Multiple backend connections (Paul M Foster <paulf@quillandmouse.com>) |
Список | pgsql-general |
Paul M Foster <paulf@quillandmouse.com> writes: > On Wed, Mar 19, 2003 at 06:39:06PM -0500, Doug McNaught wrote: > > > Paul M Foster <paulf@quillandmouse.com> writes: > > > > What is the exact error you're getting in the C program? > > Well, in a C program, you don't get an error message per se. But I > inserted a call to PQresultErrorMessage() and the result is: > > ERROR: CREATE DATABASE: source database "template1" is being accessed by > other users Yeah, I get the same thing if I sit in template1 and try to 'createdb' in another window. I think the answer is "don't do that then." I don't know why it cares, but it obviously does. template1 is copied when a new DB is created, but I'd think as long as there are no transactions open on it, it'd be safe to copy even if someone is connected to it. I'm probably wrong though. Solution: don't use template1 for anything, and avoid connecting to it if you want CREATE DATABASE to succeeed. > P.S. BTW, I'm s*bscr*bed, so no need to echo lists posts offlist to me. Habit, from back when the list used to take hours to deliver messages... -Doug
В списке pgsql-general по дате отправления: