Amigão! Utilize da seguinte forma: "Create index concurrently..." Se estiver usando Linux indico você a executar tal comando diretamente do bash do seu servidor, dessa forma as tabelas não são bloqueadas, estamos falando de um índice relativamente grande, então, vale também fazer um tunning, da uma lida sobre "indice condicional", dependendo dos dados seja o seu caso.
Obs: CONCURRENTLY When this option is used, PostgreSQL will build the index without taking any locks that prevent concurrent inserts, updates, or deletes on the table; whereas a standard index build locks out writes (but not reads) on the table until it's done. There are several caveats to be aware of when using this option — see Building Indexes Concurrently <https://www.postgresql.org/docs/9.1/static/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY> Em 11 de out de 2017 8:20 PM, "Euler Taveira" <[email protected]> escreveu: > Em 11 de outubro de 2017 20:04, Neto pr <[email protected]> escreveu: > >> >> A linha do comando CREATE INDEX está identificada com o fundo laranja. >> EU verifiquei que o comando está com estado Ativo, mas não sei se está >> aguardando algo, podem me ajudar a análisar o resultado anexo. >> >> Você não informou o sistema operacional mas se for Linux: > > # strace -p 1234 > > onde 1234 é o PID da conexão (que você pode obter no pg_stat_activity). Se > for outro sistema operacional tais como FreeBSD, AIX ou Solaris, use truss. > > > -- > Euler Taveira Timbira - > http://www.timbira.com.br/ > PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento > <http://www.timbira.com.br> > > _______________________________________________ > pgbr-geral mailing list > [email protected] > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral >
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
