pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h
4+ messages / 1 participants
[nested] [flat]

* pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h
@ 2019-07-24 22:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-07-24 22:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix infelicities in describeOneTableDetails' partitioned-table handling.

describeOneTableDetails issued a partition-constraint-fetching query
for every table, even ones it knows perfectly well are not partitions.

To add insult to injury, it then proceeded to leak the empty PGresult
if the table wasn't a partition.  Doing that a lot of times might
amount to a meaningful leak, so this seems like a back-patchable bug.

Fix that, and also fix a related PGresult leak in the partition-parent
case (though that leak would occur only if we got no row, which is
unexpected).

Minor code beautification too, to make this code look more like the
pre-existing code around it.

Back-patch the whole change into v12.  However, the fact that we already
know whether the table is a partition dates only to commit 1af25ca0c;
back-patching the relevant changes from that is probably more churn
than is justified in released branches.  Hence, in v11 and v10, just
do the minimum to fix the PGresult leaks.

Noted while messing around with adjacent code for yesterday's \d
improvements.

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3808cf21f634ab0b6d6ec680684014a1fb89134f

Modified Files
--------------
src/bin/psql/describe.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h
@ 2019-07-24 22:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-07-24 22:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix infelicities in describeOneTableDetails' partitioned-table handling.

describeOneTableDetails issued a partition-constraint-fetching query
for every table, even ones it knows perfectly well are not partitions.

To add insult to injury, it then proceeded to leak the empty PGresult
if the table wasn't a partition.  Doing that a lot of times might
amount to a meaningful leak, so this seems like a back-patchable bug.

Fix that, and also fix a related PGresult leak in the partition-parent
case (though that leak would occur only if we got no row, which is
unexpected).

Minor code beautification too, to make this code look more like the
pre-existing code around it.

Back-patch the whole change into v12.  However, the fact that we already
know whether the table is a partition dates only to commit 1af25ca0c;
back-patching the relevant changes from that is probably more churn
than is justified in released branches.  Hence, in v11 and v10, just
do the minimum to fix the PGresult leaks.

Noted while messing around with adjacent code for yesterday's \d
improvements.

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cff13efb4a7185bfdd95c96b1c61b2090e515be4

Modified Files
--------------
src/bin/psql/describe.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h
@ 2019-07-24 22:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-07-24 22:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix infelicities in describeOneTableDetails' partitioned-table handling.

describeOneTableDetails issued a partition-constraint-fetching query
for every table, even ones it knows perfectly well are not partitions.

To add insult to injury, it then proceeded to leak the empty PGresult
if the table wasn't a partition.  Doing that a lot of times might
amount to a meaningful leak, so this seems like a back-patchable bug.

Fix that, and also fix a related PGresult leak in the partition-parent
case (though that leak would occur only if we got no row, which is
unexpected).

Minor code beautification too, to make this code look more like the
pre-existing code around it.

Back-patch the whole change into v12.  However, the fact that we already
know whether the table is a partition dates only to commit 1af25ca0c;
back-patching the relevant changes from that is probably more churn
than is justified in released branches.  Hence, in v11 and v10, just
do the minimum to fix the PGresult leaks.

Noted while messing around with adjacent code for yesterday's \d
improvements.

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d16e514befb5fdcf59bb404e828d3ce88a829b8e

Modified Files
--------------
src/bin/psql/describe.c | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h
@ 2019-07-24 22:15  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-07-24 22:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix infelicities in describeOneTableDetails' partitioned-table handling.

describeOneTableDetails issued a partition-constraint-fetching query
for every table, even ones it knows perfectly well are not partitions.

To add insult to injury, it then proceeded to leak the empty PGresult
if the table wasn't a partition.  Doing that a lot of times might
amount to a meaningful leak, so this seems like a back-patchable bug.

Fix that, and also fix a related PGresult leak in the partition-parent
case (though that leak would occur only if we got no row, which is
unexpected).

Minor code beautification too, to make this code look more like the
pre-existing code around it.

Back-patch the whole change into v12.  However, the fact that we already
know whether the table is a partition dates only to commit 1af25ca0c;
back-patching the relevant changes from that is probably more churn
than is justified in released branches.  Hence, in v11 and v10, just
do the minimum to fix the PGresult leaks.

Noted while messing around with adjacent code for yesterday's \d
improvements.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4e784f35145bc6e01d54282afe10d9bb5200ebfe

Modified Files
--------------
src/bin/psql/describe.c | 43 ++++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-07-24 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 22:15 pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h Tom Lane <tgl@sss.pgh.pa.us>
2019-07-24 22:15 pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h Tom Lane <tgl@sss.pgh.pa.us>
2019-07-24 22:15 pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h Tom Lane <tgl@sss.pgh.pa.us>
2019-07-24 22:15 pgsql: Fix infelicities in describeOneTableDetails' partitioned-table h Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox