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 1oOgnA-0002NV-6i for pgsql-general@arkaria.postgresql.org; Thu, 18 Aug 2022 14:46:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oOgn8-0007Zy-R9 for pgsql-general@arkaria.postgresql.org; Thu, 18 Aug 2022 14:46:38 +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 1oOgn8-0007ZS-BQ for pgsql-general@lists.postgresql.org; Thu, 18 Aug 2022 14:46:38 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oOgn5-0000yF-H2 for pgsql-general@lists.postgresql.org; Thu, 18 Aug 2022 14:46:37 +0000 Received: by mail-ej1-x636.google.com with SMTP id k26so3666898ejx.5 for ; Thu, 18 Aug 2022 07:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc; bh=yUttTC2wxOYV04hsSJB9EzH4OinN9JyZxxAg9T1cLkM=; b=XZWbsVNlUCiL+EdFfCYjPGZ2LoxxWMeELxmDqqjx6s0qjTT3RUAH5oNxISZPYCNryv QawKwStVQdP/R1iHvbtH/Q/FIE16GHZLb3Nuc7u4/wEVqPbG9mWNeIjEYdtszfbkItaK NiujfV0x/ZodIrMdBEk+Jro/IJoTc9+UZxCW5zZ/N8hIZYV37kg4KqbCziSek0MmFlio IhLOPv20bBW6rafz3m0uVuJUtnS+FHUJsxCQ8HYKAqI3a0NdIVVnZGtgLQ9ZU1/IUHnU qAxAxUHEYOGL4h5YSYNuyKPkrUBsLddap++6AYGx68WMKl00x6DXNkbD1aCL/csG+oaW 0OXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc; bh=yUttTC2wxOYV04hsSJB9EzH4OinN9JyZxxAg9T1cLkM=; b=gs5fbzNIyHf1JfuCLQJeecOoqs+dm3YjpjA1Ro6C2le8UVfrerHrbmQ4izygYB8LTs aMmcmkFlJl2CeVtdFUbel57aihqAjA7LCd9JjHAKaHI3/wFLRCI/V9XvF00nfhaKCP6I ExrHj31Sk98WivcK2EnjHecPtA/iy5d46lhVP6Ml+3MWJP0MyewlX96EHRW2VxwgzUTp zawyWHD2fzt94Mp81IY5Tn2/TpE85Hj46YPfJ9VjSwRlugG9Tv4fEeKpEkB0TIPnZEtT hKPlqJ6jEWfeVyq/kaou5bIbc+g10Tl2t0+d6QfY057jezUDn1yS/6a26U2MArOOAcN6 nkcA== X-Gm-Message-State: ACgBeo0MUJeTqZ+CNTW3VBCOBNrWWQoVtf7i13I7mXqWcg4Meyj7ac5F yzLWuHMY0HHfegy86y/rWbWTL69aHup50Q== X-Google-Smtp-Source: AA6agR6o+RleOYQBHNlX5dRmV3xXm8FcwdcasQtLOu1OvYhdlI0Ju3LF78BIw8J7DTcr8bevMgACbg== X-Received: by 2002:a17:907:9707:b0:731:51df:c094 with SMTP id jg7-20020a170907970700b0073151dfc094mr2047927ejc.695.1660833992962; Thu, 18 Aug 2022 07:46:32 -0700 (PDT) Received: from localhost.localdomain ([213.235.133.41]) by smtp.gmail.com with ESMTPSA id s13-20020a170906a18d00b0072af102e65csm912355ejy.152.2022.08.18.07.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 07:46:32 -0700 (PDT) Message-ID: <5f4e76c742f8fb81ef01abe3b8f51a1219a431a5.camel@cybertec.at> Subject: Re: Is it possible to keep indexes on different disk location? From: Laurenz Albe To: "W.P." , pgsql-general@lists.postgresql.org Date: Thu, 18 Aug 2022 16:46:27 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2022-08-18 at 08:39 +0200, W.P. wrote: > I have a PostgreSQL 11 server on OrangePi3 (ARM 64 bit, Armbian, PG from > distro). > > Database (all cluster) is located on USB disk. This approach give me > already 2 times loosing DB contents (it is a replica of DB on i7). > > But the whole thing (mainly indexes) is about 50G, and internal storage > is only 32GB. > > Is it possible to move  DB tables etc to this internal storage (sure > connection) and put only    indexes on USB  HDD? > > And will it help in case of losing connection to USB disk? (DB > recoverable instead of total crash)? I'd say that that is a bad idea. It would not be easy to recover from losing a tablespace, even if it contains only indexes. Get a real computer. Take backups regularly. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com