Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYqHC-0000ER-HR for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Mar 2023 15:27:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pYqHA-0004jd-Is for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Mar 2023 15:27:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYqHA-0004jU-7J for pgsql-hackers@lists.postgresql.org; Sun, 05 Mar 2023 15:27:52 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pYqH7-0005k1-4a for pgsql-hackers@lists.postgresql.org; Sun, 05 Mar 2023 15:27:51 +0000 Received: by mail-pj1-x1034.google.com with SMTP id kb15so7352741pjb.1 for ; Sun, 05 Mar 2023 07:27:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678030068; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kuEOw4s+Mre9ASVqbrAP3zRUBb4F9PLg9rBplLNNNxo=; b=n6+AdKLV+4cDk/XLu0Xd1R+caUWKgYQl1n2mak/GP3AmuJy2TWVgImm7B9ReUK+WKV iaEWX/KwR9j2JT+WyFBJTDQr50qvHjxQg23U64+DThzY+iTNb8vfu7sAzlzLLJi+uftV 5Av1QfhEa7UoyoBdu7+WPZSe8a+vrasancrtvpzOzEI7Epmrrq5SH/y4RBKu0id65oF7 oAp5zPfTJiBsapMXcYg53L6yXPJ2V+VyhSUR7z2Lrm7mN32LnjnwtHYlEPdkr7VQNSHg JDBoIqj3Jhz/BnshVsA+n3TvTxIXGKvd1oOJLErgjzXOAlG6L6MtA0fjdM7PORWowHUz WlSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678030068; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kuEOw4s+Mre9ASVqbrAP3zRUBb4F9PLg9rBplLNNNxo=; b=rYbfx/1Yw3ZeKcG4VNMambOi+PeV7OtgMLTyVIHwwIqOx54sp+2qU9dr594TYMzARd GQpX9Ut3/faln7NeV8poTxyST9Qz/JJtiwz5O4eOy9TY11QppJ/e+BZHAVWo4QdCGHPS 1pzCD8xL331klYPEq1K+Rl6JiUHdk6+gAhydQz6r8HmHUALAuCWG4vjy1pwN0uqqLEzm h10dmDyRPVGpIIqn2y9GK58eoVwyGv2LQWHQixA9/CgxdtpFt3T0LleSbIrkOe38TNBt lBs5uCvW9Qb71cUdc6OfB2SUj132f35cyCMQBe6MgTpTlWJizuGwjsdGD6jrRwMCvUAi 6sLA== X-Gm-Message-State: AO0yUKXcaCVuMFL0RxvK5aOjijYroofjkT7V1D1SSUz+0o6md83VPl7X oDBP3F0V9OvJlcrLH7tSBe4= X-Google-Smtp-Source: AK7set8etHKe3SX8+TSwJhjnwCU1TZi/phMQHof0So6OwjSXm2W3dVOZ7vUZhgvOSUGoKYbK01BYBw== X-Received: by 2002:a17:903:2308:b0:19a:a673:4ee2 with SMTP id d8-20020a170903230800b0019aa6734ee2mr11148552plh.31.1678030067945; Sun, 05 Mar 2023 07:27:47 -0800 (PST) Received: from [10.0.2.15] ([115.99.253.3]) by smtp.gmail.com with ESMTPSA id z16-20020a170903019000b0019a97a4324dsm4944199plg.5.2023.03.05.07.27.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Mar 2023 07:27:47 -0800 (PST) Message-ID: Date: Sun, 5 Mar 2023 20:57:45 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: How does pg implement the visiblity of one tuple for specified transaction? Content-Language: en-US To: "jacktby@gmail.com" , pgsql-hackers References: <202303052105574472012@gmail.com> From: Ankit Kumar Pandey In-Reply-To: <202303052105574472012@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Jacktby, Did you try looking at HeapTupleSatisfiesVisibility function (in src/backend/access/heap/heapam_visibility.c) ? I think it might give you some idea. Thanks, Ankit