| From: | Jaimin Pan <jaimin(dot)pan(at)gmail(dot)com> |
|---|---|
| To: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | [Report Bug With Patch] Rel Cache Bug |
| Date: | 2015-03-25 13:59:17 |
| Message-ID: | CABP8UDQH3T=AMNvPd1e743HUt52TYQpciH-P2WEU7pY9nJkDwQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi,
I think there is a bug in rel cache rebuild of release 9.4.1.
it also exists on some other release.
the issue was introduced by 491dd4a97daa6b4de9ee8401ada10ad5da76af46
-- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -2166,9 +2166,9 @@ RelationClearRelation(Relation relation, bool rebuild)
/* ... but actually, we don't have to update newrel->rd_rel
*/
memcpy(relation->rd_rel, newrel->rd_rel, CLASS_TUPLE_SIZE);
/* preserve old tupledesc and rules if no logical change */
- if (keep_tupdesc)
+ if (!keep_tupdesc)
SWAPFIELD(TupleDesc, rd_att);
- if (keep_rules)
+ if (!keep_rules)
{
SWAPFIELD(RuleLock *, rd_rules);
SWAPFIELD(MemoryContext, rd_rulescxt);
| Attachment | Content-Type | Size |
|---|---|---|
| bug.patch | application/octet-stream | 667 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | smarvin | 2015-03-25 14:05:22 | BUG #12897: SQLDescribeColumn() and bit columns |
| Previous Message | Michael Paquier | 2015-03-25 11:46:14 | Re: BUG #12885: The result of casting a double to an integer depends on the database version |