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 1tBGAp-002leL-E5 for pgsql-general@arkaria.postgresql.org; Wed, 13 Nov 2024 16:24:54 +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 1tBGAm-00FWS0-RL for pgsql-general@arkaria.postgresql.org; Wed, 13 Nov 2024 16:24:53 +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 1tBGAl-00FWRj-T7 for pgsql-general@lists.postgresql.org; Wed, 13 Nov 2024 16:24:53 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBGAj-001guE-Dj for pgsql-general@postgresql.org; Wed, 13 Nov 2024 16:24:51 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id C4AAE13806BC; Wed, 13 Nov 2024 11:24:48 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Wed, 13 Nov 2024 11:24:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1731515088; x=1731601488; bh=gQuoqYqEMzW92RDQVy3itxfgoIkJVIeuVollqvTJTwM=; b= GPELiNSbMIU4LV8YE5XTqcvAsNx9mK9w7tMZJ27P8ecKXUxMD9LaQVu2AQYOtuAJ J6HS1H932ivL0p+4qdampGx5nnChkx+wXVZFK6nK5Bq2hQu9M96+nfifs2X51xhu w6TnQCeeklHE6hU1dIRfOAaNuUnuzVwZsHwrTLgss3kNJQhADnOnIFcsSlKcgOUa dWwOiZ+FOD/NDdNI6+Q5uKTqfSHcIqdgBZyJIPOdVUhMJSpAKtv2BQI1oeKUzphC mXqd/0RqjQtHHbgKrW6Goc40h2OmIS3iyn5nfDAMTogQYQ9w7C1RXm84olSARZYR 5g1IkIlR5M3JiqrLpoOD/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1731515088; x=1731601488; bh=g QuoqYqEMzW92RDQVy3itxfgoIkJVIeuVollqvTJTwM=; b=m/HB8c/t3cu6hC9wi zQWngKsNWCzmzKIRBYnGnK55T3vZAZ2Db3LJr7sW7gORgmG3m8u0P+VsNhDg9EPx c6tZ/gLUPvqldtyQO7Kk4BqI4NhAg5zQI+7BgyYDC2k5zRq03PkjpGg+tCQ+Htm2 888Eaz9TDJFoy+IYgwZu2Sr2iv97CZz/+1Rr2Dt76mr6bra5ujwYYfZYeaIuiRT1 x5CiLLj3tYBLDWta+RjOm+6xDKJEjJpMsm1fSS1Sfjwr88Pl8McucMx0Nd9fE3xY NGDF4yEfZI7R5oBZKLtIpxMVheMemtLymHAPd8V7m3UGqDaNP2unoNMYB/6TsHSl fodNg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvddtgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuf fvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcu oegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtth gvrhhnpeelgeevkeekkeeuiefgtdevieeluefhfedufeetkeejffekjeeujeehgeehgeek tdenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhes rghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepkhhumhgrrhgusggrvdejrdhpohhsthhgrhgvshhqlhesghhmrghi lhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvsh hqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Nov 2024 11:24:48 -0500 (EST) Message-ID: <303a72f9-19f8-4ea8-bded-416632ba6c72@aklaver.com> Date: Wed, 13 Nov 2024 08:24:47 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: DB wal file disabled --_Query To: jayakumar s , pgsql-general@postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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=# 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=# > > postgres=# 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