Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNOWt-000798-3j for pgsql-performance@arkaria.postgresql.org; Thu, 15 Nov 2018 20:46:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gNOWr-0000gZ-1z for pgsql-performance@arkaria.postgresql.org; Thu, 15 Nov 2018 20:46:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNOWq-0000da-Gc for pgsql-performance@lists.postgresql.org; Thu, 15 Nov 2018 20:46:20 +0000 Received: from mail-it1-x142.google.com ([2607:f8b0:4864:20::142]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNOWm-0003ox-Fo for pgsql-performance@lists.postgresql.org; Thu, 15 Nov 2018 20:46:18 +0000 Received: by mail-it1-x142.google.com with SMTP id t190-v6so31488014itb.2 for ; Thu, 15 Nov 2018 12:46:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :in-reply-to:user-agent; bh=ZBEEMBGWdX3LJ518SpY6ZkPUR0lB3rIFYHasVNA74ZM=; b=1vfN7ZfohBzhz344MmsXLnX2rKUyooYucC0PIhGGmGGD4hpypTGrWyMQAhIrJH9xNo QzOUqt62at0hWtsQOvLAwwLVVEoK62Tga6GC2fq/Wkb/fei7VNuL0qstNAXQRxkvI142 Fi1X7bWkSzCdB5/lTGoGc7Qgtcn0hl4Oy3NHe25P/ZfgssAltYNWKpoSCStBcw8n3n30 TlWxz/vMR4JGktVIJcobhs/h5qkSoxfrf75njiOdRf/m0GrH7XhqyFsDviQNgpbOHSkO cQX4YFK+EzQHIngbMkyyy1H5HwxkGqjItfKc5dnoGpYKNaCg1QdxbKaPM+z0xhv+UbDb VrBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:in-reply-to:user-agent; bh=ZBEEMBGWdX3LJ518SpY6ZkPUR0lB3rIFYHasVNA74ZM=; b=WR08+hC1QNtfMZZwPxGAksIiGX6so+hN9w7EuCkTIKhMhHEn1We03XCBiWm89n89Tv Eev3ZpPZ/mpayl29bUQhpbEb8hstKn2i5ksbLyQcU/oJga8KNT44sQhHIzlNqNtsDbFG S+hA4ZpfCEJaqkrQx+LgMx8wColpcu3BW+FpMMxiLr8DQGXgpBVoX9HICl4Hg2yILjF0 TUBnbepiG+D8gvqNyb9Qgai9UuFD/A8XsMPQ7IHpLAoN+roGPaRM1FoBLLHQCazNBIKh nXDTD8i6CHCNKzR7vDaexPffu9vrKy1Mem9RoM8+IzDA9m7bZmEcn0eVQC0YuLHp58gG COmg== X-Gm-Message-State: AGRZ1gLKY19Ya0wiS2Ge/POraiE/VVVZfRzVprZaa4/g5HUajR2AdYPm o7818gUJkaX0ScnBg9khpBuLkw== X-Google-Smtp-Source: AJdET5cHh06qlyK02PtQ5u4LTMMERy0mll67bcnhECzku/ybXBYUyWyt6RBUPOJzl+CP0HpMXnY3Jw== X-Received: by 2002:a24:46c2:: with SMTP id j185-v6mr7937100itb.42.1542314775201; Thu, 15 Nov 2018 12:46:15 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o14-v6sm9956554ito.3.2018.11.15.12.46.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 12:46:14 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 264E4804FC9; Thu, 15 Nov 2018 14:46:13 -0600 (CST) Date: Thu, 15 Nov 2018 14:46:13 -0600 From: Justin Pryzby To: Mariel Cherkassky , Sergei Kornilov Cc: pgsql-performance@lists.postgresql.org Subject: Re: checkpoint occurs very often when vacuum full running Message-ID: <20181115204612.GS16896@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7817341542313720@myt6-fe24916a5562.qloud-c.yandex.net> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, Please don't cross post to multiple lists. On Thu, Nov 15, 2018 at 08:53:14PM +0200, Mariel Cherkassky wrote: > Can someone explain the logic behind it ? I know that vacuum full isnt > something recommended but I found out that whenever I run vacuum full on my > database checkpoint occurs during that time every second ! well I know that > VACUUM FULL duplicates the data into new data files and then it deletes the > old data files. The writing the vacuum does, is it with the checkpoint > process ? It's a good question. What version postgres are you using, and what is the setting of wal_level ? On Thu, Nov 15, 2018 at 11:28:40PM +0300, Sergei Kornilov wrote: > Row location is data. For example, index lookup relies on TID (tuple id, hidden ctid column) - physical row address in datafile. But, since VAC FULL has an exclusive lock, and since it's atomic (it's either going to succeed and use the new table or interrupted or otherwise fail and continue using the old table data), I it doesn't need to write to WAL, except if needed for physical replication. Same as CREATE TABLE AS and similar. In my test, setting wal_level=minimal seemed to avoid WAL writes from vac full. https://www.postgresql.org/docs/current/populate.html#POPULATE-PITR Justin