Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da0g2-0005bI-Dm for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jul 2017 14:19:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1da0g1-0002Xr-LV for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jul 2017 14:19:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1da0g0-0002Vj-6Q; Tue, 25 Jul 2017 14:19:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1da0fs-0000tS-SP; Tue, 25 Jul 2017 14:19:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v6PEIwXN004793; Tue, 25 Jul 2017 10:18:58 -0400 From: Tom Lane To: =?UTF-8?B?WmVocmEgR8O8bCDDh2FidWs=?= cc: pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [SQL] =?UTF-8?Q?Postgresql_=E2=80=9Calter_column_type=E2=80=9D_creates_an_event_?= =?UTF-8?Q?which_contains_=E2=80=9Ctemp=5Ftable=5Fxxx=E2=80=9D?= In-reply-to: References: Comments: In-reply-to =?UTF-8?B?WmVocmEgR8O8bCDDh2FidWs=?= message dated "Tue, 25 Jul 2017 09:18:29 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4791.1500992338.1@sss.pgh.pa.us> Date: Tue, 25 Jul 2017 10:18:58 -0400 Message-ID: <4792.1500992338@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org =?UTF-8?B?WmVocmEgR8O8bCDDh2FidWs=?= writes: > => ALTER TABLE test ALTER COLUMN x TYPE integer USING > (trim(x)::integer);ALTER TABLE > Last command I've executed to alter column data type creates an event like > this: > BEGIN 500913table public.pg_temp_1077668: INSERT: x[integer]:14table > public.pg_temp_1077668: INSERT: x[integer]:42COMMIT 500913 > How could I find "real" table name using this record? Is there any way to > see real table name in fetched record? That is the real name --- table rewrites create a table with a temporary name and the desired new column layout, then fill it with data, then exchange the data area with the old table, then drop the temp table. Evidently logical decoding is exposing some of this infrastructure to you. I bet it isn't exposing the critical "swap data" step though, so I wonder how exactly a logical decoding plugin is supposed to make sense of what it can see here. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers