Re: concurrent reindex issues

From: Tory M Blue <tmblue(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: concurrent reindex issues
Date: 2009-10-09 17:58:06
Message-ID: 8a547c840910091058l7e6e13c2sbe082c70d82b174b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:

*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
*

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ben Chobot 2009-10-09 18:18:09 Re: Databases vs Schemas
Previous Message Scott Otis 2009-10-09 17:46:49 Databases vs Schemas