Wim <wdh@belbone.be> writes:
> PS I created 4 indexes on the tables. I cannot cancel the query... It
> keeps running. Otherwise I thought of dropping the indexes, vacuum the
> table and re-create the indexes...
Sure you can cancel it (assuming you're running any remotely up-to-date
version of Postgres). If you didn't issue the vacuum command from an
interactive psql, the easiest way is to identify the backend running the
command and send it a SIGINT ("kill -INT pid-of-backend"). Be sure to
use SIGINT and not any other signal.
If what you're trying to do is a VACUUM FULL, dropping the indexes
should help. Plain VACUUM I'm not so sure is worth the trouble.
Also you might try increasing VACUUM_MEM setting before you try again.
regards, tom lane