Postgresql installation pg_stat_statements

Source: Internet
Author: User

Pg_stat_statements is an extension module of postgresql. It mainly records the running information of SQL statements. This module must add shared_preload_libraries to postgresql. conf, and the database needs to be restarted. download the source code of the installation module, decompress my directory in/home/postgres/postgresql-9.3.2/contrib/pg_stat_statements make & make install in the installed database directory/opt/pgsql9.3.2/share/extension there are pg_stat_statements -- 1.1. SQL instructions that the installation is successful go to the database and execute create extension pg_stat_statements; 2. add related parameters in the configuration file # postgresql. conf shared_preload_libraries = 'pg _ stat_statements'
Pg_stat_statements.max = 10000 pg_stat_statements.track = all 3. Start the database. Note that the custom_variable_classes = 'pg _ stat_statements' parameter pg_stat_statementsColumns does not need to be added in version 9.3.

Pg_stat_statements (9.3)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.