From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Amul Sul <sulamul(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Noah Misch <noah(at)leadboat(dot)com>, Neha Sharma <neha(dot)sharma(at)enterprisedb(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb |
Date: | 2021-07-12 21:07:46 |
Message-ID: | 3163970.1626124066@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Amul Sul <sulamul(at)gmail(dot)com> writes:
> [ v5_Add-RelationGetSmgr-inline-function.patch ]
Pushed with minor cosmetic adjustments.
RelationCopyStorage() kind of gives me the willies.
It's not really an smgr-level function, but we call it
everywhere with smgr pointers that belong to relcache entries:
/* copy main fork */
- RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
+ RelationCopyStorage(RelationGetSmgr(rel), dstrel, MAIN_FORKNUM,
rel->rd_rel->relpersistence);
So that would fail hard if a relcache flush could occur inside
that function. It seems impossible today, so I settled for
just annotating the function to that effect. But it won't
surprise me a bit if somebody breaks it in future due to not
having read/understood the comment.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2021-07-12 21:15:04 | Re: [PATCH] Don't block HOT update by BRIN index |
Previous Message | Alvaro Herrera | 2021-07-12 21:02:09 | Re: [PATCH] Don't block HOT update by BRIN index |