pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Нагель Михаил <Misha_Nagel@mail.ru>
To: David Rowley <dgrowleyml@gmail.com>
To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17009: create temporary table with like option using same name as persistent table does not create indexes
Date: Fri, 14 May 2021 13:55:17 +0300
Message-ID: <48379e12-4a9d-954e-78ce-2298f27cf67c@mail.ru> (raw)
In-Reply-To: <CAApHDvpxmRbTBYfJvZCcSEP5eO4CHZiZ9KdY6zyBxhx8hOx=cQ@mail.gmail.com>
References: <17009-b364ef2e97142a54@postgresql.org>
	<CAApHDvpxmRbTBYfJvZCcSEP5eO4CHZiZ9KdY6zyBxhx8hOx=cQ@mail.gmail.com>


> 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?






view thread (4+ messages)  latest in thread

Message-ID: <48379e12-4a9d-954e-78ce-2298f27cf67c@mail.ru>
Permalink:  ../48379e12-4a9d-954e-78ce-2298f27cf67c@mail.ru/
Also on:    postgresql.org/message-id/48379e12-4a9d-954e-78ce-2298f27cf67c@mail.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Misha_Nagel@mail.ru, dgrowleyml@gmail.com
  Subject: Re: BUG #17009: create temporary table with like option using same name as persistent table does not create indexes
  In-Reply-To: <48379e12-4a9d-954e-78ce-2298f27cf67c@mail.ru>
  References: <17009-b364ef2e97142a54@postgresql.org> <CAApHDvpxmRbTBYfJvZCcSEP5eO4CHZiZ9KdY6zyBxhx8hOx=cQ@mail.gmail.com> <48379e12-4a9d-954e-78ce-2298f27cf67c@mail.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox