{"Entry":{"collection":"guc","key":"trace_notify","name":"trace_notify","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Developer Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"}],"content_hash":"05dbbb47670458d8dd737adafa94954e059051f0c004c47e46282400f2f155a0","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"off"}],"editorial":{"advice":{"olap":"Long analytical runs can amplify trace_notify's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users.","oltp":"Do not tune production OLTP with trace_notify. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward.","small":"Keep trace_notify at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation."},"mechanism":["trace_notify emits extensive internal debugging messages for LISTEN and NOTIFY. Output is visible only when client_min_messages or log_min_messages includes DEBUG1 or lower.","It traces implementation activity rather than providing a durable audit of notification payloads. The extra messages can be much larger than the application notification stream.","Use it to reproduce queue and delivery bugs in a controlled session. Queue capacity and cleanup are governed separately by max_notify_queue_pages and listener transaction behavior. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value."],"pitfalls":["Leaving trace_notify enabled after the bounded diagnostic or recovery task.","Running the experiment on the only copy of production data.","Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.","Treating a server that merely starts or completes a query as proof that data and behavior are correct."],"references":[{"title":"PostgreSQL 19 Beta 4: trace_notify","url":"https://www.postgresql.org/docs/19/runtime-config-developer.html#GUC-TRACE-NOTIFY"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["max_notify_queue_pages","notify_buffers","client_min_messages","log_min_messages","track_activities"],"summary":"trace_notify — Generates debugging output for LISTEN and NOTIFY. Observed in PG9.0–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"7.4","group":"Developer Options","group_slug":"developer","imported_at":"2026-09-27T17:57:32.188879+08:00","intro_commit":{},"key":"trace_notify","last_version":"20","max_val":"","min_val":"","name":"trace_notify","position":421,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Generates a great amount of debugging output for the LISTEN and NOTIFY commands.","short_desc_zh":"","source_rev":"english-manuals:e2da3ef539247da4b911c59d0df460bbcee8ebe6f7ca8e52b83421d49fe8cae5","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"trace_notify","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"trace_notify","SourceRevision":"english-manuals:e2da3ef539247da4b911c59d0df460bbcee8ebe6f7ca8e52b83421d49fe8cae5","Facts":{"boot_val":"off","category":"Developer Options","context":"user","description":"Generates a great amount of debugging output for the LISTEN and NOTIFY commands. client_min_messages or log_min_messages must be DEBUG1 or lower to send this output to the client or server logs, respectively.","doc":{"anchor":"GUC-TRACE-NOTIFY","file":"runtime-config-developer.html","lang":"en","sha256":"f5e7e39d176c642ac0799c87669ce2f6f60fcd97d109e290860ec74c36d7ecad","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"trace_notify","short_desc":"Generates debugging output for LISTEN and NOTIFY.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-TRACE-NOTIFY","file":"runtime-config-developer.html","lang":"en","sha256":"f5e7e39d176c642ac0799c87669ce2f6f60fcd97d109e290860ec74c36d7ecad","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"trace_notify","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"trace_notify","Summary":"","BodyHTML":"\u003cp\u003e为\u003ccode\u003eLISTEN\u003c/code\u003e和\u003ccode\u003eNOTIFY\u003c/code\u003e命令生成大量调试输出。\u003ca href=\"/docs/18/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES\" rel=\"nofollow\"\u003eclient_min_messages\u003c/a\u003e或\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-MIN-MESSAGES\" rel=\"nofollow\"\u003elog_min_messages\u003c/a\u003e必须是\u003ccode\u003eDEBUG1\u003c/code\u003e或者更低才能把这种输出分别发送到客户端或者服务器日志。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"93aaf5d1d6e0a414d23099aef49a333ffd696227e35cfccdd6b12690ad61e3eb","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e为\u003ccode class=\"command\"\u003eLISTEN\u003c/code\u003e和\u003ccode class=\"command\"\u003eNOTIFY\u003c/code\u003e命令生成大量调试输出。\u003ca href=\"/docs/18/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES\"\u003eclient_min_messages\u003c/a\u003e或\u003ca href=\"/docs/18/runtime-config-logging.html#GUC-LOG-MIN-MESSAGES\"\u003elog_min_messages\u003c/a\u003e必须是\u003ccode class=\"literal\"\u003eDEBUG1\u003c/code\u003e或者更低才能把这种输出分别发送到客户端或者服务器日志。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
