forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1b26bd4
committed
Fix bug with view locking code.
LockViewRecurese() obtains view relation using heap_open() and passesit to get_view_query() to get view info. It immediately closes therelation then uses the returned view info by callingLockViewRecurse_walker(). Since get_view_query() returns a pointerwithin the relcache, the relcache should be kept untilLockViewRecurse_walker() returns. Otherwise the relation could pointto a garbage memory area.Fix is moving the heap_close() call after LockViewRecurse_walker().Problem reported by Tom Lane (buildfarm is unhappy, especially prionsince it enables -DRELCACHE_FORCE_RELEASE cpp flag), fix by me.1 parent3e256e5 commit1b26bd4
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
263 | 263 |
| |
264 | 264 |
| |
265 | 265 |
| |
266 |
| - | |
267 | 266 |
| |
268 | 267 |
| |
269 | 268 |
| |
| |||
272 | 271 |
| |
273 | 272 |
| |
274 | 273 |
| |
| 274 | + | |
| 275 | + | |
275 | 276 |
| |
276 | 277 |
| |
277 | 278 |
| |
|
0 commit comments
Comments
(0)