From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | memory usage of pg_upgrade |
Date: | 2013-09-09 22:20:54 |
Message-ID: | CAMkU=1z3T7s7RpB37ZBuV9Qx=AaUNRc_-nVo1GkH7UUA7MwmoQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
pg_upgrade reserves 5 times MAXPGPATH, or 5120 characters, for the
tablespace name of every object (table, toast table, index) in the
database being upgraded. This adds up pretty quickly when there is a
very large number of objects. It could be changed to char* to a
separately allocated name that takes only as much space it needs. But
maybe it would be better to point into os_info.old_tablespaces or
something like that, as surely there are not going to be one
independent file space per object.
typedef struct
{
...
char tablespace[MAXPGPATH];
} RelInfo;
The struct FileNameMap has 4 more .
Since there seems to be some interest in improving the scalability of
pg_upgrade, this is one of the things to consider fixing. What is the
best way to do it?
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | MauMau | 2013-09-09 22:27:13 | Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII |
Previous Message | MauMau | 2013-09-09 22:11:39 | Re: [bug fix] strerror() returns ??? in a UTF-8/C database with LC_MESSAGES=non-ASCII |