Re: ALTER TABLE uses a bistate but not for toast tables

2023-11-16 Thread Justin Pryzby
@cfbot: rebased >From a9bb61421c24bd3273a8519362febb4073c297a1 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 21 Jun 2022 22:28:06 -0500 Subject: [PATCH v4] WIP: use BulkInsertState for toast tuples, too DONE: ALTER, CLUSTER TODO: copyto, copyfrom? slot_getsomeattrs

Re: ALTER TABLE uses a bistate but not for toast tables

2023-11-07 Thread Matthias van de Meent
Hi Justin, This patch has gone stale quite some time ago; CFbot does not seem to have any history of a successful apply attemps, nor do we have any succesful build history (which was introduced some time ago already). Are you planning on rebasing this patch? Kind regards, Matthias van de Meent

Re: ALTER TABLE uses a bistate but not for toast tables

2022-12-12 Thread Nikita Malakhov
Hi! Found this discussion for our experiments with TOAST, I'd have to check it under [1]. I'm not sure, what behavior is expected when the main table is unpinned, bulk insert to the TOAST table is in progress, and the second query with a heavy bulk insert to the same TOAST table comes in? Thank

Re: ALTER TABLE uses a bistate but not for toast tables

2022-11-27 Thread Justin Pryzby
On Wed, Sep 07, 2022 at 10:48:39AM +0200, Drouvot, Bertrand wrote: > Hi, > > On 6/22/22 4:38 PM, Justin Pryzby wrote: > > ATRewriteTable() calls table_tuple_insert() with a bistate, to avoid > > clobbering > > and polluting the buffers. > > > > But heap_insert() then calls > >

Re: ALTER TABLE uses a bistate but not for toast tables

2022-10-12 Thread Michael Paquier
On Wed, Sep 07, 2022 at 10:48:39AM +0200, Drouvot, Bertrand wrote: > +   if (bistate) > +   { > +   table_finish_bulk_insert(toastrel, options); // XXX > > I think it's too early, as it looks to me that at this stage we may have not > finished the whole bulk insert yet. Yeah,

ALTER TABLE uses a bistate but not for toast tables

2022-06-22 Thread Justin Pryzby
ATRewriteTable() calls table_tuple_insert() with a bistate, to avoid clobbering and polluting the buffers. But heap_insert() then calls heap_prepare_insert() > heap_toast_insert_or_update > toast_tuple_externalize > toast_save_datum > heap_insert(toastrel, toasttup, mycid, options, NULL /*