Simon Riggs <si...@2ndquadrant.com> writes: > Can we add something to memory contexts to make this fail every time?
No, not really. AFAICS the reason for Alvaro not seeing it must be that on his machine the new transaction happens to allocate its TopTransactionContext control block right in the same place where the old one was. We could have a debugging mode in which pfree'd space is never recycled for reuse (just filled with 0xdeadbeef or whatever and left to sit). But it would not be practical for anything except short debugging sessions. In fact, for a case like this, only *very* short debugging sessions, because you couldn't even recycle after transaction commit. So the chance of finding problems in seldom-exercised code paths, as this one is, would be pretty small anyway. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers