ID: 7007
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Analyzed
Bug Type: PostgreSQL related
Assigned To:
Comments:
it seems that postgres does not shut down connections synchronous which means that
after pg_close() the connection is still alive for a very short moment (and so are the
locks). inserting a sleep(1) after pg_close() fixed the problem 100% for me. i'm in
contact with some postgres guy to confirm. i can assure you that it's not a
php-problem.
Previous Comments:
---------------------------------------------------------------------------
[2000-10-04 03:05:12] [EMAIL PROTECTED]
The script below doesn't remove the database because the second
link is not closed and the postgres will not drop a database if there is a connection
using it.
<?php
$id1 = pg_connect("host=cheese port=7655 user=zendtest password=********
dbname=template1");
pg_exec($id1, "CREATE DATABASE zendtest");
pg_close($id1);
$id2 = pg_connect("host=cheese port=7655 user=zendtest password=dnez
dbname=zendtest");
pg_close($id2);
$id3 = pg_connect("host=cheese port=7655 user=zendtest password=********
dbname=template1");
pg_exec($id3, "DROP DATABASE zendtest");
pg_close($id3);
?>
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7007&edit=2
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]