Hi! 2011/7/6 Durumdara <durumdara@xxxxxxxxx>: >> Most importantly, PostgreSQL's "stored procedures" cannot control >> transactions. They cannot commit, rollback, or begin a new transaction. They >> have some control over subtransactions using PL/PgSQL exceptions, but that's >> about it. > > So: I tried it, I created a LOOP/END LOOP infinite procedure, and > after started with pgAdmin, I killed the pgAdmin. > > 8 minutes passed, but server process don't stop this procedure yet. > Have the process some "limit" on running? When the server kill this process? > Never because of "working state"? > > How to abort it without abort another sessions, or kill the server? Interesting: CREATE OR REPLACE FUNCTION a() RETURNS integer AS $BODY$BEGIN LOOP -- x END LOOP; return 1; END;$BODY$ LANGUAGE plpgsql VOLATILE COST 100; select a(); Then the server cannot abort my "query". Only statement limitation (timeout) helps in this situation. But I'm not sure what's this timeout meaning? What is the "statement" what measured? The main statement (which is visible as last Query in monitor)? Or substatements also measured one by one, no matter the main length? For example I have a complex stored procedure that call subqueries, to provide some records to main query. The timeout is affected on Total length of main Query, or resetted on each subselects (statements) I do in my STP? Thanks: dd -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general