Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qt0QC-00ARSc-Tb for pgsql-admin@arkaria.postgresql.org; Wed, 18 Oct 2023 06:52:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qt0QA-000ZrC-W9 for pgsql-admin@arkaria.postgresql.org; Wed, 18 Oct 2023 06:52:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qt0QA-000Zqk-Ia for pgsql-admin@lists.postgresql.org; Wed, 18 Oct 2023 06:52:47 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qt0Q8-0012rs-GX for pgsql-admin@lists.postgresql.org; Wed, 18 Oct 2023 06:52:45 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9ba1eb73c27so1059170366b.3 for ; Tue, 17 Oct 2023 23:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1697611963; x=1698216763; darn=lists.postgresql.org; 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=tuUsS/TFX2h3Z1RPMIO8741r/su+9ixhMXM7+wMIDC4=; b=e+zdY5vCXBSbWD7mViyppjkTjQzQY8xQf8rWhYFRSpvUc+y4tkEnb6KcB0lzp+ZkyI VVWrCz/DHvwx+z7IMV9ju8WIbHJMiQHJRsP2nnGWkMrdTOnAhQjIICUX0/K6XaP5+YPr AXt3ZxipLf4WZ4690X6cpxj+jYj79QfUt0DqByO5kOWGinxXk81f71mH9CVVe9gTZQ9y b6KPAKnuEGKMmVfufMrpGKZPLI3b40v5+8RH+FHW7RUuCQ7VPT33VK/Vm8+/t8UCGqw4 5/ZV6VC+WNXhcPWtSL6gmEx1Ze8rolLEVzzl9t0aLpmWQ3oKcMF488F1hNdSWKDRBTcC NbQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697611963; x=1698216763; 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=tuUsS/TFX2h3Z1RPMIO8741r/su+9ixhMXM7+wMIDC4=; b=LnR0KqRkVAfNMBhIGd2beK2TA4mJjI9lMzT4LyWPvJ5peh4XUAYU1bKUSoTkHk7zjC 6pOIzv/POxxH1i6OQMJZfh6TICE/qusKqt03bTDYK8/Ib2Mj5qUdOwb9ql2lJONzRhvN goYIHpN3ByfVL1vG3rCJ6ufgPn0xp2fTNYJQKb7QLvvvDJllKv5PSonrNR1kQMH7nFjx agkA39GxkMGASfDz7dBCamZvq87D6FK6xavFmrht+GvXskoRs0J4zVSGGv30O8IJhkUe 74koX+NSG/+3pWsgwf1VBhmOAruGAqyLDENGCVholkPuVOXBgFId4HkaXNZ+ih4qH07B DdcQ== X-Gm-Message-State: AOJu0YzqBOzH1mrrNLK4NPbhViaR6/zilgATGO2rKlllWyZBc25DLX+a nxd9FCONV/oL18UAxK9HunyMDw== X-Google-Smtp-Source: AGHT+IE6SZPZD+5FS/QC/C14BKB8sqLKkpmTdiO3m0ZW0pVlibQKdRBYJncQxeX7Feevb9MTN722ww== X-Received: by 2002:a17:907:7ba7:b0:9a1:af6f:e373 with SMTP id ne39-20020a1709077ba700b009a1af6fe373mr3959973ejc.42.1697611962743; Tue, 17 Oct 2023 23:52:42 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:5123:586b:5da6:49f1:3286]) by smtp.gmail.com with ESMTPSA id ch3-20020a170906c2c300b0099ce188be7fsm1016951ejb.3.2023.10.17.23.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 23:52:42 -0700 (PDT) Message-ID: <2f4c4edac9196af943d8097150f65fa96f7ea97e.camel@cybertec.at> Subject: Re: Table health From: Laurenz Albe To: Rajesh Kumar , Pgsql-admin Date: Wed, 18 Oct 2023 08:52:41 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-10-17 at 23:23 +0530, Rajesh Kumar wrote: > I have been asked to check table health of specific big table. >=20 > What are list of things I have to check? Look at pg_stat_all_tables to see if the number of dead tuples is excessive and if autovacuum and autoanalyze are running as they should. Look at pg_class to see if "relfrozenxid" and "relminmxid" are far from the danger zone. Run the function pgstattuple_approx() to see if the table is bloated. Yours, Laurenz Albe