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 1tqkxs-009mzO-Ni for pgsql-general@arkaria.postgresql.org; Sat, 08 Mar 2025 03:35:04 +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 1tqkxr-006pYi-20 for pgsql-general@arkaria.postgresql.org; Sat, 08 Mar 2025 03:35:03 +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 1tqkxq-006pWT-NK for pgsql-general@lists.postgresql.org; Sat, 08 Mar 2025 03:35:02 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqkxo-001bq4-0x for pgsql-general@lists.postgresql.org; Sat, 08 Mar 2025 03:35:01 +0000 Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-3d03d2bd7d2so20173225ab.0 for ; Fri, 07 Mar 2025 19:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741404900; x=1742009700; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MCiXQU4GC5a91kW65DB/6qloml6fQVGVza5VXFCRy/g=; b=I+oI03w/6yr6rXNYSmKG/aEizSwQcjyapg7PBVSGpS9Mz/pN0XUztPRIdV/JnqTjSB A9998IjKol4Lq0Bg9Ln3G1JqEdd3un4DTKoZ0ZS2LnUhtg3/MrNWBxKOm68g8d+auGpe kiNxKyzNMr8DYq0IcUbqA0xseOK7sGwpPO29tbJ69oeLqEDJypvi5dtmSoLy+CFlItxh mNyt0BiCE8f8BfV8pGhPToXHJHnd/r2kqCFakUWYKXLTUBEnL5iyFDZM+Q08mBlubpCY VJZjvmWVFkLAQxbg8YfjdNEuMcNaDpp8oRJk7LZXw9xA5OFnheFdTThKvDEruWJruTIm V+SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741404900; x=1742009700; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MCiXQU4GC5a91kW65DB/6qloml6fQVGVza5VXFCRy/g=; b=uySPBwjttJFyszMZCjFZsYaglSCDLbI0yBLfLvAe7hoPRCKWdYqXphgfo7wJ+dBHOw dXWRqWU2n/R04bwNrnFXXTJPyy+80g6oWFKU6t4AdVRIC1L2LjkktA6vSl5/ZxB7JLzu q+OKIsXLHDEf1gG59201FktVLtXp8dKDB952Xy1o3IM4D+v8YC+ilhEQAWi2TtCLq2Vc iuGrFHsgIaP0U3EGktnwvcN29sxxznGZf6FYPwRMVpmsvXtPtHtjixRgA/h+YV4ra06j D63V2Vr689qKUMwCG2wInOHV3Bz4cSTMEA+lXZKD5ooxD2qvdmKFy+OIQG4CD+Yh/m7p lBLg== X-Forwarded-Encrypted: i=1; AJvYcCWP59W7vEYE/z/0ci9usZKPQaEMjsJXSszasrXaUjaXjVKccq1ABu1z2LpGBSZ2cJUB14wZbzRXzCZnnWk4@lists.postgresql.org X-Gm-Message-State: AOJu0Yx5OdbqPW3FTxh74qL39UqeYfc2lFy6G5W3FtzHL/uNEZ5uEKLL vpbUuAyMCfa5eYxCQPa43wgPd7fP5kfPclVBa9Ut9zF3CjCrakHd4ESOEgMIvIfb4Cf7Cq7HR0O q5lv+YMKGuxCHbLHZ5PCPEfq9CLY= X-Gm-Gg: ASbGncuDxSH9w7Yp08vpim4vJqSuM8WrewGpINfLrd8o5F2tB+f45cso/SAL/icaIDd Q8N8yYt1rIZi8RbxXSm4ruc1XXSq2rR+eFCAOJVr4RPaZosiTI65GFG5jnAp0UHPomPpSCOnn2V LWGMfZJps7LK+T0fvrEwsrjMYpvtnXYnmnapXj0elfL6bz3+8qm5Jw60EgEOfq X-Google-Smtp-Source: AGHT+IEfmjnfpkgferClfrIvU/Q5PX9jwWNVGRq6xwxiUz4AZWGLIX+dRNzWw7FeOUO39xj5WPS8EZAmZqjJBj6PIJo= X-Received: by 2002:a92:ca49:0:b0:3d0:1fc4:edf0 with SMTP id e9e14a558f8ab-3d44192aa05mr82334335ab.15.1741404899679; Fri, 07 Mar 2025 19:34:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Fri, 7 Mar 2025 22:34:22 -0500 X-Gm-Features: AQ5f1Jrlp_k6qljWTG-1ZFXCoj2qpPS0xXh5AiJC63gUtw9BhpMyceXppn9YlFI Message-ID: Subject: Re: No. Of wal files generated To: Atul Kumar Cc: Ron Johnson , pgsql-general Content-Type: multipart/alternative; boundary="00000000000074a5fa062fcc6c4e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000074a5fa062fcc6c4e Content-Type: text/plain; charset="UTF-8" Take a look at the pg_stat_archiver view, if you have not already: https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ARCHIVER-VIEW So I want to check how many wal file got created in x minutes and how many > .ready files got created in those x minutes. > It's not clear why you would want to track .ready files, they should be quite transient, and not a concern unless you are rolling your own archiving system (which you should not be). But Ron's suggestion of inotifywait is a good one for this. Probably listed as inotify or inotify-tools in your packaging system. Basic usage would be something like this, from the data directory: timeout 10m inotifywait pg_wal/ -r -m -e close_write -o walinfo.log Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --00000000000074a5fa062fcc6c4e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Take a look at the pg_stat_archiver view,= if you have not already: