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 1tKzuK-00C0BX-DA for pgsql-performance@arkaria.postgresql.org; Tue, 10 Dec 2024 13:04:08 +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 1tKzuH-004ABO-SH for pgsql-performance@arkaria.postgresql.org; Tue, 10 Dec 2024 13:04:07 +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 1tKzuH-004AAy-I6 for pgsql-performance@lists.postgresql.org; Tue, 10 Dec 2024 13:04:06 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tKzuG-0025E1-Bl for pgsql-performance@lists.postgresql.org; Tue, 10 Dec 2024 13:04:05 +0000 Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-8442ec2adc7so196461839f.2 for ; Tue, 10 Dec 2024 05:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733835843; x=1734440643; 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=4nCpjLahXWS3URE2m42j8gnzj7yJzCUa2/eJbj0yT5U=; b=AO1U3/QuMXlv8Fiit70QKTpz49K4y18oApDoCKWLLXGwydPdkhurPH26XnxNb5PBYs odo9WWGttDdBmnIWYzR0AQgGfk512kGYlZvIi2jwbMXEZAHeTHQEWCu3MNhks29QBKN2 FPqlpAg6fwH40mwh72VgBz8hRwQff+UNTSAVDSbie4AOQK8+ajDgGpkypkWO3WHaIjpd K0vlUXxVZ/nIyJKey72UvkUTps4mgPt7/H7gtC4W3RPLyZ5oHKQuJEEPJoZ+1QSfc75s rKdeF7DQ35+kZ62or1nntjFKOkH9FF81ojhEZrFea58qy38m4endt0KsjtYSnOFKbJDH Wfaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733835843; x=1734440643; 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=4nCpjLahXWS3URE2m42j8gnzj7yJzCUa2/eJbj0yT5U=; b=qUa9FgJNSZjSHyZD/FfrYLYM0J7YunP1gzPyH0hHSXYVefYBVwkLLIQ3PwaCTTk8+5 6K/dOvacMEgdVgzoqBGQrSRgyE6M1ytdZVsXrMx0dSV+rTsjo7Z7/4hTLAjA/ACeTh+P +bdge18vYeHYXztOyterHofCoGCfwr5jgO2/C8VXQDDsmEUkz8IgYfgfBlk+LD0wc85Z rB5slLK1a7s4h51uweV6wlZzTFmSco93V3tYphlhc/UzxEwOAYoDQ5TMhjziwqlkvlkJ wTlJuFIgJrijPJe0SA7ubTbm/Ld94BPt4oIWCmeeDHFze/+uvc7Y1t6o7+e7nuPw44p8 M7qA== X-Forwarded-Encrypted: i=1; AJvYcCXxmfSp19UjJcr2EaPeemub/D1uVvSb1y1MZqRpOAq4mWHeyQOqPqPNDfxxwo0zohs/8fDiW+7WH7g7PSYyBKWGLg==@lists.postgresql.org X-Gm-Message-State: AOJu0Yy3yMriEKh+PM/MpVLEkeSoItDA9B0gwjI5Hd38UkXYclQtJKnC 3Meow5woHVJxtTpCYouInHO7GmZ06W16DjW4GTguk64sp7IRP0D6mOXL1M70ZYmV8gCgC306QTT 1cdlSD+knG+yMW5QD2DueiW68FRY= X-Gm-Gg: ASbGncsTUGYlM+8BGsTuORB38+5mPoZwIkFXv+rek1n73+f/UErHFxqFZJOXgeT7g1L zqbhBc0IDED7qB2cp0mKcJkytnKg/Kx+9v20= X-Google-Smtp-Source: AGHT+IHaL48MUngZvL7KMz9exjvCuPx5qTyDeyV79bQ5c6SJZPC4iU8vzUV2HfsKmw6hxdGnt3wdk8HufVzrYy4esR8= X-Received: by 2002:a92:cd8f:0:b0:3a7:86ab:bebe with SMTP id e9e14a558f8ab-3a811df4537mr179811935ab.16.1733835843289; Tue, 10 Dec 2024 05:04:03 -0800 (PST) MIME-Version: 1.0 References: <5EE4CC0C-E624-4E82-A2E8-B2EBA44D3521@thebuild.com> <3908773.1733760455@sss.pgh.pa.us> In-Reply-To: From: Greg Sabino Mullane Date: Tue, 10 Dec 2024 08:03:28 -0500 Message-ID: Subject: Re: PostgreSQL and a Catch-22 Issue related to dead rows To: Lars Aksel Opsahl Cc: Tom Lane , Christophe Pettus , "pgsql-performance@lists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000089d33e0628ea1dfa" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000089d33e0628ea1dfa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 10, 2024 at 3:55=E2=80=AFAM Lars Aksel Opsahl wrote: > Is it difficult to add parameter like force-dead-rows-removal that we sen= d > to the vacuum job that will remove this rows like this ? > > I'm still not sure what the ask here is - complete literal removal of the dead rows? That's not how PG works. I'm wondering if we are not in an XY problem. Your queries are slow, and you think it's because of autovacuum's output re dead rows. But let's take a step back and look at the actual queries being run that are slowing down. Perhaps there are other solutions: less indexing, more freezing, smarter updates, different partitioning, tweaking fillfactor, etc. etc. There are lots of things we can try that will be orders of magnitude simpler than trying to redesign MVCC/vacuuming. :) Cheers, Greg --00000000000089d33e0628ea1dfa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Dec 10, 2024 at 3:55=E2=80=AFAM L= ars Aksel Opsahl <Lars.Opsahl@ni= bio.no> wrote:
Is it difficult to add = parameter like force-dead-rows-removal that we send to the vacuum job that = will remove this rows like this ?
I'm still not sure w= hat the ask here is - complete literal removal of the dead rows? That's= not how PG works. I'm wondering if we are not in an XY problem. Your q= ueries are slow, and you think it's because of autovacuum's=C2=A0ou= tput re dead rows. But let's take a step back and look at the actual qu= eries being run that are slowing down. Perhaps there are other solutions: l= ess indexing, more freezing, smarter updates, different partitioning, tweak= ing fillfactor, etc. etc. There are lots of things we can try that will be = orders of magnitude simpler than trying to redesign MVCC/vacuuming. :)=C2= =A0

Cheers,
Greg

--00000000000089d33e0628ea1dfa--