Re: create table like: ACCESS METHOD
От
Michael Paquier
Тема
Re: create table like: ACCESS METHOD
Дата
Msg-id
X+WJqu4X4EniF6xT@paquier.xyz
Ответ на
create table like: ACCESS METHOD (Justin Pryzby)
Список
Дерево обсуждения
create table like: ACCESS METHOD Justin Pryzby <pryzby@telsasoft.com>
Re: create table like: ACCESS METHOD Michael Paquier <michael@paquier.xyz>
Re: create table like: ACCESS METHOD Justin Pryzby <pryzby@telsasoft.com>
Re: create table like: ACCESS METHOD Simon Riggs <simon@2ndquadrant.com>
Re: create table like: ACCESS METHOD Justin Pryzby <pryzby@telsasoft.com>
Re: create table like: ACCESS METHOD Justin Pryzby <pryzby@telsasoft.com>
Re: create table like: ACCESS METHOD Justin Pryzby <pryzby@telsasoft.com>
Re: create table like: ACCESS METHOD Michael Paquier <michael@paquier.xyz>
Re: create table like: ACCESS METHOD Michael Paquier <michael@paquier.xyz>
Re: create table like: ACCESS METHOD Vik Fearing <vik@postgresfriends.org>
Re: create table like: ACCESS METHOD Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: create table like: ACCESS METHOD Michael Paquier <michael@paquier.xyz>
Re: create table like: ACCESS METHOD Michael Paquier <michael@paquier.xyz>
Re: create table like: ACCESS METHOD David Steele <david@pgmasters.net>
On Wed, Dec 09, 2020 at 02:13:29PM -0600, Justin Pryzby wrote: > I thought this was a good idea, but didn't hear back when I raised it before. > > Failing to preserve access method is arguably a bug, reminiscent of CREATE > STATISTICS and 5564c1181. But maybe it's not important to backpatch a fix in > this case, since access methods are still evolving. Interesting. Access methods for tables are released for more than one year now, so my take about a backpatch is that this boat has already sailed. This may give a reason to actually not introduce this feature. + CREATE_TABLE_LIKE_ACCESSMETHOD = 1 << 0, Nit: wouldn't this be better as ACCESS_METHOD? -- fail, as partitioned tables don't allow NO INHERIT constraints -CREATE TABLE noinh_con_copy1_parted (LIKE noinh_con_copy INCLUDING ALL) +CREATE TABLE noinh_con_copy1_parted (LIKE noinh_con_copy INCLUDING ALL EXCLUDING ACCESS METHOD) PARTITION BY LIST (a); This diff means that you are introducing an incompatible change by forcing any application using CREATE TABLE LIKE for a partitioned table to exclude access methods. This is not acceptable, and it may be better to just ignore this clause instead in this context. This patch should have more tests. Something could be added in create_am.sql where there is a fake heap2 as table AM. + + The table's access method will be copied. By default, the + default_table_access_method is used. + Second sentence sounds a bit strange by combining "the" and a GUC name. I would just write "Default is default_table_a_m". -- Michael
В списке pgsql-hackers по дате отправления