pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten 7+ messages / 1 participants [nested] [flat]
* pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten @ 2018-08-07 17:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-08-07 17:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ensure pg_dump_sort.c sorts null vs non-null namespace consistently. The original coding here (which is, I believe, my fault) supposed that it didn't need to concern itself with the possibility that one object of a given type-priority has a namespace while another doesn't. But that's not reliably true anymore, if it ever was; and if it does happen then it's possible that DOTypeNameCompare returns self-inconsistent comparison results. That leads to unspecified behavior in qsort() and a resultant weird output order from pg_dump. This should end up being only a cosmetic problem, because any ordering constraints that actually matter should be enforced by the later dependency-based sort. Still, it's a bug, so back-patch. Report and fix by Jacob Champion, though I editorialized on his patch to the extent of making NULL sort after non-NULL, for consistency with our usual sorting definitions. Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/abd04e0dd8a50d531d6d8e428763a6fc7b16558e Modified Files -------------- src/bin/pg_dump/pg_dump_sort.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten @ 2018-08-07 17:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-08-07 17:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ensure pg_dump_sort.c sorts null vs non-null namespace consistently. The original coding here (which is, I believe, my fault) supposed that it didn't need to concern itself with the possibility that one object of a given type-priority has a namespace while another doesn't. But that's not reliably true anymore, if it ever was; and if it does happen then it's possible that DOTypeNameCompare returns self-inconsistent comparison results. That leads to unspecified behavior in qsort() and a resultant weird output order from pg_dump. This should end up being only a cosmetic problem, because any ordering constraints that actually matter should be enforced by the later dependency-based sort. Still, it's a bug, so back-patch. Report and fix by Jacob Champion, though I editorialized on his patch to the extent of making NULL sort after non-NULL, for consistency with our usual sorting definitions. Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f3f6558b5d767317baad6934c6bd0def3bd601bd Modified Files -------------- src/bin/pg_dump/pg_dump_sort.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten @ 2018-08-07 17:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-08-07 17:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ensure pg_dump_sort.c sorts null vs non-null namespace consistently. The original coding here (which is, I believe, my fault) supposed that it didn't need to concern itself with the possibility that one object of a given type-priority has a namespace while another doesn't. But that's not reliably true anymore, if it ever was; and if it does happen then it's possible that DOTypeNameCompare returns self-inconsistent comparison results. That leads to unspecified behavior in qsort() and a resultant weird output order from pg_dump. This should end up being only a cosmetic problem, because any ordering constraints that actually matter should be enforced by the later dependency-based sort. Still, it's a bug, so back-patch. Report and fix by Jacob Champion, though I editorialized on his patch to the extent of making NULL sort after non-NULL, for consistency with our usual sorting definitions. Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5b5ed4756c9b3efff787f4921659a9d4d51726e5 Modified Files -------------- src/bin/pg_dump/pg_dump_sort.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten @ 2018-08-07 17:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-08-07 17:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ensure pg_dump_sort.c sorts null vs non-null namespace consistently. The original coding here (which is, I believe, my fault) supposed that it didn't need to concern itself with the possibility that one object of a given type-priority has a namespace while another doesn't. But that's not reliably true anymore, if it ever was; and if it does happen then it's possible that DOTypeNameCompare returns self-inconsistent comparison results. That leads to unspecified behavior in qsort() and a resultant weird output order from pg_dump. This should end up being only a cosmetic problem, because any ordering constraints that actually matter should be enforced by the later dependency-based sort. Still, it's a bug, so back-patch. Report and fix by Jacob Champion, though I editorialized on his patch to the extent of making NULL sort after non-NULL, for consistency with our usual sorting definitions. Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dc391dacf170593dceef07fc7ea287cb02d09d5d Modified Files -------------- src/bin/pg_dump/pg_dump_sort.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten @ 2018-08-07 17:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-08-07 17:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ensure pg_dump_sort.c sorts null vs non-null namespace consistently. The original coding here (which is, I believe, my fault) supposed that it didn't need to concern itself with the possibility that one object of a given type-priority has a namespace while another doesn't. But that's not reliably true anymore, if it ever was; and if it does happen then it's possible that DOTypeNameCompare returns self-inconsistent comparison results. That leads to unspecified behavior in qsort() and a resultant weird output order from pg_dump. This should end up being only a cosmetic problem, because any ordering constraints that actually matter should be enforced by the later dependency-based sort. Still, it's a bug, so back-patch. Report and fix by Jacob Champion, though I editorialized on his patch to the extent of making NULL sort after non-NULL, for consistency with our usual sorting definitions. Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6b6327d938ed61b45eb674912e63372cd349c4a3 Modified Files -------------- src/bin/pg_dump/pg_dump_sort.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten @ 2018-08-07 17:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-08-07 17:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ensure pg_dump_sort.c sorts null vs non-null namespace consistently. The original coding here (which is, I believe, my fault) supposed that it didn't need to concern itself with the possibility that one object of a given type-priority has a namespace while another doesn't. But that's not reliably true anymore, if it ever was; and if it does happen then it's possible that DOTypeNameCompare returns self-inconsistent comparison results. That leads to unspecified behavior in qsort() and a resultant weird output order from pg_dump. This should end up being only a cosmetic problem, because any ordering constraints that actually matter should be enforced by the later dependency-based sort. Still, it's a bug, so back-patch. Report and fix by Jacob Champion, though I editorialized on his patch to the extent of making NULL sort after non-NULL, for consistency with our usual sorting definitions. Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f7364300667befd892667d54414268aafc24377e Modified Files -------------- src/bin/pg_dump/pg_dump_sort.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten @ 2018-08-07 17:14 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2018-08-07 17:14 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Ensure pg_dump_sort.c sorts null vs non-null namespace consistently. The original coding here (which is, I believe, my fault) supposed that it didn't need to concern itself with the possibility that one object of a given type-priority has a namespace while another doesn't. But that's not reliably true anymore, if it ever was; and if it does happen then it's possible that DOTypeNameCompare returns self-inconsistent comparison results. That leads to unspecified behavior in qsort() and a resultant weird output order from pg_dump. This should end up being only a cosmetic problem, because any ordering constraints that actually matter should be enforced by the later dependency-based sort. Still, it's a bug, so back-patch. Report and fix by Jacob Champion, though I editorialized on his patch to the extent of making NULL sort after non-NULL, for consistency with our usual sorting definitions. Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com Branch ------ REL9_3_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5abdb33ad0533867dae08b61d922a5dfd499a290 Modified Files -------------- src/bin/pg_dump/pg_dump_sort.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2018-08-07 17:14 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-08-07 17:14 pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten Tom Lane <tgl@sss.pgh.pa.us> 2018-08-07 17:14 pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten Tom Lane <tgl@sss.pgh.pa.us> 2018-08-07 17:14 pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten Tom Lane <tgl@sss.pgh.pa.us> 2018-08-07 17:14 pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten Tom Lane <tgl@sss.pgh.pa.us> 2018-08-07 17:14 pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten Tom Lane <tgl@sss.pgh.pa.us> 2018-08-07 17:14 pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten Tom Lane <tgl@sss.pgh.pa.us> 2018-08-07 17:14 pgsql: Ensure pg_dump_sort.c sorts null vs non-null namespace consisten 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