Re: [GENERAL] Monitoring and insight into NOTIFY queue

2016-06-08 Thread Matthew Kelly
I just ran into monitoring this and came up with the following 1 liner for monitoring this in releases < 9.6 through the SQL layer. Once you are at 9.6 Jeff Janes solution is correct. It does make the assumption that the queue size is 8GB. It can misjudge the queue usage by up to one file seg

Re: [GENERAL] pg_base_backup limit bandwidth possible?

2015-01-02 Thread Matthew Kelly
The way I’ve solved the problem before 9.4 is to use a command called 'pv' (pipe view). Normally this command is useful for seeing the rate of data flow in a pipe, but it also does have a rate limiting capacity. The trick for me was running the output of pg_basebackup through pv (emulates havi

Re: [GENERAL] The dangers of streaming across versions of glibc: A cautionary tale

2014-08-07 Thread Matthew Kelly
We are currently running with the en_US.UTF-8 collation. It was a decision made long ago, and seeing as we never actually rely on the sort order of internationalized strings (other than for stability, apparently), we have never had any motivation to change this practice. Some way of versioning

[GENERAL] The dangers of streaming across versions of glibc: A cautionary tale

2014-08-06 Thread Matthew Kelly
The following is a real critical problem that we ran into here at TripAdvisor, but have yet figured out a clear way to mitigate. TL;DR: Streaming replicas—and by extension, base backups—can become dangerously broken when the source and target machines run slightly different versions of glibc.