On Thu, Aug 4, 2016 at 06:16:02PM +0100, Simon Riggs wrote: > On 4 August 2016 at 18:05, Bruce Momjian <br...@momjian.us> wrote: > > >> Approach 2 seems more reasonable and simple. > >> > >> There are only 2 bits for lp_flags and all combinations are already used. > >> But > >> for LP_REDIRECT root line pointer, we could use the lp_len field to store > >> this > >> special flag, which is not used for LP_REDIRECT line pointers. So we are > >> able > >> to mark the root line pointer. > > > > Uh, as I understand it, we only use LP_REDIRECT when we have _removed_ > > the tuple that the ctid was pointing to, but it seems you would need to > > set HEAP_RECHECK_REQUIRED earlier than that. > > Hmm. Mostly there will be one, so this is just for the first update > after any VACUUM. > > Adding a new linepointer just to hold this seems kludgy and could mean > we run out of linepointers.
Ah, so in cases where there isn't an existing LP_REDIRECT for the chain, you create one and use the lp_len to identify it as a WARM chain? Hmm. You can't update the indexes pointing to the existing ctid, so what you would really have to do is to write over the existing ctid with LP_REDIRECT plus WARM marker, and move the old ctid to a new ctid slot? -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers