{"kind": "metric", "major": "18", "item": {"slug": "pg_stat_activity-query_id", "name": "pg_stat_activity.query_id", "name_zh": "", "category": "pg_stat_activity", "summary": "Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured.", "aliases": ["query_id", "pg_stat_activity"], "content_hash": "ff1a6763ad91b7d866126d0d9e5bc75e20511945d972e65addabbc75ca2911f6", "versions": {"14": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=14", "label": "pg_stat_activity columns"}, {"url": "/docs/14/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "/docs/14/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 14 English manual", "sha256": "1852c6205d68e465d08dd8f75e3b6bfdd4a475ee8d79886e2dcff6bff8e2d243"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/14/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}, "15": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=15", "label": "pg_stat_activity columns"}, {"url": "/docs/15/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "/docs/15/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 15 English manual", "sha256": "034c0a2e99e6707e637bf4d6cfd819d39eddc1b4b7c1ec2a00f0b4f0fdb0a078"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/15/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}, "16": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=16", "label": "pg_stat_activity columns"}, {"url": "/docs/16/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "/docs/16/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 16 English manual", "sha256": "a4c274defe8a41ff2895040cd542b5499063b844669ff3336de1a1317c3fe086"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/16/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}, "17": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=17", "label": "pg_stat_activity columns"}, {"url": "/docs/17/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "/docs/17/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 17 English manual", "sha256": "007af6e8ab39b925963273ec3ba7f06f8ee6fbfaad821f07a1dc78383dbb9b99"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/17/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}, "18": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=18", "label": "pg_stat_activity columns"}, {"url": "/docs/18/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 18 English manual", "sha256": "aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/18/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}, "19": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=19", "label": "pg_stat_activity columns"}, {"url": "/docs/19/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "/docs/19/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 19 English manual", "sha256": "26e1b6632bdf05ebe081987cb60ab4ded526eec7db73e41316fbd69466c494fe"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/19/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}, "20": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=20", "label": "pg_stat_activity columns"}, {"url": "/docs/devel/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "/docs/devel/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 20 English manual", "sha256": "dfc27a108b70bdf88f310801ae3db011a8f608befd927722e5f3e9bdcc070251"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/devel/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}}}, "snapshot": {"view": "pg_stat_activity", "facts": [{"label": "View", "value": "pg_stat_activity"}, {"label": "Field", "value": "query_id"}, {"label": "SQL type", "value": "bigint"}, {"label": "Units named in the field definition", "value": "Not specified"}, {"label": "Reset observation", "value": "No stats_reset field is documented for this view"}], "field": "query_id", "tables": [], "related": [{"url": "/wiki/catalog/pg_stat_activity/?v=18", "label": "pg_stat_activity columns"}, {"url": "/docs/18/monitoring-stats.html", "label": "Statistics collection and reset functions"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", "path": "monitoring-stats.html", "label": "PostgreSQL 18 English manual", "sha256": "aa979eed08627fbf715a9d792094a162a73671db5af810f3ab2aad3e073d5722"}], "sections": [{"title": "View semantics", "paragraphs": ["The pg_stat_activity view will have one row per server process, showing information related to the current activity of that process."]}, {"title": "Collection and reset context", "paragraphs": ["Read the same-version statistics collection and view documentation below for reset scope and visibility. No per-field reset rule is inferred from the field name."]}, {"code": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "title": "Inspect this field", "paragraphs": ["Example query; no execution result or measured value is asserted."]}], "sql_type": "bigint", "signature": "SELECT query_id FROM pg_catalog.pg_stat_activity;", "documented": true, "description": ["Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured."], "manual_html": "", "manual_path": "/docs/18/monitoring-stats.html", "source_only": false, "comparison_data": {"view": "pg_stat_activity", "field": "query_id", "sql_type": "bigint", "units_mentioned": []}, "comparison_hash": "6fd7daab7056bf39750f38aec38beff4f76f2affe3a73bd26de506aac97b57fa", "units_mentioned": []}, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}