pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba @ 2021-10-06 19:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-06 19:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3071bbfe44f36019710190a9273ad2bd4a947878 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 3 + contrib/postgres_fdw/postgres_fdw.c | 108 +++++++++++++++++-------- contrib/postgres_fdw/sql/postgres_fdw.sql | 1 + 3 files changed, 77 insertions(+), 35 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba @ 2021-10-06 19:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-06 19:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/12ff678e1d657fc94a1cfa90f1b85dd9bd79e1e6 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 3 + contrib/postgres_fdw/postgres_fdw.c | 108 +++++++++++++++++-------- contrib/postgres_fdw/sql/postgres_fdw.sql | 1 + 3 files changed, 77 insertions(+), 35 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba @ 2021-10-06 19:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-06 19:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/aee83f39a86bb66baa66d65e87ca8415ac26800b Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 3 + contrib/postgres_fdw/postgres_fdw.c | 108 +++++++++++++++++-------- contrib/postgres_fdw/sql/postgres_fdw.sql | 1 + 3 files changed, 77 insertions(+), 35 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba @ 2021-10-06 19:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-06 19:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2288973744e8bd4715d1daaaf2cd1d9b534aa1bf Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 3 + contrib/postgres_fdw/postgres_fdw.c | 108 +++++++++++++++++-------- contrib/postgres_fdw/sql/postgres_fdw.sql | 1 + 3 files changed, 77 insertions(+), 35 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba @ 2021-10-06 19:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-06 19:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/88807757d7409fa655458679a78a52b4406cf601 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 3 + contrib/postgres_fdw/postgres_fdw.c | 114 ++++++++++++++++--------- contrib/postgres_fdw/sql/postgres_fdw.sql | 1 + 3 files changed, 80 insertions(+), 38 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba @ 2021-10-06 19:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-06 19:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2e33fbda1263533518614c3930cca4b8eb21bd26 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 3 + contrib/postgres_fdw/postgres_fdw.c | 114 ++++++++++++++++--------- contrib/postgres_fdw/sql/postgres_fdw.sql | 1 + 3 files changed, 80 insertions(+), 38 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba @ 2021-10-06 19:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2021-10-06 19:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/36c9f7d96e1c95d45c7286a9355011289ab6c087 Modified Files -------------- contrib/postgres_fdw/expected/postgres_fdw.out | 3 + contrib/postgres_fdw/postgres_fdw.c | 118 ++++++++++++++++--------- contrib/postgres_fdw/sql/postgres_fdw.sql | 1 + 3 files changed, 82 insertions(+), 40 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2021-10-06 19:50 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-10-06 19:50 pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba Tom Lane <tgl@sss.pgh.pa.us> 2021-10-06 19:50 pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba Tom Lane <tgl@sss.pgh.pa.us> 2021-10-06 19:50 pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba Tom Lane <tgl@sss.pgh.pa.us> 2021-10-06 19:50 pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba Tom Lane <tgl@sss.pgh.pa.us> 2021-10-06 19:50 pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba Tom Lane <tgl@sss.pgh.pa.us> 2021-10-06 19:50 pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba Tom Lane <tgl@sss.pgh.pa.us> 2021-10-06 19:50 pgsql: Fix null-pointer crash in postgres_fdw's conversion_error_callba 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