Re: pg_prepared_statements - Mailing list pgsql-general

From David G. Johnston
Subject Re: pg_prepared_statements
Date
Msg-id CAKFQuwb_wjhWQb87mA_QPhvO0g8+OHHpy5=rCJOW3FhsVgRg7A@mail.gmail.com
Whole thread Raw
In response to pg_prepared_statements  (rob stone <floriparob@gmail.com>)
List pgsql-general
On Mon, Jan 20, 2020 at 8:00 PM rob stone <floriparob@gmail.com> wrote:
Hello,

PostgreSQL 11.6 (Debian 11.6-2~sid1) on x86_64-pc-linux-gnu, compiled
by gcc (Debian 9.2.1-21) 9.2.1 20191130, 64-bit

Is there something awry with the pg_prepared_statements view?
This is the only row found and it is NOT created by the application.

name    statement       prepare_time            parameter_types from_sql
S_1     ROLLBACK        2020-01-21 12:35:35.031257      {}      false


In the development environment every statement is logged, however for
some reason the DEALLOCATE's never appear in the logs. This could be
caused by the view not recording the prepared statement, as the
DEALLOCATE is only made if the prepared statement name exists in the
view.

max_prepared_transactions = 6 is the value set in postgresql.conf.

I don't know why that particular record exists but your comment about the application not creating it and DEALLOCATE's never appearing in the log suggests to me a misunderstanding of what this view shows.


Specifically it is not a "log" in the transaction sense and its only shows current session data.

David J.

pgsql-general by date:

Previous
From: rob stone
Date:
Subject: pg_prepared_statements
Next
From: "David G. Johnston"
Date:
Subject: Re: pg_prepared_statements