Hi
seems similar to my bugreport 15585 [1] and few others threads.
This bug should be already fixed in stable branch and will be shipped in next minor release (11.3 in may). Thread with patch was here: https://www.postgresql.org/message-id/flat/20190207014719.GJ29720%40telsasoft.com
[1] https://www.postgresql.org/message-id/flat/15585-324ff6a93a18da46%40postgresql.org
regards, Sergei