pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_prepared_statements
3+ messages / 2 participants
[nested] [flat]

* pg_prepared_statements
@ 2020-01-21 03:00 rob stone <floriparob@gmail.com>
  2020-01-21 03:18 ` Re: pg_prepared_statements David G. Johnston <david.g.johnston@gmail.com>
  2020-01-21 03:22 ` Re: pg_prepared_statements David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: rob stone @ 2020-01-21 03:00 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

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.


TIA,
Robert







^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_prepared_statements
  2020-01-21 03:00 pg_prepared_statements rob stone <floriparob@gmail.com>
@ 2020-01-21 03:18 ` David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: David G. Johnston @ 2020-01-21 03:18 UTC (permalink / raw)
  To: rob stone <floriparob@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

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.

https://www.postgresql.org/docs/12/view-pg-prepared-statements.html

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

David J.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_prepared_statements
  2020-01-21 03:00 pg_prepared_statements rob stone <floriparob@gmail.com>
@ 2020-01-21 03:22 ` David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: David G. Johnston @ 2020-01-21 03:22 UTC (permalink / raw)
  To: rob stone <floriparob@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Mon, Jan 20, 2020 at 8:00 PM rob stone <floriparob@gmail.com> wrote:

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

This has nothing to do with the feature that the pg_prepared_statements
view tracks.

It is for the two-phase commit prepared transactions, not prepared
statements.

https://www.postgresql.org/docs/12/runtime-config-resource.html#GUC-MAX-PREPARED-TRANSACTIONS


David J.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-01-21 03:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21 03:00 pg_prepared_statements rob stone <floriparob@gmail.com>
2020-01-21 03:18 ` David G. Johnston <david.g.johnston@gmail.com>
2020-01-21 03:22 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox