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:13, "Andres Freund" <andres@anarazel.de>:

On 2019-03-08 17:38:33 +0000, PG Bug reporting form wrote:

 The following bug has been logged on the website:

 Bug reference: 15678
 Logged by: Vasiliy Korotkikh
 Email address: dhaenoor@yandex.ru
 PostgreSQL version: 11.2
 Operating system: Debian Stretch
 Description:

 In the configuration file of my server there is the following line:
 default_transaction_isolation = 'serializable'


Did you reload the configuration after making that change? SELECT
pg_reload_conf();

Greetings,

Andres Freund