Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNi6M-0005b3-6I for pgsql-general@arkaria.postgresql.org; Fri, 16 Nov 2018 17:40:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gNi6K-0001NC-FE for pgsql-general@arkaria.postgresql.org; Fri, 16 Nov 2018 17:40:16 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNi6I-0001GP-Fq for pgsql-general@lists.postgresql.org; Fri, 16 Nov 2018 17:40:16 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNi6E-0005vZ-0A for pgsql-general@lists.postgresql.org; Fri, 16 Nov 2018 17:40:14 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 4A59421D45; Fri, 16 Nov 2018 12:40:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 16 Nov 2018 12:40:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imap.cc; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=o M0CkVGqAuW5P8GGVebtYOfBdCYQMzI1OWxhd3VvL5I=; b=Yht3PXWTKlHu6PWoW FQn8Gmszqd2G+++qB3uhoaqUuAmHvKbnzG4IlYKfh/YuQ3iNlqcdXYf1m5LdNR/Z +prkS5ceYVAN3V3FjKemyfa8a0ECcNgWQuqoTUNOqotsdlWcql/Et5daxTpW30BQ mTsmsJVwV2DrTAXQbhhKf3uq0b2iewF7xUKAx2tGRiVNnDlKik0xabCkpjueSoub hRlEVgsmgrj3GVruMI91+4hwDPFpid0ZBg6Y2SpEY6SfU5FKbAPI+igjShlY60Cy 6Z3TAjNx1SLvmMxJvWyRaigfpU3EfhiJl0mIF5axrDnd11w3DAdYgSuiYXh0L3ij GanAw== 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=fm1; bh=oM0CkVGqAuW5P8GGVebtYOfBdCYQMzI1OWxhd3VvL 5I=; b=OTSVxvMyfng/jtef08rLB4lpMZMI+ahh1SkSxNp9GaXDWYrmwrn0ou6ux oqe+dlHLHHmBI0OTWVOHEETjcak2JvQ7StG2rDYIRwaNfU1Q03nd6shrkrzQg/Im DUde8o6SHQC2w3d07aW3gNiM7mWzzn6Zidl9H9b+oflfNv+euc7Nc8aXBtILwK0c MrFrf/9JgKBctII2KNV/G4WNAfUm2O2/WrzDn43FHxz3uxwDLULVPlIS96+F+ZIE bUWLJzac/f+nKE2tb3oioaHwYLybvBZa0X4/lKfsBEpjzyznwjrKF1CzpvsC5QIM 7eEfOgF8KWegXABdx1VlkuBbQb9Bw== X-ME-Sender: X-ME-Proxy: Received: from [10.2.33.124] (unknown [185.25.33.70]) by mail.messagingengine.com (Postfix) with ESMTPA id 43E8CE4AB8; Fri, 16 Nov 2018 12:40:07 -0500 (EST) Subject: Re: Question about index on different tablespace and rebuild it To: Condor , Tony Shelver Cc: pgsql-general@lists.postgresql.org References: <816583dfa3eb6ce411cc7c987aabc4c4@stz-bg.com> From: Alexey Bashtanov Message-ID: <6ade500f-cbe2-cb5e-8382-4b6a01ccf6df@imap.cc> Date: Fri, 16 Nov 2018 17:40:06 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > Yes, I know. My question is: Did the pg server will start at all if > the NVME / table space somehow is broken and indexes is unable to be > loaded, not how to drop an index. > Since the Postgre server is not starting at all maybe I can try > dropping my indexes on my pocket calculator all day long. > > When the data is separated, is there any other tool that can rebuild > my indexes located on broken tablespace, having of course in mind, > that Data in > the index is stored separately from the table. I guess the pg server > wont start and for that reason I try to explain and wonder if the data > and index is separated > probably pg devs have a way to rebuild these indexes somehow when pg > server is offline. > Unfortunately it doesn't sound like something feasible to me, at least without deep hacking of postgres itself. To start after a crash, the server needs to apply the WAL records since last checkpoint, and they need data files to be binary the same as before the crash. So the index file not only needs to be there and not too corrupted, but should have its pages and their contents to be located physically in the same order, which depends on the prior history of the table updates. Postgres manual explicitly warns that all the tablespaces need to be preserved in order to started the server. The only possible exclusion may be temp_tablespaces and unlogged and temporary tables -- kind of grey zone, people do it but the manual don't allow this trick. See also https://blog.2ndquadrant.com/postgresql-no-tablespaces-on-ramdisks/ Best regards,   Alexey