On Wed, Feb 19, 2020 at 10:05 AM Hamid Akhtar <hamid.akh...@gmail.com> wrote: > Attached is version 1 of POC patch for notifying of orphaned > prepared transactions via warnings emitted to a client > application and/or log file. It applies to PostgreSQL branch > "master" on top of "e2e02191" commit.
I think this is a bad idea and that we should reject the patch. It's true that forgotten prepared transactions are a problem, but it's also true that you can monitor for that yourself using the pg_prepared_xacts view. If you do, you will have a lot more flexibility than this patch gives you, or than any similar patch ever can give you. Generally, people don't pay attention to warnings in logs, so they're just clutter. Moreover, there are tons of different things for which you should probably monitor (wraparound perils, slow checkpoints, bloated tables, etc.) and so the real solution is to run some monitoring software. So even if you do pay attention to your logs, and even if the GUCs this provides you sufficient flexibility for your needs in this one area, you still need to run some monitoring software. At which point, you don't also need this. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company