| From: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
|---|---|
| To: | bokanist(at)gmail(dot)com |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: [Feature Request] INSERT FROZEN to Optimize Large Cold Data Imports and Migrations |
| Date: | 2025-02-14 16:39:41 |
| Message-ID: | CAKAnmmLdw882syy5vNwnGFjvyvtoqBNVK4iujTsNt1qpY47uUQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Feb 14, 2025 at 1:41 AM Sébastien <bokanist(at)gmail(dot)com> wrote:
> I had huge problems on server 3 weeks after a 6 TB migration from other
> DB. I think it's sad to rewrite all data twice.
>
You could always COPY FREEZE into a new table, then move any remaining
rows, and finally rename the tables. Should be a win if the majority of the
table is newly-imported data. Another thing you might look at is increasing
your three week forced freeze window by adjusting params and/or decreasing
the number of transactions your cluster is using. (granted, still the same
overall write volume). You could also do manual vacuum freezes at a time
better for you (since you mention autovac is doing this at
unpredictable times).
Cheers,
Greg
--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2025-02-14 16:47:21 | Re: describe special values in GUC descriptions more consistently |
| Previous Message | Sami Imseih | 2025-02-14 16:06:15 | Re: pg_stat_statements and "IN" conditions |