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 1tBVvu-004KMf-18 for pgsql-general@arkaria.postgresql.org; Thu, 14 Nov 2024 09:14:33 +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 1tBVvq-002Owx-Nh for pgsql-general@arkaria.postgresql.org; Thu, 14 Nov 2024 09:14:31 +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 1tBVvq-002Owp-BN for pgsql-general@lists.postgresql.org; Thu, 14 Nov 2024 09:14:30 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tBVvi-001rPx-Tb for pgsql-general@postgresql.org; Thu, 14 Nov 2024 09:14:30 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ff550d37a6so3723141fa.0 for ; Thu, 14 Nov 2024 01:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731575663; x=1732180463; darn=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=HFZwEl7hSR3WWOO4FUhtP3dDepwkZW0RN9K22RR/7dM=; b=kdTSrsP9aXT2lNoNpWaC9Uvw+og4xUC9LcNuWI+nU2n72AxbuaYEW0GqaQLMvDtyuY tV2lA7DO5UaLXubtzsKLYQI+owHD/Z4M9xvC+hDQjc2VXo6oxxmbtRZfeTkqzgkguGO5 pHf+Sd7Sq1Pf99XNX+yfAJ4lAmS+fyWsDpYLaAaajp4Pmlby035FQ1qw7gKEx2YuaeQS xX9UsPfTv8bIuGc1/97T58dCg19GFsLrmf0bamH0EH2tpCaIptNXJWg+Uu4E05JGx2Jv fb6ypqCBFum0bJspYxWp9veG/Xm4YbEZocL8g6IKjoe5I1O6OMUER6mskE//2u3IqT9v omwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731575663; x=1732180463; 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=HFZwEl7hSR3WWOO4FUhtP3dDepwkZW0RN9K22RR/7dM=; b=FGucDKGebfcd9dO5NnEkRnvzgb6jv/kcK8Xpj416VDAsDhr7iMSeJImsFffkT7q6UT dUlP1OWHKmY93JuVMWhVIkjvGSfH6eeJyYobrVoh3d3nkkA5Soh/3mqpcAteG9ydcuff OlgidOgffRBEDdqh+NjlwmsDuRzntnVY0LbSeknOc8FqOh/DG8NLzyr4cQ6Ek5S1Kfjt N9fPLIyaIZz8OlXxpMNML4EwuRrplQmuu+6VtVLq5NKzofs95JFpgmktVbtvX6WhYF/7 g0oyj5J50lREzvPaIZMxfJscGagFvwkAENH9mU9pJdsWC/u+SK7RdxIBLiM07WmRYls+ 3mlw== X-Gm-Message-State: AOJu0Yw6Ih7PHi2HBdQojDDejEOUl+M+TrckNPiWNr/LX4ugCv+PwOXE C2tH9mQyhcAGjq4Jt/qKahtXKTpe3SekI2YhJqXRKvKiWGEG2DRuS3x4U5wU5vrDTFpJuxgIJbh XNe7DeytDmaKhDIn0F2ozeyshc6Gak2V1 X-Google-Smtp-Source: AGHT+IHRCsXSK70xFrnO7+4i+Im+iNXrmDAR5OvdH++/xNhHmUTHBgQ4B3uG5HxcoaZOYkPMES17eoEkK6dcSFDpyrA= X-Received: by 2002:a2e:be0c:0:b0:2fa:dc24:a346 with SMTP id 38308e7fff4ca-2ff201b7382mr112799641fa.21.1731575661395; Thu, 14 Nov 2024 01:14:21 -0800 (PST) MIME-Version: 1.0 References: <303a72f9-19f8-4ea8-bded-416632ba6c72@aklaver.com> In-Reply-To: <303a72f9-19f8-4ea8-bded-416632ba6c72@aklaver.com> From: jayakumar s Date: Thu, 14 Nov 2024 14:44:09 +0530 Message-ID: Subject: Re: DB wal file disabled --_Query To: Adrian Klaver Cc: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="00000000000033051a0626dbe068" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000033051a0626dbe068 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi All, Archive mode is already disabled. If more wal files will generate fs also reached 100 percent based on application data load. As updated archive enabled or disabled. Will any state wall file that will be generate correct? On Wed, Nov 13, 2024 at 9:54=E2=80=AFPM Adrian Klaver wrote: > On 11/13/24 08:15, jayakumar s wrote: > > Hi Team, > > > > We have disabled walfile ion database level. While I do manual switch > > wal file generating in wal file location. > > > > Here is my question if we disable it. Walfile won't generate am i > correct? > > > > Kindly clarify my doubts. > > > > postgres=3D# select name,setting from pg_settings where name like > 'archive%'; > > name | setting > > -----------------+------------ > > archive_command | (disabled) > > archive_mode | off > > archive_timeout | 0 > > (3 rows) > > The above is disabling the archiving of WAL files to another location. > WAL will still be written to pg_wal. > > What are you trying to achieve? > > You can specify individual tables be UNLOGGED as shown here: > > https://www.postgresql.org/docs/current/sql-createtable.html > > "UNLOGGED > > If specified, the table is created as an unlogged table. Data > written to unlogged tables is not written to the write-ahead log (see > Chapter 28), which makes them considerably faster than ordinary tables. > However, they are not crash-safe: an unlogged table is automatically > truncated after a crash or unclean shutdown. The contents of an unlogged > table are also not replicated to standby servers. Any indexes created on > an unlogged table are automatically unlogged as well. > > If this is specified, any sequences created together with the > unlogged table (for identity or serial columns) are also created as > unlogged. > " > > > > > > > > postgres=3D# > > > > postgres=3D# SELECT pg_switch_wal(); > > pg_switch_wal > > --------------- > > D/9D000000 > > (1 row) > > > > [postgres@xxxxxxxxx pg_wal]$ ls -lrt > > total 81920 > > drwx------. 2 postgres postgres 6 Oct 13 2020 archive_status > > -rw-------. 1 postgres postgres 16777216 Nov 13 20:47 > > 000000010000000D0000009F > > -rw-------. 1 postgres postgres 16777216 Nov 13 20:50 > > 000000010000000D000000A0 > > -rw-------. 1 postgres postgres 16777216 Nov 13 20:51 > > 000000010000000D000000A1 > > -rw-------. 1 postgres postgres 16777216 Nov 13 21:02 > > 000000010000000D0000009D > > -rw-------. 1 postgres postgres 16777216 Nov 13 21:02 > > 000000010000000D0000009E > > [postgres@# pg_wal]$ > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > --00000000000033051a0626dbe068 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi All,

