Re: Adding SHOW CREATE TABLE

Поиск
Список
Период
Сортировка
От Jelte Fennema
Тема Re: Adding SHOW CREATE TABLE
Дата
Msg-id CAGECzQRuHBs9gjPbvgabQv8XS3QRU9Ex=nH84S_1=wo4POzBzg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding SHOW CREATE TABLE  (Kirk Wolak <wolakk@gmail.com>)
Ответы Re: Adding SHOW CREATE TABLE
Список pgsql-hackers
On Thu, 1 Jun 2023 at 18:57, Kirk Wolak <wolakk@gmail.com> wrote:
> Can this get turned into a Patch?  Were you offering this code up for others (me?) to pull, and work into a patch?
> [If I do the patch, I am not sure it gives you the value of reducing what CITUS has to maintain.  But it dawns on
> me that you might be pushing a much bigger patch...  But I would take that, as I think there is other value in
there]

Attached is a patch which adds the relevant functions from Citus to
Postgres (it compiles without warnings on my machine). I checked with
a few others on the Citus team at Microsoft and everyone thought that
upstreaming this was a good idea, because it's quite a bit of work to
update with every postgres release.

To set expectations though, I don't really have time to work on this
patch. So if you can take it over from here that would be great.

The patch only contains the C functions which generate SQL based on
some oids. The wrappers such as the master_get_table_ddl_events
function were too hard for me to pull out of Citus code, because they
integrated a lot with other pieces. But the bulk of the logic is in
the functions in this patch. Essentially all that
master_get_table_ddl_events does is call the functions in this patch
in the right order.

> The ONLY thing I did not see was "CREATE TEMPORARY " syntax?  If you did this on a  TEMP table,
> does it generate normal table syntax or TEMPORARY TABLE syntax???

Yeah, the Citus code only handles things that Citus supports in
distributed tables. Which is quite a lot, but indeed not everything
yet. Temporary and inherited tables are not supported in this code
afaik. Possibly more. See the commented out
EnsureRelationKindSupported for what should be supported (normal
tables and partitioned tables afaik).

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)
Следующее
От: "蔡梦娟(玊于)"
Дата:
Сообщение: Fix missing initialization of delayChkptEnd