Re: concurrent reindex issues
От | Tory M Blue |
---|---|
Тема | Re: concurrent reindex issues |
Дата | |
Msg-id | 8a547c840910091058l7e6e13c2sbe082c70d82b174b@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: concurrent reindex issues (Scott Marlowe <scott.marlowe@gmail.com>) |
Список | pgsql-performance |
More update
If I run the concurrent re index locally (psql session) it works fine, but when run via a connection through php I get the error
Can't be slon, since I can do this locally, but why would postgres have an issue with a remote connection?
the basic script:
$connectString = "host=server dbname=clsdb user=postgres password=password";
$dbconn = pg_connect($connectString);
if (!$dbconn) {
print "Could not connect";
die();
}
$result = pg_query( $dbconn, "CREATE INDEX CONCURRENTLY prc_temp_idx_impressions_log_date ON tracking.impressions USING btree (log_date) TABLESPACE trackingindexspace;" );
Error about a lock:
If I run the concurrent re index locally (psql session) it works fine, but when run via a connection through php I get the error
Can't be slon, since I can do this locally, but why would postgres have an issue with a remote connection?
the basic script:
$connectString = "host=server dbname=clsdb user=postgres password=password";
$dbconn = pg_connect($connectString);
if (!$dbconn) {
print "Could not connect";
die();
}
$result = pg_query( $dbconn, "CREATE INDEX CONCURRENTLY prc_temp_idx_impressions_log_date ON tracking.impressions USING btree (log_date) TABLESPACE trackingindexspace;" );
Error about a lock:
2009-10-07 22:18:02 PDT clsdb postgres 10.13.200.70(46706) ERROR: deadlock detected
2009-10-07 22:18:02 PDT clsdb postgres 10.13.200.70(46706) DETAIL: Process 20939 waits for ShareLock on virtual transaction 16/43817381; blocked by process 1874.
Process 1874 waits for ExclusiveLock on relation 17428 of database 16384; blocked by process 20939.
2009-10-07 22:18:02 PDT clsdb postgres 10.13.200.70(46706) STATEMENT: CREATE INDEX CONCURRENTLY prc_temp_idx_impressions_log_date2 ON tracking.impressions USING btree (log_date) TABLESPACE trackingindexspace
Thanks
Tory
В списке pgsql-performance по дате отправления: