I have a rather long pgsql procedure and I would like to detect which step is currently executing (subscript 1,2,3…). Due to transaction isolation, it’s not possible to make it write in a table or get nexval from a sequence because values become available only after the complete end of the procedure.