Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJahS-00070W-Th for pgsql-general@arkaria.postgresql.org; Mon, 05 Nov 2018 08:57:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJahR-0007gL-3J for pgsql-general@arkaria.postgresql.org; Mon, 05 Nov 2018 08:57:33 +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.89) (envelope-from ) id 1gJahQ-0007gC-Ny for pgsql-general@lists.postgresql.org; Mon, 05 Nov 2018 08:57:32 +0000 Received: from stz-bg.com ([2a02:6800:0:99::2] helo=mail.stzbg.com) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJahO-0001Zh-6N for pgsql-general@lists.postgresql.org; Mon, 05 Nov 2018 08:57:32 +0000 Received: from www.stz-bg.com (stz-bg.com [IPv6:2a02:6800:0:99::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: condor@stz-bg.com) by mail.stzbg.com (Postfix) with ESMTPSA id AF1402E1305 for ; Mon, 5 Nov 2018 10:56:57 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stz-bg.com; s=mail; t=1541408218; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=gtwZWsbqK1Lglrdx2FCLYee9Aizdpl4pVnkjAU5KEQ0=; b=SygNKAkwLBt7GrgfW+T6mZ4wGBEZnmfLQ21F1fXkiQQUd6CptVNxnWQru7CuO+iffIlqPi kdIZcsAmv1bh4JHAOIbJTEffjJlBSH07Zt0MPMNmTICrB8ghyEIOfisA7a01SOxaLqZ0Nd L5H1nLRUHYDfAxF4R6OG1pIkECqU8eY= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 05 Nov 2018 10:56:57 +0200 From: Condor To: pgsql-general@lists.postgresql.org Subject: Question about index on different tablespace and rebuild it Message-ID: <816583dfa3eb6ce411cc7c987aabc4c4@stz-bg.com> X-Sender: condor@stz-bg.com User-Agent: Roundcube Webmail/1.3.8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, I have a database that use index on different table space (nvme). I read documentation about table space and understand table space cannot be treated as an autonomous collection of data files. My question is: Is this always true ? I mean if I have table .. okay here is example: create table t1 ( i integer); create index t1_i_idx on t1 using btree (i) tablespace nvme; In this case only the index is on different table space nvme that is not part of data stored into table, I mean if I drop the index, data stored in table will still be untouched and not damaged. So in this case if I lost table space nvme that is stored into different nvme drive, can I insert new one and rebuild all index files with reindexdb for example or some other tool like mysql/mariadb for example myismcheck or something like that, that can rebuild index files when DB sever is offline ? Regards, HS