wal write of large object

From: merryok <merryok(at)163(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: wal write of large object
Date: 2022-07-11 03:58:06
Message-ID: c9rg4sbu4glgp6fd5flphjpq.1657511886551@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

<div dir="ltr">Hi, hackers<br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">I&#39;m eager to dive into how to write wal for large object. In the code path:<br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">heap_insert -&gt; heap_prepare_insert -&gt; heap_toast_insert_or_update -&gt; toast_save_datum -&gt; heap_insert<br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">I find heap_insert is called back.<br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">1. At heaptup = heap_prepare_insert(relation, tup, xid, cid, options), the comment says tup is untoasted data, but it could come from toast_save_datum, still untoasted ?<br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">2. At toast_save_datum while loop, we know heap_insert is called with every chunk data, so every chunk data is written to WAL by XLogInsert() , right ? Although it may make WAL big. (It is still the case regarding to blob, cblob ?)<br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">3. When heap_insert is called firstly and heap_prepare_insert returns, what does heaptup mean for large object which has been chunked and written by toast_save_datum ?<br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">Any articles about this aspect would be appreciated.<br>
</div><div dir="ltr"><br>
</div>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2022-07-11 04:32:51 Re: [PATCH] Optimize json_lex_string by batching character copying
Previous Message Andrey Lepikhov 2022-07-11 03:54:08 Re: Fast COPY FROM based on batch insert