A patch fixing this bughttps://stream.boxwatch.ru/message-id/flat/15738-21723084f3009ceb%40postgresql.org