> If you upgrade to 12.6 or 12.7, does it work?
Good afternoon, David.
After updating to 12.7, the bug really disappeared:
postgres=# select version();
version
------------------------------------------------------------
PostgreSQL 12.7, compiled by Visual C++ build 1914, 64-bit
(1 строка)
postgres=# create table t_tmp (a int);
CREATE TABLE
postgres=# create index on t_tmp (a);
CREATE INDEX
postgres=#
postgres=# create temporary table t_tmp (like t_tmp including all);
CREATE TABLE
postgres=#
postgres=# select *
postgres-# from pg_catalog.pg_indexes
postgres-# where tablename like 't_tmp%';
schemaname | tablename | indexname | tablespace
| indexdef
------------+-----------+-------------+------------+-------------------------------------------------------------
public | t_tmp | t_tmp_a_idx | | CREATE INDEX
t_tmp_a_idx ON public.t_tmp USING btree (a)
pg_temp_3 | t_tmp | t_tmp_a_idx | | CREATE INDEX
t_tmp_a_idx ON pg_temp_3.t_tmp USING btree (a)
(2 строки)
Do I understand correctly that the solution in my case is to upgrade to
at least 12.6?