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 1pHnSy-0007kR-6i for pgsql-general@arkaria.postgresql.org; Tue, 17 Jan 2023 15:01:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHnSx-0002MZ-2l for pgsql-general@arkaria.postgresql.org; Tue, 17 Jan 2023 15:01:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHnSw-0002MQ-Oz for pgsql-general@lists.postgresql.org; Tue, 17 Jan 2023 15:01:34 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pHnSu-0005Li-C6 for pgsql-general@lists.postgresql.org; Tue, 17 Jan 2023 15:01:34 +0000 Received: by mail-ej1-x630.google.com with SMTP id bk15so18489521ejb.9 for ; Tue, 17 Jan 2023 07:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=h/d6V/rOSXWI290iiSoLMfgr6/Uerv6L3H8+L1IxRHA=; b=iUgj+CBhMo9TDdwxo6Sd/rhyuX0GfK23lPuGlWEK5RQvwPoS2QrvjhmSTo5R/vzPYB MEz5KlMx+JqbcCplWYBXGDHqnD/77mGvPfPzwrDdxh4gSvFi0TyVs7mrM4u2qRRCWfyn jTaxx9tW/se02XRqBEmVapEcB/x58457F6dFR9Sy7ZrxATf7+N55t05A92Xa1nLKJcll UufTMS2kx06UFDdmH8z1zqFPpuFbWJ1WWSm/mpoRo7NE1McdxqybQeVh9WGLVnHHaqHb BzLe2/O7z6TTfmKwIDtTA9864o52blynHeN2+Pg9lK//0geA1r62xMlAhocQgIu3hP5b R8uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=h/d6V/rOSXWI290iiSoLMfgr6/Uerv6L3H8+L1IxRHA=; b=j4iEZUgBYIOq37CK23w1Iw6rHx5wISajJ61F4YBpdSDW1FUPRzif/L5/1LtEw7Brvc UczqnicDduWyWbtONwKGLkXSi20HF6gP7acHyQntk2+AxZTRLI1yz96RlPlcyRs9W+nD AQS+3kIMISqWseaUygNnNu8p4xlUqkWK/CcH3NHF5IE5R0thNOgk74x0SvHk2q0OqO6k tFh71+RkaoeVTrTuT/QRetTGlJ1haYtckcZJ6rwDl0vypkaDzTXkhLv4uc3vUlo7U7pr WKtLnZW0v361mUIS3RmeCLnLy3D/PWA+Tce/2BtUmpqu72Hh9yY5fYMefNlZtuQVJEz+ qfhw== X-Gm-Message-State: AFqh2ko+3985BJ1rIbysLO0JjlCbrGC/hStZQ14dmZgDKkV+oEOU8cx6 G4w3YUnGWtZXUy1tJJFLrohCGomVEDRWHmxS X-Google-Smtp-Source: AMrXdXvO19MWuvaHZCcxczuVHLvl5jvY0eV28q9YYUJXNgmTvD5pU72Ci4KVneB8eJpyKX0F6/n+jA== X-Received: by 2002:a17:907:8999:b0:84d:463f:3787 with SMTP id rr25-20020a170907899900b0084d463f3787mr3172603ejc.5.1673967691480; Tue, 17 Jan 2023 07:01:31 -0800 (PST) Received: from dynamic-pd01.res.v6.highway.a1.net ([2001:871:5e:539:1b2c:c52a:475d:310c]) by smtp.gmail.com with ESMTPSA id s16-20020a1709067b9000b00872eb47f46dsm843438ejo.19.2023.01.17.07.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 07:01:31 -0800 (PST) Message-ID: <1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at> Subject: Re: Tablespace OID, database OID, relfilenode From: Laurenz Albe To: Wiwwo Staff , pgsql-general@lists.postgresql.org Date: Tue, 17 Jan 2023 16:01:30 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-01-17 at 15:48 +0100, Wiwwo Staff wrote: > Quick and to the point: >=20 > If i execute=20 > select pg_relation_filepath('pgbench_accounts'); >=20 > I get > =C2=A0pg_relation_filepath > ---------------------- > =C2=A0base/5/16398 >=20 > where "base" is tablespace, but not tablespace OID, nor tablespace name. > How do I link it to get from "base" the tablespace OID? >=20 > Or, in other words, given table=C2=A0 pgbench_accounts, how do I get tabl= espace OID, > database OID and relfilenode so that I can use this info to filter output= of pg_waldump? The tablespace OID is 1663, since "base" is the default tablespace "pg_defa= ult". Yours, Laurenz Albe --=20 Cybertec | https://www.cybertec-postgresql.com