forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3808cf2
committed
Fix infelicities in describeOneTableDetails' partitioned-table handling.
describeOneTableDetails issued a partition-constraint-fetching queryfor every table, even ones it knows perfectly well are not partitions.To add insult to injury, it then proceeded to leak the empty PGresultif the table wasn't a partition. Doing that a lot of times mightamount to a meaningful leak, so this seems like a back-patchable bug.Fix that, and also fix a related PGresult leak in the partition-parentcase (though that leak would occur only if we got no row, which isunexpected).Minor code beautification too, to make this code look more like thepre-existing code around it.Back-patch the whole change into v12. However, the fact that we alreadyknow whether the table is a partition dates only to commit1af25ca;back-patching the relevant changes from that is probably more churnthan is justified in released branches. Hence, in v11 and v10, justdo the minimum to fix the PGresult leaks.Noted while messing around with adjacent code for yesterday's \dimprovements.1 parentba7359d commit3808cf2
1 file changed
+8
-6
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1989 | 1989 |
| |
1990 | 1990 |
| |
1991 | 1991 |
| |
1992 |
| - | |
1993 |
| - | |
1994 | 1992 |
| |
| 1993 | + | |
1995 | 1994 |
| |
1996 | 1995 |
| |
1997 | 1996 |
| |
| |||
2004 | 2003 |
| |
2005 | 2004 |
| |
2006 | 2005 |
| |
2007 |
| - | |
| 2006 | + | |
2008 | 2007 |
| |
2009 | 2008 |
| |
2010 |
| - | |
2011 |
| - | |
2012 |
| - | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
2013 | 2015 |
| |
2014 | 2016 |
| |
2015 | 2017 |
| |
|
0 commit comments
Comments
(0)