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.92) (envelope-from ) id 1j6cLA-0002h8-4j for pgsql-general@arkaria.postgresql.org; Tue, 25 Feb 2020 15:41:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j6cL8-0005PT-Ig for pgsql-general@arkaria.postgresql.org; Tue, 25 Feb 2020 15:41:42 +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 1j6cL8-0005PM-76 for pgsql-general@lists.postgresql.org; Tue, 25 Feb 2020 15:41:42 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j6cL5-0005ni-Q2 for pgsql-general@lists.postgresql.org; Tue, 25 Feb 2020 15:41:41 +0000 Received: by mail-wr1-x444.google.com with SMTP id g3so15222222wrs.12 for ; Tue, 25 Feb 2020 07:41:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=ZCyKiVLBdafWgZ6qGFdfq5pZccRIJGMpsxQnnUi6kH8=; b=EZ//kYLXN9ZIgyrgrf+VXxIzf6B8j5JlgbpwD/rUubZvs7/HmKvCQDtDR9DcnKykzg F1eGgaMtKJi4zRkVEyDR2IK0YpMkiCO4CPqXT2EarKty1swgSSINyvS5mYVVUYNiskSw qmd0CNidnGURm5AfN/kWtRPCUdyP7y7Rtzz0ye1WL5WGp56cZ3ewWUcs4TmJsLBbFDLk 6EQx6QEUg/xaEAYl0H8bcD132W0cb4eerxP8scuQ1ihzNTSxFO/BSdQgev+hNYU51lMA BJF39OlzOfZlO/KJiiw239Azr5rTA3+DFKg+f/THl3KN5B2M5+YRtpxLhNZtxo4IldB4 2CmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=ZCyKiVLBdafWgZ6qGFdfq5pZccRIJGMpsxQnnUi6kH8=; b=OCE+mEJ7wE0P5dF79rahFtrnnE+h45LsKIksbKvTC+6XsKftAskXdwGPRZCymNbzWI AemqVqecc9W3OgiA0HWwi3Vo4FnMQ8jmBC+7ocD/SE+C2lIiB5EEmmQna5R5idEHigfT K0cj2REao2aeRSShu16+SsGW4hpL0EcPVi5HO8qSu13mngv5IWY7nDs9cCJCN1Zedq/O InUrCjqRpnkqgwI+f4kQkDbcRfUWnf3hwJ4CznzDKy76dsjCb8fOZPg1TC/9mUC5xuSR oGSF9jp9JjU/RSmM9YaTwuM7+0FGLMbqvcNeqALRW+e/wMOBVv1rK1MtaeqodjoW5Pzp wsZA== X-Gm-Message-State: APjAAAXk2TRSSfqoAkIX8Bhw/LxoCjY0hZsFE4prAFU9km2pP86GTY6B nGat5yXDx3pCrQONAI/5Hxe8QFNo X-Google-Smtp-Source: APXvYqwBfZ2gjoOlqtWEu9H0BrqInN/dM/VBqwP10Rp1Nsi+7oO57FAC57X0/17rPJmpomka2rLVZw== X-Received: by 2002:a05:6000:100d:: with SMTP id a13mr1924433wrx.330.1582645298607; Tue, 25 Feb 2020 07:41:38 -0800 (PST) Received: from [192.168.1.8] (137-33-239-77.dyn.cable.fcom.ch. [77.239.33.137]) by smtp.gmail.com with ESMTPSA id l132sm4595019wmf.16.2020.02.25.07.41.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Feb 2020 07:41:38 -0800 (PST) From: =?utf-8?Q?Paul_F=C3=B6rster?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Highly academic: local etcd & Patroni Cluster for testing on a single host Message-Id: <51854B87-A964-4F64-8EC4-8ABF51A0716E@gmail.com> Date: Tue, 25 Feb 2020 16:41:37 +0100 To: pgsql-general@lists.postgresql.org X-Mailer: Apple Mail (2.3608.60.0.2.5) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I have set up an etcd & Patroni cluster on a single machine for testing = purposes as follows: /data/pg01a/db as data directory for the first "node" /data/pg01b/db as data directory for the second "node" I have set up Patroni to make each PostgreSQL database cluster archive = to its own destination, so they won't interfere with each other. All is = well and working fine so far. Failover/Switchover works, they are = syncing properly, etc. Now: Inside /data/pg01a and /data/pg01b I also have a directory ts, i.e. = /data/pg01a/ts and /data/pg01b/ts to simulate different filesystems. If I do a 'create tablespace' and specify its location, I must of course = specify either /data/pg01a/ts or /data/pg01b/ts. Files with Tables get created as usual, but since it's a replication = (sync, by the way), the other tablespace directory will not hold any = files, but instead, the replica uses the same files as does the master. Is there any way around that, i.e. make the replica use its own files? I = found a way to make each archive destination individual despite Patroni, = but I can't seem to find a way to do something similar to the = tablespaces. Even correcting the symlinks in ${PGDATA}/pg_tblspc = manually (and then restart) does not work. The explanation is simple: the location is stored inside the database = cluster information and is per definition the same across all nodes. So, = if 'a' is master and I do "create tablespace test location = '/data/pg01a/ts'" it creates files there with the replica 'b' using the = *same* destination. Still, is there a way to make each node store that information = individually? I know, this is highly academic but I only have a single = host to do etcd & Patroni cluster experiments on. Cheers, Paul=