Tuesday, August 12, 2008

Re: [pgadmin-support] run-away query

I stopped the query this morning after 24 hours of running, restarted
pgadmin and restarted the postgresql server.

I ran the query again and it went relatively quickly (only 1.3 hours).

I don't know what went wrong, but apparently something did.

Sim

Sim Zacks wrote:
> I am running a query in PGAdmin.
> I changed the storage on a bytea field from External to Main and then ran
> update dbmail_messageblks set messageblk=messageblk || '';
> so that it would move all the rows to the new storage.
> This is a very large table, so I actually expect it to take a long time.
> The table has approximately 200,000 rows
>
> select max(length(messageblk)),avg(length(messageblk)) from
> dbmail_messageblks
> MAX AVG
> 532259; 48115.630147120314
>
> The query has been running for 6.5 hours now and in the status bar of
> the query tool it says "Query is running" and the count in ms is still
> running.
>
> I had checked a number of times using select * from pg_stat_activity and
> it was in there and running. The last time I checked the query was not
> listed in pg_stat_activity. In fact There is no row for that window. I
> have 3 windows open for that database, the one running the query, the
> one I queried pg_stat_activity from and another one.
> When I query pg_stat_activity it shows 2 rows for my ip address, the
> pg_stat_activity and an IDLE row. When I close the other window it only
> shows one row for my IP address.
>
> I also checked in Linux PS - my IP address only shows up in ps aux for
> the other windows, not for this 6.5 hour query.
>
> Is there any way to check what is going on?
>
> Thank you
> Sim
>
>
>

--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

No comments: