pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: hlinnaka@iki.fi
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Sawada Masahiko <sawada.mshk@gmail.com>
Cc: Greg Stark <stark@mit.edu>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Jeff Janes <jeff.janes@gmail.com>
Subject: Re: Reducing tuple overhead
Date: Mon, 27 Apr 2015 16:01:13 -0500
Message-ID: <553EA399.1010508@BlueTreble.com> (raw)
In-Reply-To: <CAA4eK1KbqMicXYFo6MCp7nnOfjkuqyx071c+sAm0c+ftAKSCBw@mail.gmail.com>
References: <20150423162429.GG3055@alap3.anarazel.de>
	<553921B1.7080204@2ndquadrant.com>
	<5539491C.6040405@BlueTreble.com>
	<CAA4eK1+R2f+woEsu_Woj6AgoZE6LRxYCVg5kXiC3snKSkxHmFQ@mail.gmail.com>
	<553AA753.9010103@BlueTreble.com>
	<CAA4eK1KbqMicXYFo6MCp7nnOfjkuqyx071c+sAm0c+ftAKSCBw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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



view thread (26+ messages)  latest in thread

Message-ID: <553EA399.1010508@BlueTreble.com>
Permalink:  ../553EA399.1010508@BlueTreble.com/
Also on:    postgresql.org/message-id/553EA399.1010508@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, amit.kapila16@gmail.com, petr@2ndquadrant.com, andres@anarazel.de, hlinnaka@iki.fi, robertmhaas@gmail.com, bruce@momjian.us, sawada.mshk@gmail.com, stark@mit.edu, jeff.janes@gmail.com
  Subject: Re: Reducing tuple overhead
  In-Reply-To: <553EA399.1010508@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox