Re: TRUNCATE on foreign table

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
Cc: Kazutaka Onishi <onishi(at)heterodb(dot)com>, Kohei KaiGai <kaigai(at)heterodb(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Subject: Re: TRUNCATE on foreign table
Date: 2021-03-09 02:53:59
Message-ID: CA+HiwqFVecXnLUtTv6J2hTyEdkVtkTae3QNfOKRobu+L_1=9QA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 9, 2021 at 2:24 AM Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2021-03-09 03:01:27 Re: [PATCH] pg_permissions
Previous Message Julien Rouhaud 2021-03-09 02:39:54 Re: pg_stat_statements oddity with track = all