Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ymq9j-0004i3-3r for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2015 21:01:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ymq9i-00085F-GE for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2015 21:01:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ymq9g-000857-SP for pgsql-hackers@postgresql.org; Mon, 27 Apr 2015 21:01:29 +0000 Received: from mail-bn1on0076.outbound.protection.outlook.com ([157.56.110.76] helo=na01-bn1-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Ymq9d-0002GZ-TN for pgsql-hackers@postgresql.org; Mon, 27 Apr 2015 21:01:27 +0000 Received: from BY2PR11MB0680.namprd11.prod.outlook.com (25.163.111.22) by BY2PR11MB0727.namprd11.prod.outlook.com (25.163.112.13) with Microsoft SMTP Server (TLS) id 15.1.148.16; Mon, 27 Apr 2015 21:01:22 +0000 Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none; Received: from decina.local (70.113.16.71) by BY2PR11MB0680.namprd11.prod.outlook.com (25.163.111.22) with Microsoft SMTP Server (TLS) id 15.1.148.16; Mon, 27 Apr 2015 21:01:17 +0000 Message-ID: <553EA399.1010508@BlueTreble.com> Date: Mon, 27 Apr 2015 16:01:13 -0500 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Amit Kapila CC: Petr Jelinek , Andres Freund , , Robert Haas , Bruce Momjian , Sawada Masahiko , Greg Stark , PostgreSQL-development , "Jeff Janes" Subject: Re: Reducing tuple overhead References: <20150423162429.GG3055@alap3.anarazel.de> <553921B1.7080204@2ndquadrant.com> <5539491C.6040405@BlueTreble.com> <553AA753.9010103@BlueTreble.com> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [70.113.16.71] X-ClientProxiedBy: BY2PR06CA050.namprd06.prod.outlook.com (10.141.250.168) To BY2PR11MB0680.namprd11.prod.outlook.com (25.163.111.22) X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BY2PR11MB0680; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BY2PR11MB0727; X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(24454002)(51704005)(377454003)(479174004)(77156002)(65816999)(80316001)(15975445007)(23676002)(36756003)(50466002)(19580395003)(65806001)(46102003)(87266999)(93886004)(66066001)(33656002)(42186005)(86362001)(83506001)(65956001)(47776003)(59896002)(40100003)(2950100001)(92566002)(62966003)(4001350100001)(54356999)(87976001)(110136001)(76176999)(50986999)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR11MB0680; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006)(3002001); SRVR:BY2PR11MB0680; BCL:0; PCL:0; RULEID:; SRVR:BY2PR11MB0680; X-Forefront-PRVS: 0559FB9674 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2015 21:01:17.7806 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR11MB0680 X-OriginatorOrg: bluetreble.com X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 4/25/15 12:12 AM, Amit Kapila wrote: > > ... which isn't possible. You can not go from a heap tuple to an > index tuple. > > We will have the access to index value during delete, so why do you > think that we need linkage between heap and index tuple to perform > Delete operation? I think we need to think more to design Delete > .. by CTID, but that should be doable. The problem with just having the value is that if *anything* changes between how you evaluated the value when you created the index tuple and when you evaluate it a second time you'll corrupt your index. This is actually an incredibly easy problem to have; witness how we allowed indexing timestamptz::date until very recently. That was clearly broken, but because we never attempted to re-run the index expression to do vacuuming at least we never corrupted the index itself. > > This has been discussed in the past. > > I have tried to search in archive, but not getting what is the exact > problem. Unfortunately I can't find prior discussion now either... :/ -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers