From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Oskari Saarenmaa <os(at)aiven(dot)io> |
Cc: | Peter Geoghegan <pg(at)heroku(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Tripp <peter(at)chartio(dot)com>, Virendra Negi <virendra(at)idyllic-software(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14150: Attempted to delete invisible tuple |
Date: | 2016-07-27 23:53:47 |
Message-ID: | 20160727235347.odtjfrsrjdrlolfv@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2016-07-07 22:43:59 +0300, Oskari Saarenmaa wrote:
> Something like the attached patch? It
> still modifies the toast_delete API, but
> we could also implement a new
> speculative-tuple-aware version of it if
> that's a concern.
Maybe I'm missing something, but toasted columns aren't actually marked
as speculative right now, no? Cf.
HeapTuple
toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup,
int options)
..
/*
* Ignore the INSERT_SPECULATIVE option. Speculative insertions/super
* deletions just normally insert/delete the toast values. It seems
* easiest to deal with that here, instead on, potentially, multiple
* callers.
*/
options &= ~HEAP_INSERT_SPECULATIVE;
so going through heap_abort_speculative()/heap_delete_speculative()
doesn't look right to me. We could change thing so toasted rows also
get inserted speculatively - but I don't see much of a point.
> +void
> +heap_delete_speculative(Relation relation, ItemPointer tid, bool is_toast)
> +{
If we go this way, it seems easier to get is_toast from
IsToastRelation(relation), rather than hand it through painstakingly.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2016-07-28 00:24:37 | Re: BUG #14228: replication slot catalog_xmin not cleared on slot reuse |
Previous Message | nilesoien | 2016-07-27 19:30:42 | BUG #14267: ecpg bug causes hanging for certain data types |