Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
От
vignesh C
Тема
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Дата
Msg-id
CALDaNm1j-_pd0kn73nPLJ5-2EY1wUCPRANr-GPYsW1zayfifGQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
VLDB Features Simon Riggs <simon@2ndquadrant.com>
Re: VLDB Features Josh Berkus <josh@agliodbs.com>
Re: VLDB Features Hannu Krosing <hannu@skype.net>
Re: VLDB Features Josh Berkus <josh@agliodbs.com>
Re: VLDB Features Simon Riggs <simon@2ndquadrant.com>
Re: VLDB Features Simon Riggs <simon@2ndquadrant.com>
Re: VLDB Features Markus Schiltknecht <markus@bluegap.ch>
Re: VLDB Features Josh Berkus <josh@agliodbs.com>
Re: VLDB Features Markus Schiltknecht <markus@bluegap.ch>
Re: VLDB Features Decibel! <decibel@decibel.org>
Re: VLDB Features Gavin Sherry <swm@alcove.com.au>
Re: VLDB Features "Joshua D. Drake" <jd@commandprompt.com>
Re: VLDB Features Gregory Stark <stark@enterprisedb.com>
Re: VLDB Features Markus Schiltknecht <markus@bluegap.ch>
Re: VLDB Features Simon Riggs <simon@2ndquadrant.com>
Re: VLDB Features Neil Conway <neilc@samurai.com>
Re: VLDB Features Hannu Krosing <hannu@skype.net>
Re: VLDB Features Neil Conway <neilc@samurai.com>
Re: VLDB Features Tom Lane <tgl@sss.pgh.pa.us>
Re: VLDB Features Neil Conway <neilc@samurai.com>
Re: VLDB Features Tom Lane <tgl@sss.pgh.pa.us>
Re: VLDB Features Josh Berkus <josh@agliodbs.com>
Re: VLDB Features Tom Lane <tgl@sss.pgh.pa.us>
Re: VLDB Features Hannu Krosing <hannu@skype.net>
Re: VLDB Features Tom Lane <tgl@sss.pgh.pa.us>
Re: VLDB Features Josh Berkus <josh@agliodbs.com>
Re: VLDB Features "Michał Zaborowski" <michal.zaborowski@gmail.com>
Re: VLDB Features NikhilS <nikkhils@gmail.com>
Re: VLDB Features Tom Lane <tgl@sss.pgh.pa.us>
Re: VLDB Features NikhilS <nikkhils@gmail.com>
Re: VLDB Features Simon Riggs <simon@2ndquadrant.com>
Re: VLDB Features Trent Shipley <trent_shipley@qwest.net>
Re: VLDB Features Trent Shipley <trent_shipley@qwest.net>
POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alex Shulgin <ash@commandprompt.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Pavel Stehule <pavel.stehule@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Pavel Stehule <pavel.stehule@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Pavel Stehule <pavel.stehule@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Danil Anisimow <anisimow.d@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Andres Freund <andres@anarazel.de>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Tom Lane <tgl@sss.pgh.pa.us>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Andres Freund <andres@anarazel.de>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Tom Lane <tgl@sss.pgh.pa.us>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Daniel Gustafsson <daniel@yesql.se>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Daniel Gustafsson <daniel@yesql.se>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Andres Freund <andres@anarazel.de>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alena Rybakina <lena.ribackina@yandex.ru>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Tom Lane <tgl@sss.pgh.pa.us>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Andres Freund <andres@anarazel.de>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Tom Lane <tgl@sss.pgh.pa.us>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Andres Freund <andres@anarazel.de>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Daniel Gustafsson <daniel@yesql.se>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Tom Lane <tgl@sss.pgh.pa.us>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) zhihuifan1213@163.com
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Damir Belyalov <dam.bel07@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alena Rybakina <lena.ribackina@yandex.ru>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Andrei Lepikhov <a.lepikhov@postgrespro.ru>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alena Rybakina <lena.ribackina@yandex.ru>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alena Rybakina <lena.ribackina@yandex.ru>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alena Rybakina <lena.ribackina@yandex.ru>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alena Rybakina <lena.ribackina@yandex.ru>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) vignesh C <vignesh21@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Tom Lane <tgl@sss.pgh.pa.us>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Pavel Stehule <pavel.stehule@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) torikoshia <torikoshia@oss.nttdata.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Alexander Korotkov <aekorotkov@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Masahiko Sawada <sawada.mshk@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) zhihuifan1213@163.com
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) jian he <jian.universality@gmail.com>
Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) Nikita Malakhov <hukutoc@gmail.com>
Re: VLDB Features Andrew Dunstan <andrew@dunslane.net>
Re: VLDB Features Greg Smith <gsmith@gregsmith.com>
Re: VLDB Features Neil Conway <neilc@samurai.com>
Re: VLDB Features "Pavel Stehule" <pavel.stehule@gmail.com>
Re: VLDB Features Josh Berkus <josh@agliodbs.com>
Re: VLDB Features Dimitri Fontaine <dfontaine@hi-media.com>
On Thu, 28 Dec 2023 at 09:27, jian he wrote: > > On Wed, Dec 20, 2023 at 8:27 PM Masahiko Sawada wrote: > > > > > > Why do we need to use SPI? I think we can form heap tuples and insert > > them to the error table. Creating the error table also doesn't need to > > use SPI. > > > Thanks for pointing it out. I figured out how to form heap tuples and > insert them to the error table. > but I don't know how to create the error table without using SPI. > Please pointer it out. > > > > > > > copy_errors one per schema. > > > foo.copy_errors will be owned by the schema: foo owner. > > > > It seems that the error table is created when the SAVE_ERROR is used > > for the first time. It probably blocks concurrent COPY FROM commands > > with SAVE_ERROR option to different tables if the error table is not > > created yet. > > > I don't know how to solve this problem.... Maybe we can document this. > but it will block the COPY FROM immediately. > > > > > > > if you can insert to a table in that specific schema let's say foo, > > > then you will get privilege to INSERT/DELETE/SELECT > > > to foo.copy_errors. > > > If you are not a superuser, you are only allowed to do > > > INSERT/DELETE/SELECT on foo.copy_errors rows where USERID = > > > current_user::regrole::oid. > > > This is done via row level security. > > > > I don't think it works. If the user is dropped, the user's oid could > > be reused for a different user. > > > > You are right. > so I changed, now the schema owner will be the error table owner. > every error table tuple inserts, > I switch to schema owner, do the insert, then switch back to the > COPY_FROM operation user. > now everyone (except superuser) will need explicit grant to access the > error table. There are some compilation issues reported at [1] for the patch: [04:04:26.288] copyfromparse.c: In function ‘NextCopyFrom’: [04:04:26.288] copyfromparse.c:1126:25: error: ‘copy_errors_tupDesc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] [04:04:26.288] 1126 | copy_errors_tup = heap_form_tuple(copy_errors_tupDesc, [04:04:26.288] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [04:04:26.288] 1127 | t_values, [04:04:26.288] | ~~~~~~~~~ [04:04:26.288] 1128 | t_isnull); [04:04:26.288] | ~~~~~~~~~ [04:04:26.288] copyfromparse.c:1160:4: error: ‘copy_errorsrel’ may be used uninitialized in this function [-Werror=maybe-uninitialized] [04:04:26.288] 1160 | table_close(copy_errorsrel, RowExclusiveLock); [04:04:26.288] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [1] - https://cirrus-ci.com/task/4785221183209472 Regards, Vignesh
В списке pgsql-hackers по дате отправления