forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbbc227e
committed
Always use ReleaseTupleDesc after lookup_rowtype_tupdesc et al.
The API spec for lookup_rowtype_tupdesc previously said you could useeither ReleaseTupleDesc or DecrTupleDescRefCount. However, the latterchoice means the caller must be certain that the returned tupdesc isrefcounted. I don't recall right now whether that was always truewhen this spec was written, but it's certainly not always true sincewe introduced shared record typcaches for parallel workers. That meansthat callers using DecrTupleDescRefCount are dependent on typcachebehavior details that they probably shouldn't be. Hence, change the APIspec to say that you must call ReleaseTupleDesc, and fix the half-dozencallers that weren't.AFAICT this is just future-proofing, there's no live bug here.So no back-patch.Per gripe from Chapman Flack.Discussion:https://postgr.es/m/61B901A4.1050808@anastigmatix.net1 parent2a71206 commitbbc227e
File tree
5 files changed
+10
-7
lines changed- src/backend
- commands
- executor
- parser
- utils
- adt
- cache
5 files changed
+10
-7
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15401 | 15401 |
| |
15402 | 15402 |
| |
15403 | 15403 |
| |
15404 |
| - | |
| 15404 | + | |
15405 | 15405 |
| |
15406 | 15406 |
| |
15407 | 15407 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1465 | 1465 |
| |
1466 | 1466 |
| |
1467 | 1467 |
| |
1468 |
| - | |
| 1468 | + | |
1469 | 1469 |
| |
1470 | 1470 |
| |
1471 | 1471 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1484 | 1484 |
| |
1485 | 1485 |
| |
1486 | 1486 |
| |
1487 |
| - | |
| 1487 | + | |
1488 | 1488 |
| |
1489 | 1489 |
| |
1490 | 1490 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
174 |
| - | |
| 174 | + | |
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
| |||
854 | 854 |
| |
855 | 855 |
| |
856 | 856 |
| |
857 |
| - | |
| 857 | + | |
858 | 858 |
| |
859 | 859 |
| |
860 | 860 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1820 | 1820 |
| |
1821 | 1821 |
| |
1822 | 1822 |
| |
1823 |
| - | |
1824 |
| - | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
1825 | 1828 |
| |
1826 | 1829 |
| |
1827 | 1830 |
| |
|
0 commit comments
Comments
(0)