Re: Statistics Import and Export - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Statistics Import and Export
Date
Msg-id CADkLM=ceOSsx_=oe73QQ-BxUFR2Cwqum7-UP_fPe22DBY0NerA@mail.gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: Statistics Import and Export
List pgsql-hackers


On Fri, Mar 14, 2025 at 4:03 PM Corey Huinker <corey.huinker@gmail.com> wrote:
New patches and a rebase.

0001 - no changes, but the longer I go the more I'm certain this is something we want to do.
0002- same as 0001

0003 -

Storing the restore function calls in the archive entry hogged a lot of memory and made people nervous. This introduces a new function pointer that generates those restore SQL calls right before they're written to disk, thus reducing the memory load from "stats for every object to be dumped" to just one object. Thanks to Nathan for diagnosing some weird quirks with various formats.

0004 -

This replaces the query in the prepared statement with one that batches them 100 relations at a time, and then maintains that result set until it is consumed. It seems to have obvious speedups.

Another rebase, and a new patch 0005 to have pg_dump fetch and restore relallfrozen for dbs of version 18 and higher. With older versions we omit relallfrozen and let the import function assign the default.
Attachment

pgsql-hackers by date:

Previous
From: Jeremy Schneider
Date:
Subject: Re: Update Unicode data to Unicode 16.0.0
Next
From: Michael Paquier
Date:
Subject: Re: Dubious server log messages after pg_upgrade