On Mon, Feb 26, 2018 at 10:02 PM, Dave Page <dpage@pgadmin.org> wrote:
Argh, I ran some tests, but didn't spot any lost messages in the tests I ran. I'll revert the patch.
Khushboo;
Please look at the following:
- Fix the patch so it doesn't drop messages.
Fixed.
By default, the notice attribute of the connection object of psycopg 2 only stores 50 notices. Once it reaches to 50 it starts from 1 again.
To fix this I have changed the notice attribute from list to deque to append more messages. Currently I have kept the maximum limit at a time of the notice attribute is 100000 (in a single poll).
- Add regression tests to make sure it doesn't break in the future. This may require creating one or more functions the spew out a whole lot of notices, and then running a couple of queries and checking the output.
Added. With this regression test, the current code is failing which has been taken care in this patch.
- Check the messages panel on the history tab. I just noticed it seems to only be showing an even smaller subset of the messages.