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 1vG9Y6-008rwQ-Hp for pgsql-admin@arkaria.postgresql.org; Tue, 04 Nov 2025 05:25:42 +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 1vG9Y5-00B7vW-F0 for pgsql-admin@arkaria.postgresql.org; Tue, 04 Nov 2025 05:25:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vG9Y5-00B7vI-2C for pgsql-admin@lists.postgresql.org; Tue, 04 Nov 2025 05:25:40 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vG9Y2-005sFq-05 for pgsql-admin@lists.postgresql.org; Tue, 04 Nov 2025 05:25:39 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4710022571cso47832035e9.3 for ; Mon, 03 Nov 2025 21:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1762233937; x=1762838737; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=ZFL9SaApJ1N0K+WjSI5pFijttR+7qRer26gQ+h/q9rg=; b=SsUJd1KSwSBAG4/Q004R3uMqEi8QehSzoOYYvMu0hWg/eba3gujWGmsc1AlEznTJu1 bl796D+OfZUzUSjPS3b9OXOU0kGSTVhDVpMxBP2+Pf+VsBUkyXvVTDSI3gInEOPnUv2Z RmhGBq+yEUV/OTYM/YW4lErhdKhZAZ7R+Apyyti7RM0H5/JOuZpLKX+TPUmxpK3qU9Bs yHt0xxAkG2TkeU5SFgplJrnPKrQvLyPZoHuqDzTAuD57eIAujzuDRNewbR7nFJEzmWpn 7HzLz+Px464hZtDxJADkC5dx88ajolYHZX2RsZnsJYyZ3dEdu1wCZmRw95wktYTR9aJr Tw0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762233937; x=1762838737; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZFL9SaApJ1N0K+WjSI5pFijttR+7qRer26gQ+h/q9rg=; b=mlO3MTUn2thwn0Ou7n2W3xyG78aJRbRe6k+KliNG1IMnJFcNq1gaarkA9LsezaGTWp XfM6m/bjc+inSep6/yOHHriTfhz0gc/6Ue+dUljSbIg/x7LdJOl7bp23eVQCgOIMtNRy 4nAjqX1Kmyk4O560qMaEKx3oJmdc/AcbgzKDGOSWI0T00y8PWB3aNGuUiUg6pBdiOpxf j7M95NqKaJbc2dSmB0GOWPAQ1E5bcDaEzIgtJ8jPkBf7u5KhRSZja2MxvGtvkryIObqy KhNi4Q2twNzG0xlPMfctrOLBDkO76Ih0Afa+aBjbFSe4EQ6NahvpX3ihP2qrWUKyt7XN 06Qg== X-Forwarded-Encrypted: i=1; AJvYcCUThzEtif32fQedtk+F1ZHTKa1oO0gLc+1ao1L6THxND/ADPcIuQ0m2fNX86c4Ku7RAQrV8S2SeF5+Jog==@lists.postgresql.org X-Gm-Message-State: AOJu0YxmeUI/oiAmlNjz15pjnlFkde8XAEslBMoSbIRW6hIpUY9askrE 3FOKmVewq/8bzufFn6LyV/JCgnVsdomYwVEcH3lDKCioJ7L+GetAgxQRVDjlns4ojgc22KBtyd0 dcdaZPrM= X-Gm-Gg: ASbGncupbwkVTUZZKaq6Q9fzD0hFmqeNDstpFU7yg6LqN0kXDJKZeRHXu62DFDO095d bCiuBkfSnhXrNWi459j7fUr7+dxUbL0Klz/t6Qlm1ABLq2wWdgwcDJATa9v8kItIkSXNdUIGj8E w3MBc//LODq3DxjYmrARUs6Ej4zPi7xp5sf/UjW4i03CmVYpKNnnh3o4ahe+ts6wWqkXgPopNNU Xw1xYE8eS/XuNfLqmJ5f6TIPoHAX0PcwjtK5tjkJ/kcR2VCFVg7qZ3vvjLxEdaj/buo6PQ5B4gt KRwBPJ+R0sOdCi1AhW5yYxoEgEUoRu3qyywvWoe4H/Q3sYdwU3VpPxUtcgwcI6wAqgnPa48aEQM Cn+GAwYhT3janyN7k6yaghvBZBGvSScjkNgIz9neNF+2d+DfIqnHAJEEDrwXWLINrsFLnF0y8ym PNCbe2jumRHg+26kyvdJC01f88204= X-Google-Smtp-Source: AGHT+IFaw49+fOWJOM6C7fVPEb8TfPOv6E9pholDqV9KiRiCdAz78GXFXloj48pmFyPQuCjfwWbmqQ== X-Received: by 2002:a05:600c:5387:b0:46e:1b89:77f1 with SMTP id 5b1f17b1804b1-477307c23d9mr131885955e9.9.1762233936567; Mon, 03 Nov 2025 21:25:36 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([46.226.60.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429dc2007afsm2387022f8f.44.2025.11.03.21.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Nov 2025 21:25:36 -0800 (PST) Message-ID: <42aa5759d334a7dad91b3142d3904b14ce3cf05f.camel@cybertec.at> Subject: Re: Postgres Load Profile From: Laurenz Albe To: Sam Stearns , Pgsql-admin Cc: Henry Ashu Date: Tue, 04 Nov 2025 06:25:35 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2025-11-03 at 14:56 -0800, Sam Stearns wrote: > Does Postgres have any tables you can query to find out information such = as: > =C2=A0* Logical reads > =C2=A0* Block changes > =C2=A0* Physical reads > =C2=A0* Physical writes > =C2=A0* Read IO requests > =C2=A0* Write IO requests > =C2=A0* Read IO (MB) > =C2=A0* Write IO (MB) > =C2=A0* User calls > =C2=A0* Parses (SQL) > =C2=A0* Hard parses (SQL) > =C2=A0* Executes (SQL) > =C2=A0* Transactions per second That smells like Oracle database. PostgreSQL does things differently, so not all of the above measures make s= ense. To make up, there are things that you should measure in a PostgreSQL databa= se that don't exist in an Oracle database. PostgreSQL doesn't do direct I/O, so it has no control over which read requ= ests actually cause I/O to happen and which ones can be satisfied from the kerne= l page cache. You can find statistics about read and write activity in pg_stat_database (per database) and pg_stat_statements (per statement). pg_stat_statements = will also tell you how often statements were executed. In PostgreSQL, statements are always planned, unless you explicitly use a prepared statement or run static SQL from a function. You might want to look at pg_stat_io for overall I/O statistics per operati= on and object type. You also should look at pg_stat_all_tables for activities per table, includ= ing the important VACUUM-related statistics. Yours, Laurenz Albe