pgsql: Fix crash of pg_stat_statements_info() without library loaded

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix crash of pg_stat_statements_info() without library loaded
Date: 2021-01-28 07:25:25
Message-ID: E1l51gD-0002jf-6n@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix crash of pg_stat_statements_info() without library loaded

Other code paths are already protected against this case, and _PG_init()
warns about that in pg_stat_statements.c. While on it, I have checked
the other extensions of the tree but did not notice any holes.

Oversight in 9fbc3f3.

Author: Jaime Casanova
Reviewed-by: Julien Rouhaud
Discussion: https://postgr.es/m/CAJKUy5gF4=_=qhJ1VX_tSGFfjKHb9BvzhRYWSApJD=Bfwp2SBw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bca96ddab57c7c64ce442b0f9f35558741c7f8bd

Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 5 +++++
1 file changed, 5 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Gierth 2021-01-28 11:35:53 pgsql: Don't add bailout adjustment for non-strict deserialize calls.
Previous Message Michael Paquier 2021-01-28 07:14:09 pgsql: Refactor SQL functions of SHA-2 in cryptohashfuncs.c