{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886", "published": "2026-10-30T12:17:45Z", "publisher": "PostgresAI", "article": {"title": "PostgreSQL to SQL Field Notes: Connections", "url": "https://devblogs.microsoft.com/azure-sql/pg-to-sql-connections", "date_published": "2026-10-06T16:39:17Z", "author": "Jerry Nixon", "publisher": "Azure SQL Blog"}, "grade": "A-", "axes": [{"axis": "Factual", "summary": "A \u00b7 0 wrong of 14 checked \u00b7 0 caveats"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 14 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 14 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "C \u00b7 0 wrong of 6 checked \u00b7 0 caveats \u00b7 transparency: claims dated, interest disclosed missing \u00b7 partly assessed"}, {"axis": "Safe", "summary": "A \u00b7 0 checked \u00b7 partly assessed"}], "findings": [{"anchor": "F1", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F1", "claim": "\u2026PostgreSQL connections are dedicated backend processes with private memory and execution state\u2026", "title": "Physical PostgreSQL connections receive backend processes", "explanation": "PostgreSQL starts a backend process for each physical client connection. BackendStartup launches that process. PostgresMain creates backend-local memory contexts for command processing.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/start.sgml#L100-L130", "label": "REL_18_6 \u00b7 doc/src/sgml/start.sgml:100-130"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L3554-L3577", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:3554-3577"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4347-L4373", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4347-4373"}]}, {"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F2", "claim": "\u2026plus OS scheduling and context-switching overhead\u2026", "title": "Backend processes incur CPU and context-switch costs", "explanation": "Backend resource accounting tracks user CPU time, system CPU time, and context switches. The article\u2019s cost expression is qualitative. It does not establish a cost per connection or a comparison with SQL Server.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L3554-L3577", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:3554-3577"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4347-L4373", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4347-4373"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L5147-L5155", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:5147-5155"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L5095-L5120", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:5095-5120"}]}, {"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F3", "claim": "\u2026the default max_connections is typically only 100\u2026", "title": "max_connections typically defaults to 100 and affects shared allocation", "explanation": "max_connections defaults to 100 in guc_tables.c. initdb can choose a lower value. Changes take effect at server start. MaxConnections contributes to MaxBackends, which determines shared PGPROC allocation.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L703-L713", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:703-713"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2332-L2339", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:2332-2339"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/init/postinit.c#L553-L565", "label": "REL_18_6 \u00b7 src/backend/utils/init/postinit.c:553-565"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/proc.c#L95-L107", "label": "REL_18_6 \u00b7 src/backend/storage/lmgr/proc.c:95-107"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L704-L706", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:704-706"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L703-L707", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:703-707"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2332-L2337", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:2332-2337"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F4", "claim": "\u2026PostgreSQL connection limits are cluster-wide, not database-level\u2026", "title": "Databases share max_connections capacity", "explanation": "max_connections limits concurrent connections across the database server. PostgreSQL also enforces database-specific CONNECTION LIMIT settings. Those settings restrict admission within the shared server ceiling. They do not allocate another max_connections allowance.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L703-L713", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:703-713"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/lmgr/proc.c#L324-L332", "label": "REL_18_6 \u00b7 src/backend/storage/lmgr/proc.c:324-332"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/init/postinit.c#L375-L402", "label": "REL_18_6 \u00b7 src/backend/utils/init/postinit.c:375-402"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/alter_database.sgml#L125-L137", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/alter_database.sgml:125-137"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F5", "claim": "SELECT * FROM pg_stat_activity;\u2026", "title": "pg_stat_activity supports the displayed monitoring query", "explanation": "pg_stat_activity exists and exposes state, query, and xact_start. Its documented states include active, idle, and idle in transaction. xact_start records the current transaction\u2019s start time. The displayed SELECT references this built-in view.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L878-L904", "label": "REL_18_6 \u00b7 src/backend/catalog/system_views.sql:878-904"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L900-L935", "label": "REL_18_6 \u00b7 doc/src/sgml/monitoring.sgml:900-935"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L846-L855", "label": "REL_18_6 \u00b7 doc/src/sgml/monitoring.sgml:846-855"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F6", "claim": "\u2026pg_cancel_backend()\u2026", "title": "pg_cancel_backend cancels the target session\u2019s current query", "explanation": "pg_cancel_backend accepts a backend PID and sends SIGINT. The documentation defines its effect as canceling that session\u2019s current query. Its appearance in a list of connection-management functions does not promise session termination.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L28679-L28698", "label": "REL_18_6 \u00b7 doc/src/sgml/func.sgml:28679-28698"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L129-L164", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:129-164"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F7", "claim": "\u2026pg_terminate_backend()\u2026", "title": "pg_terminate_backend terminates the target session", "explanation": "pg_terminate_backend accepts a backend PID and sends SIGTERM. Its documented purpose is terminating the session associated with that process. The article correctly identifies it as a connection-management function.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L28757-L28787", "label": "REL_18_6 \u00b7 doc/src/sgml/func.sgml:28757-28787"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/signalfuncs.c#L230-L278", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/signalfuncs.c:230-278"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F8", "claim": "\u2026PgBouncer, the popular PostgreSQL connection pooler\u2026", "title": "PgBouncer pools PostgreSQL server connections", "explanation": "PgBouncer 1.26.0 documents itself as a PostgreSQL connection pooler. Applications connect to it. PgBouncer can reuse an existing physical connection to PostgreSQL instead of opening another connection.", "verdict": "Accurate", "sources": [{"url": "https://github.com/pgbouncer/pgbouncer/blob/7d38761c8f6c757238fde9f942cf9fe0cd272ae3/doc/usage.md#L20-L53", "label": "pgbouncer@pgbouncer_1_26_0 \u00b7 doc/usage.md:20-53"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F9", "claim": "Long-running transactions can retain old row versions\u2026", "title": "Long transactions can delay tuple cleanup and freezing", "explanation": "PostgreSQL considers backend xmin and transaction IDs when computing cleanup horizons. VACUUM cannot advance FreezeLimit beyond OldestXmin. Open transactions can retain visible row versions and contribute to table bloat. The article correctly states these effects conditionally.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/ipc/procarray.c#L1790-L1845", "label": "REL_18_6 \u00b7 src/backend/storage/ipc/procarray.c:1790-1845"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/vacuum.c#L1203-L1209", "label": "REL_18_6 \u00b7 src/backend/commands/vacuum.c:1203-1209"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10325-L10380", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:10325-10380"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F10", "claim": "Idle connections still consume resources\u2026", "explanation": "An idle connection retains its backend process and backend memory contexts. REL_18_6 start.sgml:110\u2013118 describes per-connection processes. postgres.c:4349\u20134370 initializes command-loop memory contexts. These ranges do not quantify idle CPU or memory costs.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/start.sgml#L100-L130", "label": "REL_18_6 \u00b7 doc/src/sgml/start.sgml:100-130"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/postmaster/postmaster.c#L3554-L3577", "label": "REL_18_6 \u00b7 src/backend/postmaster/postmaster.c:3554-3577"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/tcop/postgres.c#L4347-L4373", "label": "REL_18_6 \u00b7 src/backend/tcop/postgres.c:4347-4373"}]}, {"anchor": "F11", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F11", "claim": "\u2026to reduce the number of physical connections reaching the server\u2026", "title": "PgBouncer can reduce physical PostgreSQL connections", "explanation": "PgBouncer 1.26.0 identifies itself as a PostgreSQL connection pooler. Transaction pooling assigns a server connection only during a transaction. This supports the article's conditional recommendation.", "verdict": "Accurate", "sources": [{"url": "https://github.com/pgbouncer/pgbouncer/blob/7d38761c8f6c757238fde9f942cf9fe0cd272ae3/doc/usage.md#L42-L42", "label": "pgbouncer@pgbouncer_1_26_0 \u00b7 doc/usage.md:42-42"}, {"url": "https://github.com/pgbouncer/pgbouncer/blob/7d38761c8f6c757238fde9f942cf9fe0cd272ae3/doc/usage.md#L21-L21", "label": "pgbouncer@pgbouncer_1_26_0 \u00b7 doc/usage.md:21-21"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F12", "claim": "PostgreSQL lets you raise that limit\u2026", "title": "PostgreSQL permits raising max_connections above its default", "explanation": "src/backend/utils/misc/guc_tables.c:2332\u20132337 defines 100 as the default and MAX_BACKENDS as the upper bound. max_connections requires a server restart.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L703-L707", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:703-707"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2332-L2337", "label": "REL_18_6 \u00b7 src/backend/utils/misc/guc_tables.c:2332-2337"}]}, {"anchor": "F13", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F13", "claim": "\u2026used to monitor sessions, their state, current queries, and transaction duration\u2026", "explanation": "pg_stat_activity exposes state, query, and xact_start. src/backend/catalog/system_views.sql:891\u2013900 lists those columns. Calculate elapsed transaction time from xact_start.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L846-L855", "label": "REL_18_6 \u00b7 doc/src/sgml/monitoring.sgml:846-855"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/monitoring.sgml#L714-L716", "label": "REL_18_6 \u00b7 doc/src/sgml/monitoring.sgml:714-716"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L891-L900", "label": "REL_18_6 \u00b7 src/backend/catalog/system_views.sql:891-900"}]}, {"anchor": "F14", "url": "https://pgtrue.postgres.ai/shared/brief/83f32a08-48b7-43ca-948b-ee55cd40e886#F14", "claim": "Increasing it also causes PostgreSQL to allocate more resources, including shared memory.", "title": "Raising max_connections increases allocated resources", "explanation": "doc/src/sgml/config.sgml:711\u2013713 explicitly links higher max_connections values to increased resource allocation, including shared memory.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L711-L713", "label": "REL_18_6 \u00b7 doc/src/sgml/config.sgml:711-713"}]}]}