Archive mode is already d= isabled. If more wal files will generate fs also reached 100 percent based = on application data load.

As updated=C2=A0archive enabled or disable= d. Will any state wall file that will=C2=A0be generate correct?

On Wed, Nov = 13, 2024 at 9:54=E2=80=AFPM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/13/24 08:15, jayakumar s wro= te:
> Hi Team,
>
> We have disabled walfile ion database level. While I do manual switch =
> wal file generating in wal file location.
>
> Here is my question if we disable it. Walfile won't generate am i = correct?
>
> Kindly clarify my doubts.
>
> postgres=3D# select name,setting from pg_settings where name like '= ;archive%';
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 name =C2=A0 =C2=A0 =C2=A0 | =C2=A0setting > -----------------+------------
>=C2=A0 =C2=A0archive_command | (disabled)
>=C2=A0 =C2=A0archive_mode =C2=A0 =C2=A0| off
>=C2=A0 =C2=A0archive_timeout | 0
> (3 rows)

The above is disabling the archiving of WAL files to another location.
WAL will still be written to pg_wal.

What are you trying to achieve?

You can=C2=A0 specify individual tables be UNLOGGED as shown here:

https://www.postgresql.org/docs/current/= sql-createtable.html

"UNLOGGED

=C2=A0 =C2=A0 =C2=A0If specified, the table is created as an unlogged table= . Data
written to unlogged tables is not written to the write-ahead log (see
Chapter 28), which makes them considerably faster than ordinary tables. However, they are not crash-safe: an unlogged table is automatically
truncated after a crash or unclean shutdown. The contents of an unlogged table are also not replicated to standby servers. Any indexes created on an unlogged table are automatically unlogged as well.

=C2=A0 =C2=A0 =C2=A0If this is specified, any sequences created together wi= th the
unlogged table (for identity or serial columns) are also created as
unlogged.
"




>
> postgres=3D#
>
> postgres=3D# SELECT pg_switch_wal();
>=C2=A0 =C2=A0pg_switch_wal
> ---------------
>=C2=A0 =C2=A0D/9D000000
> (1 row)
>
> [postgres@xxxxxxxxx pg_wal]$ ls -lrt
> total 81920
> drwx------. 2 postgres postgres =C2=A0 =C2=A0 =C2=A0 =C2=A06 Oct 13 = =C2=A02020 archive_status
> -rw-------. 1 postgres postgres 16777216 Nov 13 20:47
> 000000010000000D0000009F
> -rw-------. 1 postgres postgres 16777216 Nov 13 20:50
> 000000010000000D000000A0
> -rw-------. 1 postgres postgres 16777216 Nov 13 20:51
> 000000010000000D000000A1
> -rw-------. 1 postgres postgres 16777216 Nov 13 21:02
> 000000010000000D0000009D
> -rw-------. 1 postgres postgres 16777216 Nov 13 21:02
> 000000010000000D0000009E
> [postgres@# pg_wal]$

--
Adrian Klaver
adrian.klave= r@aklaver.com

--00000000000033051a0626dbe068--