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 1jvEmB-0004fY-Jc for pgsql-general@arkaria.postgresql.org; Tue, 14 Jul 2020 06:50:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jvEmA-0007Dc-9G for pgsql-general@arkaria.postgresql.org; Tue, 14 Jul 2020 06:50:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jvEm9-0007DV-UA for pgsql-general@lists.postgresql.org; Tue, 14 Jul 2020 06:50:50 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jvEm3-0004kS-4T for pgsql-general@postgresql.org; Tue, 14 Jul 2020 06:50:49 +0000 Received: by mail-wr1-x430.google.com with SMTP id a6so19948836wrm.4 for ; Mon, 13 Jul 2020 23:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=NrR7mfheCO165hd5jurvISLa00Gyj0BANM6KQS+VKyc=; b=1XyQ1r//Zee+ptD0xJLQLap0Gqnmwp/Ps6s6g14H+3YRz7vlQZIAGtztaEtHzN8bpZ nC7rqthf2fLwtyooi69vs7vS45NV8vzrVpy5z6IZl1GnMFmj8H88+XpFdBaLv5tCrUgD dFg/7elV6vjY76blnPro5MtqjiUeJz3RQmCHLxLiaNo1BwHVi/Ec/A5JP8KG5poqPhRS fiVLe9q9qdjEQLJLfaw+FzynXAQqlAqfTLqJOScJf1R/NwWkQ+7fDGnsUwNFU9F5mKZ1 KXVSaq1xVL/gjPQK8mOKJ3U9kOTH14eqj5iV0hDPoVfL7lcJt0W/7N44EIAJKBLdXnR5 tPkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=NrR7mfheCO165hd5jurvISLa00Gyj0BANM6KQS+VKyc=; b=RbDTko0m6Nphp44aOCR0sCp8NcQM1+hpLmeARhp53mWSLNjqT4vkPcZ3M9mQ5FuaYv so1KaERwfh5tOtqxVfQqd8lN1bOgr5dlOzroxIpNJa3sqW8WxPLTPdL8P1Ws5Ak6PwmQ jgdF6G4gfuNDUfRjyHC6doV6M7y6EXWh0dxaZW2DGrmih8HwsOZEW4nLPL3bud5WQez5 PP+WzceP5gaB/epYaZ6jWEaS100gJR74uwa/Q2CHYbbNfZMRLrhmKBxtKtrvfHl0+800 8S+IKBq3nuPFOkQyM2zrqgesFHwCvuaDDvSdrhEpX2WjILICqgjxhgvtwf0uzkjBU2AN 6uXQ== X-Gm-Message-State: AOAM530CkLo+fEry7X4x3FuN59FzrfuyHJ69vtt2f20ZwEc+EstIwzij +iB2v9IMQtOP1XqB4HeW1xKQpw== X-Google-Smtp-Source: ABdhPJyY/tpjuuYwg4mKj1w988l4eeGySBMcMiD1DtUtRlQITJo43LAQBTkFk4RCy+/cVd24iXJsqA== X-Received: by 2002:a5d:504b:: with SMTP id h11mr3372928wrt.160.1594709441910; Mon, 13 Jul 2020 23:50:41 -0700 (PDT) Received: from localhost.localdomain (217-149-169-51.nat.highway.telekom.at. [217.149.169.51]) by smtp.gmail.com with ESMTPSA id y189sm3235048wmd.27.2020.07.13.23.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 23:50:41 -0700 (PDT) Message-ID: Subject: Re: Doubt in mvcc From: Laurenz Albe To: Rama Krishnan , pgsql-general@postgresql.org Date: Tue, 14 Jul 2020 08:50:40 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2020-07-13 at 13:01 +0530, Rama Krishnan wrote: > I m preparing for interview one of the recruiter asked me mvcc drawbacks as i told due > to mvcc it use more space and need to perform maintenance activity. Yes. Generally speaking, you have to pay a price for keeping old versions of the data around, no matter how you implement it. > Another one is the same data causes an update conflict because two different transactions > can update the same version of the row. > he told its wrong, kindly tell me will you please tell me its correct or wrong? There is always a certain version (the latest) that can be updated, so this is the same no matter if you have MVCC or not: if two sessions want to update the same row, one has to wait until the other is done. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com