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 1sPy90-007BmC-VY for pgsql-general@arkaria.postgresql.org; Sat, 06 Jul 2024 05:39:35 +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 1sPy8y-000IB1-3m for pgsql-general@arkaria.postgresql.org; Sat, 06 Jul 2024 05:39:32 +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 1sPy8x-000IAt-N0 for pgsql-general@lists.postgresql.org; Sat, 06 Jul 2024 05:39:32 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sPy8v-000fcC-Q2 for pgsql-general@lists.postgresql.org; Sat, 06 Jul 2024 05:39:31 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1fa2ea1c443so16737335ad.0 for ; Fri, 05 Jul 2024 22:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720244367; x=1720849167; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=X/Nlc++PyoeXuO9mOrz9G22tsFRTh38p0I/repiw1oY=; b=MO+iEWTHhNAfsjy6dUooikssFplcJCFy0Y0fUaOdKDt4LDIXo71n40TCQsf+Zwll75 Jb0J4t7QBGylpLApbYbNNPmNk04xLw/oEnFevw+H5vzgW5gmgXfqdjI9+MgH7vha+T2u i9eos+gVghn1Avu2LnrJIf+gUjBnmbCjqOezePTzIsgbFOtPW/zLjQ7TSRuYU62EiXBL Ku6Aw4hy3NsJRpfbmAZ97yvslQgDOfP9OXDlFNc3+oRwmukN/5stP0R1WdnSJlWL9bVb Rrk3yL/aojyqO8ySQg7EmrD0yzqY1CXKPLKbJrFI6mAoCe8xVbR6dPIDLXQ3BAKLYlJy VtDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720244367; x=1720849167; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X/Nlc++PyoeXuO9mOrz9G22tsFRTh38p0I/repiw1oY=; b=WmEBhr0n9QYgfUEPm4KZfN/npMFPHrIF9iRc1/kum7QWcbfTt9wDNyas7W+YVxrWCI 9CzVuGJhKto8y7c1MsE+5i0KBayg65x1BWF9H0FqugqvZnilsWW6lflRbrWLZdIpyjzz L+aBEzdatpUr9TH+NO19UO4IUfjt66HrLFWZ6XY0gqt01gzMAIQZHkBncdhpna/w06zn zcQOi8C+QifdZAmVvObpwIo+pZtxFf6U6gsSHQtIgiXblx9f7/qWXFuucpty/Q7CohMU V+1D5S5gNtV6MXwp2Rt9lk9js/6vENfGn8NIkFW8kDA5+pMDVbIdQTcnJHX4m0e77tdV FWPA== X-Gm-Message-State: AOJu0YzMEU49zA+8lPc/sl6EG4WrIZsLdvb5Lbz+kkSDiIaF0Kp2ERZn N0P04ai8/Jtzx6XHzhFUCz+Bmr88VUi73pPByfrJkrEY5JBjc90AN/b9Nw== X-Google-Smtp-Source: AGHT+IEyadLmIFwajzv7LzBRTGzU1ENvkREr6S36zWP6km1bVCnwU7U7QPTt+UuCXqItGrp3LhZ+nA== X-Received: by 2002:a17:903:41c7:b0:1fb:6473:e933 with SMTP id d9443c01a7336-1fb6473ee83mr11252335ad.41.1720244366722; Fri, 05 Jul 2024 22:39:26 -0700 (PDT) Received: from ?IPV6:2402:e280:3e2e:391:9045:7ee3:2b34:6c2d? ([2402:e280:3e2e:391:9045:7ee3:2b34:6c2d]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac11d8b18sm149525685ad.99.2024.07.05.22.39.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jul 2024 22:39:26 -0700 (PDT) Message-ID: <4ba1d48f-c946-404b-9919-231bcbee0130@gmail.com> Date: Sat, 6 Jul 2024 11:09:23 +0530 MIME-Version: 1.0 User-Agent: Betterbird (Linux) Subject: Re: confused about material view locks please explain To: pgsql-general@lists.postgresql.org References: <3eed1916-a166-42b7-862e-692887336652@gmail.com> <20240705154035.qjoey3eaqaqitthn@hjp.at> Content-Language: en-US From: Krishnakant Mane In-Reply-To: <20240705154035.qjoey3eaqaqitthn@hjp.at> 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 7/5/24 21:10, Peter J. Holzer wrote: > If I understand https://github.com/sraoss/pg_ivm correctly, the > materialized view will be updated within the same transaction. So it's > just the same as any other change in the database: > > Neither client will wait for the other. The first client will see either > the old or the new state depending on whether the second client manages > to commit soon enough. Thank you Peter. So does that mean both the processes work concurrently?  I had understood that while an update is happening to an IVM (material view ) the view is locked till the update is complete. If so then how would both the clients have simultaneous access? Regards. > >