From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ALTER TABLE lock strength reduction patch is unsafe |
Date: | 2013-11-13 11:48:15 |
Message-ID: | CA+U5nMJxGa3kJbCwsNBr9oPmUkkVR7zU5_TNjigbNCwyjMdxQA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 1 August 2013 01:53, Noah Misch <noah(at)leadboat(dot)com> wrote:
> A remediation strategy that seemed attractive when I last contemplated this
> problem is to repoint rd_att immediately but arrange to free the obsolete
> TupleDesc in AtEOXact_RelationCache().
I agree that the best way to resolve this is to retain a copy of the
TupleDesc, so that copied pointers to it remain valid.
EOXact is actually longer than strictly necessary in some cases, but
trying to work out a more minimal approach seems hard and possibly
inefficient.
Comments in relcache.c indicate that the Relation swapping concept
might be replaced by refcounting approach. I can't see how that
differs from your suggested route.
Which means I can't see any other way of doing this other than the way
you suggest. Will implement.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-11-13 11:48:41 | Re: GIN bugs in master branch |
Previous Message | Peter Eisentraut | 2013-11-13 11:42:48 | [PATCH] Report exit code from external recovery commands properly |