pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Postpone calls of unsafe server-side functions in pg_dump. 5+ messages / 1 participants [nested] [flat]
* pgsql: Postpone calls of unsafe server-side functions in pg_dump. @ 2021-12-06 18:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2021-12-06 18:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Postpone calls of unsafe server-side functions in pg_dump. Avoid calling pg_get_partkeydef(), pg_get_expr(relpartbound), and regtypeout until we have lock on the relevant tables. The existing coding is at serious risk of failure if there are any concurrent DROP TABLE commands going on --- including drops of other sessions' temp tables. Arguably this is a bug fix that should be back-patched, but it's moderately invasive and we've not had all that many complaints about such failures. Let's just put it in HEAD for now. Discussion: https://postgr.es/m/2273648.1634764485@sss.pgh.pa.us Discussion: https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e3fcbbd623b9ccc16cdbda374654d91a4727d173 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 93 ++++++++++++++++++++++++++++++++--------------- src/bin/pg_dump/pg_dump.h | 4 +- 2 files changed, 64 insertions(+), 33 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Postpone calls of unsafe server-side functions in pg_dump. @ 2022-11-19 17:00 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-11-19 17:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Postpone calls of unsafe server-side functions in pg_dump. Avoid calling pg_get_partkeydef(), pg_get_expr(relpartbound), and regtypeout until we have lock on the relevant tables. The existing coding is at serious risk of failure if there are any concurrent DROP TABLE commands going on --- including drops of other sessions' temp tables. Back-patch of commit e3fcbbd62. That's been in v15/HEAD long enough to have some confidence about it, so now let's fix the problem in older branches. Original patch by me; thanks to Gilles Darold for back-patching legwork. Discussion: https://postgr.es/m/2273648.1634764485@sss.pgh.pa.us Discussion: https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc Discussion: https://postgr.es/m/45c93d57-9973-248e-d2df-e02ca9af48d4@darold.net Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/55f30e6c7640c80fbb7be90fad668ee4bffa0e97 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 146 +++++++++++++++++++++++++--------------------- src/bin/pg_dump/pg_dump.h | 4 +- 2 files changed, 79 insertions(+), 71 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Postpone calls of unsafe server-side functions in pg_dump. @ 2022-11-19 17:00 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-11-19 17:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Postpone calls of unsafe server-side functions in pg_dump. Avoid calling pg_get_partkeydef(), pg_get_expr(relpartbound), and regtypeout until we have lock on the relevant tables. The existing coding is at serious risk of failure if there are any concurrent DROP TABLE commands going on --- including drops of other sessions' temp tables. Back-patch of commit e3fcbbd62. That's been in v15/HEAD long enough to have some confidence about it, so now let's fix the problem in older branches. Original patch by me; thanks to Gilles Darold for back-patching legwork. Discussion: https://postgr.es/m/2273648.1634764485@sss.pgh.pa.us Discussion: https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc Discussion: https://postgr.es/m/45c93d57-9973-248e-d2df-e02ca9af48d4@darold.net Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e46e986baef04b9127a991f8a08d5c057671cb45 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 150 +++++++++++++++++++++++++--------------------- src/bin/pg_dump/pg_dump.h | 4 +- 2 files changed, 84 insertions(+), 70 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Postpone calls of unsafe server-side functions in pg_dump. @ 2022-11-19 17:00 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-11-19 17:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Postpone calls of unsafe server-side functions in pg_dump. Avoid calling pg_get_partkeydef(), pg_get_expr(relpartbound), and regtypeout until we have lock on the relevant tables. The existing coding is at serious risk of failure if there are any concurrent DROP TABLE commands going on --- including drops of other sessions' temp tables. Back-patch of commit e3fcbbd62. That's been in v15/HEAD long enough to have some confidence about it, so now let's fix the problem in older branches. Original patch by me; thanks to Gilles Darold for back-patching legwork. Discussion: https://postgr.es/m/2273648.1634764485@sss.pgh.pa.us Discussion: https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc Discussion: https://postgr.es/m/45c93d57-9973-248e-d2df-e02ca9af48d4@darold.net Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/344b7849200fab474e647b43fd353fad37004941 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 150 +++++++++++++++++++++++++--------------------- src/bin/pg_dump/pg_dump.h | 4 +- 2 files changed, 84 insertions(+), 70 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Postpone calls of unsafe server-side functions in pg_dump. @ 2022-11-19 17:00 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-11-19 17:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Postpone calls of unsafe server-side functions in pg_dump. Avoid calling pg_get_partkeydef(), pg_get_expr(relpartbound), and regtypeout until we have lock on the relevant tables. The existing coding is at serious risk of failure if there are any concurrent DROP TABLE commands going on --- including drops of other sessions' temp tables. Back-patch of commit e3fcbbd62. That's been in v15/HEAD long enough to have some confidence about it, so now let's fix the problem in older branches. Original patch by me; thanks to Gilles Darold for back-patching legwork. Discussion: https://postgr.es/m/2273648.1634764485@sss.pgh.pa.us Discussion: https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc Discussion: https://postgr.es/m/45c93d57-9973-248e-d2df-e02ca9af48d4@darold.net Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b1f106420b1a1703a1703fdf90bcdd703f322cd1 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 166 +++++++++++++++++++++++++--------------------- src/bin/pg_dump/pg_dump.h | 4 +- 2 files changed, 93 insertions(+), 77 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2022-11-19 17:00 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-12-06 18:23 pgsql: Postpone calls of unsafe server-side functions in pg_dump. Tom Lane <tgl@sss.pgh.pa.us> 2022-11-19 17:00 pgsql: Postpone calls of unsafe server-side functions in pg_dump. Tom Lane <tgl@sss.pgh.pa.us> 2022-11-19 17:00 pgsql: Postpone calls of unsafe server-side functions in pg_dump. Tom Lane <tgl@sss.pgh.pa.us> 2022-11-19 17:00 pgsql: Postpone calls of unsafe server-side functions in pg_dump. Tom Lane <tgl@sss.pgh.pa.us> 2022-11-19 17:00 pgsql: Postpone calls of unsafe server-side functions in pg_dump. 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