Problem solved.
The reason was that I used pgcli.
When I use psql, everything works as it should.
I assume that pgcli chooses transaction isolation level by itself.
 
https://www.sql.ru/forum/1310005/funkciya-v-pg11-2-ne-zapuskaetsya-s-urovnem-izolyacii-serializable
 
Thank you!


08.03.2019, 22:36, "David G. Johnston" <david.g.johnston@gmail.com>:

On Fri, Mar 8, 2019 at 11:11 AM PG Bug reporting form
<noreply@postgresql.org> wrote:


 The following bug has been logged on the website:

 Bug reference: 15678


 P.S. If in the future you want to get more sensible error reports, then you
 should think about a few examples. People understand examples better than
 lengthy documentation descriptions.


Likewise a self-contained executable example makes diagnosing bug
reports considerably easier. As Andres said this is likely a caching
issue related to when changed settings take effect after making a
physical change.

David J.