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 1sUJgg-00271f-58 for pgsql-general@arkaria.postgresql.org; Thu, 18 Jul 2024 05:28:18 +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 1sUJge-00AH42-7v for pgsql-general@arkaria.postgresql.org; Thu, 18 Jul 2024 05:28:16 +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 1sUJgd-00AH3R-Tv for pgsql-general@lists.postgresql.org; Thu, 18 Jul 2024 05:28:16 +0000 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sUJgb-0008Zg-74 for pgsql-general@lists.postgresql.org; Thu, 18 Jul 2024 05:28:15 +0000 Received: by mail-vs1-xe2a.google.com with SMTP id ada2fe7eead31-48ff82266e7so108462137.3 for ; Wed, 17 Jul 2024 22:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721280492; x=1721885292; 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=CcA6vkPMgJf6Xu1qVdgIvMJgB4EYUWQgKhc0yQaqkbg=; b=JBSocYJ9Iu2wgVJruHSIsPnrp6wnZSTZSg+bhtkhM0A1s+a4AEg0pf1SaLRjLmJQO2 oX17drsKqwHg02YCDXo9IS3aJGNHLqtr/8VDuh7F41KCxZXYSo7dSFEquVLFcPMUw08Y 72BTqCi8P0uY/Z1gCj81d3+z64B5Ee5wwKs7SiAtNxZcC2bTxr4TMc1hRdJ1ctpPchRI 7zlGlWX0HL+TXDIbwBlO2tUag5tvQ4yKAYi4tmKdcZnJQXALna2puwsiHwZkqLoIK37s r9Du7VliAWBpRPimw9dmsaQjvUZdI2/i7rXO9wSWUUTbrViQmEBn4YtXGwknmiEmqNym 2wjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721280492; x=1721885292; 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=CcA6vkPMgJf6Xu1qVdgIvMJgB4EYUWQgKhc0yQaqkbg=; b=TdmSagEqkMgJxop94y3W7GeGbsBt5h/hzYqRaquxp4drlLRwEXMzTQeMbMboUYvK6d W7i4D3R78cMvMj5NLMA7mK5kgB0LHKG61CzfdlMDBclb7Udvw6KB9ve4c+9vrndJUAac 8CjIQxsF7DXPtGxzw5oc0Tq+pa72hR6Gm4ruAQnAv5tQRahxXSmo7kuVaSA1e/C4t5lg lVk2BgsEakRwShv9dIcWX58fcZlo74g6XyQHdL5ObNcD63RwM3ISeEZt7p7mhz3e2AbH udb55bC9Cq2bRiZmYBPbCRDH6MBnuj7APLX1h6uJW81nInrWF79J77Y69AimG5pbiLQp c0zQ== X-Gm-Message-State: AOJu0Yw7E63MwbdVoFyI3J4rzqJNEwAsNITEFu9B4WOSHizdhOCMc+tk M355MI2BgHpTv8a1HBc3aLBLlvGSlq9GxxrGQrCO2tU1HErxIjmLwxZxtjFZyk3h0Oaw8hPQ1YV MzhYOdyDqGA1oSL5EGfEuTl64s40= X-Google-Smtp-Source: AGHT+IGeujvrJ1ZjbortR6etlEXhM0ngpKRfSRZutICUbNig7ToW2kNuB3bEvikMzg0VoHqK5N6HjQSBNtwIyefoRn0= X-Received: by 2002:a05:6102:3f89:b0:48f:dd7f:cf9a with SMTP id ada2fe7eead31-491599591cdmr4439431137.15.1721280492346; Wed, 17 Jul 2024 22:28:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kashif Zeeshan Date: Thu, 18 Jul 2024 10:28:03 +0500 Message-ID: Subject: Re: Regarding vacuum freeze locking mechanism To: Durgamahesh Manne Cc: pgsql-general@lists.postgresql.org, andrian.klaver@aklaver.com Content-Type: multipart/alternative; boundary="0000000000004e238a061d7ed85f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004e238a061d7ed85f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Thu, Jul 18, 2024 at 10:26=E2=80=AFAM Durgamahesh Manne < maheshpostgres9@gmail.com> wrote: > Hi > > Do new inserts block while performing vacuum freeze operations ? > Generally, VACUUM FREEZE does not block inserts as PG uses Multi-Version Concurrency Control (MVCC) which allows multiple transactions to operate on the same table without interfering with each other. > > when autovacuum runs , it will freeze the transaction ID (TXID) of the > table it's working on. This means that any transactions that started befo= re > autovacuum began will be allowed to complete.but new transactions will be > blocked until the autovacuum finishes. > > Could you please provide more clarity on this? Which lock triggers on the > tables are being used by freeze? > > Your response is highly appreciated > > Regards, > Durga Mahesh > > > --0000000000004e238a061d7ed85f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Thu, Jul 18, 2024 at 10:26=E2=80=AFAM Durgamahes= h Manne <maheshpostgres9@gm= ail.com> wrote:
Hi

Do new inserts block while pe= rforming vacuum freeze operations ?
Generally,= VACUUM FREEZE does not block inserts as PG uses Multi-Version Concurrency = Control (MVCC) which allows multiple transactions to operate on the same ta= ble without interfering with each other.
=C2=A0

= when autovacuum runs , it will freeze the transaction=C2=A0ID (TXID) of the= table it's working on. This means that any transactions that started b= efore autovacuum began will be allowed to complete.but new transactions wil= l be blocked until the autovacuum finishes.

Could = you please provide more clarity=C2=A0on this? Which lock triggers on the ta= bles are being=C2=A0used by freeze?

Your response = is highly appreciated

Regards,
Durga Mah= esh=C2=A0


--0000000000004e238a061d7ed85f--