Re: Speedup truncations of temporary relation forks - Mailing list pgsql-hackers

From Daniil Davydov
Subject Re: Speedup truncations of temporary relation forks
Date
Msg-id CAJDiXghWKN6_uaQyTFVJkjV24dPsL5U9q8DgpB_u0GEoiPr8ww@mail.gmail.com
Whole thread Raw
In response to Re: Speedup truncations of temporary relation forks  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
Hi,

On Mon, Jun 2, 2025 at 11:14 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> > (I haven't figured out how to force postgres to
> > create a visibility map for temp table within the transaction block).
>
> I haven't tested this, but I think if you do bulk copy into a table
> which should mark pages all visible and after that if you delete some
> tuple from pages logically it should try to update the status to not
> all visible in vm?
>

I found reliable way to create all three forks :
begin;
create temp table test (id int) on commit delete rows;
copy test from 'data.csv' with (freeze);
insert into test select generate_series(2000000, 3000000);
delete from test where id % 500000 = 0;
commit;

--
Best regards,
Daniil Davydov



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Batch TIDs lookup in ambulkdelete
Next
From: Amit Kapila
Date:
Subject: Re: Conflict detection for update_deleted in logical replication