Re: concurrent reindex issues - Mailing list pgsql-performance

From Tory M Blue
Subject Re: concurrent reindex issues
Date
Msg-id 8a547c840910091058l7e6e13c2sbe082c70d82b174b@mail.gmail.com
Whole thread Raw
In response to Re: concurrent reindex issues  (Scott Marlowe <scott.marlowe@gmail.com>)
List 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

 

pgsql-performance by date:

Previous
From: tsuraan
Date:
Subject: UUID as primary key
Next
From: "Scott Otis"
Date:
Subject: Databases vs Schemas