Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Tom Lane
Robert Anderson writes: > Only one line returned: > postgres=# select * from pg_stat_activity where pid=3990; Aaah, sorry, that was a brain fade. I meant to ask about rows in pg_locks with that pid. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Robert Anderson
You still haven't stated why you think it is blocked? Ouput from iotop: 3990 be/4 postgres0.00 B/s0.00 B/s 0.00 % 0.00 % postgres: postgres flip [local] CREATE INDEX The process isn't reading or writing anything for many hours, but it's using almost 90% of CPU. How long has it been t

Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Joshua D. Drake
On 05/09/2016 10:32 AM, Robert Anderson wrote: Only one line returned: postgres=# select * from pg_stat_activity where pid=3990; -[ RECORD 1 ]+ datid| 16434 datname | flip pid | 3990 usesysid | 10 usename

Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Robert Anderson
Only one line returned: postgres=# select * from pg_stat_activity where pid=3990; -[ RECORD 1 ]+ datid| 16434 datname | flip pid | 3990 usesysid | 10 usename | postgres application_name | psql client_add

Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Tom Lane
Robert Anderson writes: > There aren't transactions blocking: > postgres=# SELECT > postgres-#w.query as waiting_query, > postgres-#w.pid as waiting_pid, > postgres-#w.usename as w_user, > postgres-#l.pid as blocking_pid, > postgres-#l.usename as blocking_user, > postgres-#

Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Robert Anderson
Hi, There aren't transactions blocking: postgres=# SELECT postgres-#w.query as waiting_query, postgres-#w.pid as waiting_pid, postgres-#w.usename as w_user, postgres-#l.pid as blocking_pid, postgres-#l.usename as blocking_user, postgres-#t.schemaname || '.' || t.relname as

Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Melvin Davidson
Try the following query. See if it shows you if another transaction is blocking the needed locks to create the index. SELECT w.query as waiting_query, w.pid as waiting_pid, w.usename as w_user, l.pid as blocking_pid, l.usename as blocking_user, t.schemaname || '.' || t.relname as

Re: [GENERAL] Create index concurrently hanging with big table on pgsql 9.3.12

2016-05-09 Thread Joshua D. Drake
On 05/09/2016 05:04 AM, Robert Anderson wrote: Hi, We are trying to create a index concurrently but, at least apparently, it hangs in a infinite loop and never ends. Apparently how? How long did you wait? JD -- Command Prompt, Inc. http://the.postgres.company/