Re: Track pgsql steps

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: Track pgsql steps
Дата
Msg-id CAOBaU_Ze2sTDZBRt=xaT6YLj0BXSBmy0L5C1es5nT2VDPS9U-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Track pgsql steps  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы RE: Track pgsql steps  (Olivier Leprêtre <Olivier.Lepretre@noetika.com>)
Список pgsql-general
On Wed, Jul 29, 2020 at 7:58 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> On 7/29/20 8:44 AM, Olivier Leprêtre wrote:
> > Hi,
> >
> > 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.
> >
> > Do you see any solution in this purpose ?
>
> RAISE NOTICE?:
>
> https://www.postgresql.org/docs/12/plpgsql-errors-and-messages.html#PLPGSQL-STATEMENTS-RAISE

You can also abuse SET application_name, as the value will be directly
seen by other transactions.  You're quite limited in the number of
bytes to use, but if you just need to do some quick testing it can be
helpful.



В списке pgsql-general по дате отправления:

Предыдущее
От: "Daniel Westermann (DWE)"
Дата:
Сообщение: Re: Out of memory with "create extension postgis"
Следующее
От: "Zwettler Markus (OIZ)"
Дата:
Сообщение: How to find out why user processes are using so much memory?