Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEiGJ-0000Qs-AT for pgsql-general@arkaria.postgresql.org; Wed, 24 Feb 2021 00:42:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lEiGH-0001xy-Us for pgsql-general@arkaria.postgresql.org; Wed, 24 Feb 2021 00:42:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEiGG-0001xp-B0 for pgsql-general@lists.postgresql.org; Wed, 24 Feb 2021 00:42:41 +0000 Received: from [64.147.123.25] (helo=wout2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEiGD-00010G-Ml for pgsql-general@lists.postgresql.org; Wed, 24 Feb 2021 00:42:39 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D93CDC94; Tue, 23 Feb 2021 19:42:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 23 Feb 2021 19:42:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=T WCHIV75VQeJCX49SrDCi/JrgR0HHEGFwopPTbjlXc4=; b=ITN82o5lYEJcIpvWq oUSu6cffV5q/v9pIB0k8id8QldrK4Bh2ZlZpbShn9ebgrqEO6yRKaaP2POHNGaye 0xycLoGSZUiT8YG0XST3PebV6HgDqcj+yvKjxxefNbEIcXgloNNjPoIW1fQNelKX yKZ7dsdZ43sSp2SOto+8k/V4pViCWqsLMuhb4Y6YonOCIzZNl3X1467l4u3yyRaD VL9oGVeWNGmae0gJ8+JSjYFw3VoQrZUnXBzB7tu0heL3gBy8SpYmXyBGZ6hrpJ0d 1xEEuyJbe9MZU60cSnxngoQQUMZmLh/W0Rb6LYWp1mtPYz0Ve0s5EJQdw1oCYCns X6kwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=TWCHIV75VQeJCX49SrDCi/JrgR0HHEGFwopPTbjlX c4=; b=UjMAtMuaM6QKEqEW2x+bJtmyuTlnj78TgND1WMXECHtdKgQc+U9b4AP8s Ud7T6ND1moJaFEcU0wxCz6PE1CDCWuww5Mhwq4SXwR7TLD2yS4JJl5wcY/UnsEA/ aYqUhIntiacc0wF2+1I6XOf8K1NgudZYfKbh7x7Lw7x0rhUSqIvLvZFsn8QotspU UUC8rYsZ9v2AfZQYp4hS+jdk5W+QC5brrCdxiIvqSnBqIVDXglyxEFRqcg1RXySa Y86Z4ZsV/JS5y/sNeRpy/MWrKMWK54Z2M9bOAh7cxjcBKmmStDqyaleiNZDlItYG AtgURND3Pn76bNknyq7xp7ziYOPRA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeeigddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeevveefveefue egffekkefhgeeiueffgfetueejvdfghfeujeejhfekjeelgedtgeenucfkphepleejrddu udefrddvudejrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.4] (97-113-217-27.tukw.qwest.net [97.113.217.27]) by mail.messagingengine.com (Postfix) with ESMTPA id 4348C240064; Tue, 23 Feb 2021 19:42:24 -0500 (EST) Subject: Re: pg_restore - generated column - not populating To: Santosh Udupi Cc: Tom Lane , pgsql-general@lists.postgresql.org References: <89a62c70-4386-a3ef-f2ea-5e0f448cef11@aklaver.com> <0275a27c-2447-f8e5-489b-d7e419997299@aklaver.com> <3874667.1614101644@sss.pgh.pa.us> <3877970.1614105611@sss.pgh.pa.us> <72424ae7-0c66-5377-7db9-48425b853dd9@aklaver.com> <344c6530-cabf-12df-6814-401a7eb8a800@aklaver.com> From: Adrian Klaver Message-ID: Date: Tue, 23 Feb 2021 16:42:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/23/21 4:25 PM, Santosh Udupi wrote: > Yes,  this is what we have been doing now:- Backup using pg_dump, create > the new database at the destination, manually create the tables which > give problems, and then do the pg_restore. Another solution for us is to Well that introduces another error, where the restore trips on the existing table(s). By the way this is the first time you mentioned multiple tables. Do they share similar structure? In any case you should not have to do this and in the spirit of identifying the problem and fixing it, what happens if you do: 1) Dump locally 2) Restore locally, without creating the tables ahead. 3) Examine and report back here the table(s) schema(and sample data) after the fresh restore. 4) Drop the table(s) and create from script and populate. Report on whether they work. > backup using pg_dump that comes with pgAdmin (Windows), rsync it to the > destination server and then do the pg_restore on the server. > -- Adrian Klaver adrian.klaver@aklaver.com