Re: TRUNCATE on foreign table
Kazutaka Onishi <onishi@heterodb.com>
From: Kazutaka Onishi <onishi@heterodb.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Ibrar Ahmed <ibrar.ahmad@gmail.com>, Kohei KaiGai <kaigai@heterodb.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
Zhihong Yu <zyu@yugabyte.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Date: 2021-03-13T09:57:20Z
Lists: pgsql-hackers
Attachments
- pgsql14-truncate-on-foreign-table.v4.patch (application/octet-stream) patch v4
I have fixed the patch to pass check-world test. :D 2021年3月13日(土) 12:35 Kazutaka Onishi <onishi@heterodb.com>: > To Ibrar, > Thank you for updating the patch! > > To Amit, > Thank you for checking the patch, and I have confirmed the failure. > Now I'm trying to fix it. > > > > 2021年3月9日(火) 11:54 Amit Langote <amitlangote09@gmail.com>: > >> On Tue, Mar 9, 2021 at 2:24 AM Ibrar Ahmed <ibrar.ahmad@gmail.com> wrote: >> > The patch (pgsql14-truncate-on-foreign-table.v2.patch) does not apply >> successfully. >> > >> > http://cfbot.cputube.org/patch_32_2972.log >> > >> > patching file contrib/postgres_fdw/expected/postgres_fdw.out >> > Hunk #2 FAILED at 9179. >> > 1 out of 2 hunks FAILED -- saving rejects to file >> contrib/postgres_fdw/expected/postgres_fdw.out.rej >> > >> > As this is a minor change therefore I have updated the patch. Please >> take a look. >> >> Thanks for updating the patch. I was able to apply it successfully >> though I notice it doesn't pass make check-world. >> >> Specifically, it fails the src/test/subscription/013_partition.pl >> test. The problem seems to be that worker.c: apply_handle_truncate() >> hasn't been updated to add entries to relids_extra for partitions >> expanded from a partitioned table, like ExecuteTruncate() does. That >> leads to relids and relids_extra having different lengths, which trips >> the Assert in ExecuteTruncateGuts(). >> >> -- >> Amit Langote >> EDB: http://www.enterprisedb.com >> >
Commits
-
doc: Review for "Allow TRUNCATE command to truncate foreign tables".
- 0c8f40863acb 14.0 landed
-
Don't pass "ONLY" options specified in TRUNCATE to foreign data wrapper.
- 8e9ea08bae93 14.0 landed
-
Support tab-complete for TRUNCATE on foreign tables.
- 81e094bdfdd6 14.0 landed
-
Allow TRUNCATE command to truncate foreign tables.
- 8ff1c94649f5 14.0 landed
-
Add support for asynchronous execution.
- 27e1f14563cf 14.0 cited