Re: Allowing printf("%m") only where it actually works

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Allowing printf("%m") only where it actually works
Дата
в 04:00:33
Msg-id
2576.1527382833@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Thomas Munro <thomas.munro@enterprisedb.com>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Thomas Munro <thomas.munro@enterprisedb.com>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Thomas Munro <thomas.munro@enterprisedb.com>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Thomas Munro <thomas.munro@enterprisedb.com>
Re: Allowing printf("%m") only where it actually works Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Nico Williams <nico@cryptonector.com>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Nico Williams <nico@cryptonector.com>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Michael Paquier <michael@paquier.xyz>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Michael Paquier <michael@paquier.xyz>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Michael Paquier <michael@paquier.xyz>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Michael Paquier <michael@paquier.xyz>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Andres Freund <andres@anarazel.de>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Andres Freund <andres@anarazel.de>
Re: Allowing printf("%m") only where it actually works Andres Freund <andres@anarazel.de>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Andres Freund <andres@anarazel.de>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Andres Freund <andres@anarazel.de>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Andres Freund <andres@anarazel.de>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Robert Haas <robertmhaas@gmail.com>
Re: Allowing printf("%m") only where it actually works Fabien COELHO <coelho@cri.ensmp.fr>
Re: Allowing printf("%m") only where it actually works Tom Lane <tgl@sss.pgh.pa.us>
Re: Allowing printf("%m") only where it actually works Fabien COELHO <coelho@cri.ensmp.fr>
Re: Allowing printf("%m") only where it actually works Thomas Munro <thomas.munro@enterprisedb.com>
I wrote:
> ... It doesn't take much to make one nontrivial either.  If
> memory serves, malloc() can trash errno on some platforms such as macOS,
> so even just a palloc creates a hazard of a hard-to-reproduce problem.

After digging around in the archives, the closest thing that we seem to
know for certain is that some versions of free() can trash errno, cf

https://www.postgresql.org/message-id/flat/E1UcmpR-0004nn-2i%40wrigleys.postgresql.org

as a result of possibly calling madvise() which might or might not
succeed.  But in the light of that knowledge, how much do you want
to bet that malloc() can't change errno?  And there's the possibility
that a called function does both a palloc and a pfree ...

			regards, tom lane

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Thomas Munro
Дата:
FAQ