public inbox for [email protected]  
help / color / mirror / Atom feed
Re: pg_upgrade: can I use same binary for old & new?
4+ messages / 4 participants
[nested] [flat]

* Re: pg_upgrade: can I use same binary for old & new?
@ 2025-07-05 18:24 [email protected]
  2025-07-05 18:30 ` Re: pg_upgrade: can I use same binary for old & new? Tom Lane <[email protected]>
  2025-07-05 19:58 ` Re: pg_upgrade: can I use same binary for old & new? Adrian Klaver <[email protected]>
  0 siblings, 2 replies; 4+ messages in thread

From: [email protected] @ 2025-07-05 18:24 UTC (permalink / raw)
  To: [email protected]

On Sat, 5 Jul 2025 11:11:32 -0700 Adrian Klaver wrote:

>On 7/5/25 09:52, Pierre Fortin wrote:

>> Wanting to upgrade from:
>> PostgreSQL 15.13 on x86_64-mageia-linux-gnu,
>> compiled by gcc (Mageia 15.1.0-1.mga10) 15.1.0, 64-bit
>> to:
>> PG 17.5
>> 
>> Way back, I was able to use -k|--link option on pg_upgrade (PG13 to PG15);
>> but since then:
>> 
>> - my DB has grown to over 8TB  
>
>How did you measure above?

# du -sb /var/lib/pgsql/data
8227910662297   /var/lib/pgsql/data

>> - even with ~70TB, I don't have enough contiguous disk space to
>>    dump/restore  
>
>What was the pg_dump command?

Didn't try given:
$ df /mnt/db
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdh1        17T   13T  3.0T  82% /mnt/db

I suppose I could dump each of the 1408 objects to various available
drives; but given my previous experience with PG13 to PG15 using --link
which took seconds; I'm hoping to avoid wasting time (at my age, hours
matter).

Cheers,
Pierre






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_upgrade: can I use same binary for old & new?
  2025-07-05 18:24 Re: pg_upgrade: can I use same binary for old & new? [email protected]
@ 2025-07-05 18:30 ` Tom Lane <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2025-07-05 18:30 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

[email protected] writes:
> On Sat, 5 Jul 2025 11:11:32 -0700 Adrian Klaver wrote:
>> How did you measure above?

> # du -sb /var/lib/pgsql/data
> 8227910662297   /var/lib/pgsql/data

It's likely that there's a deal of bloat in that.  Even if there's not
much bloat, this number will include indexes and WAL data that don't
appear in pg_dump output.

>> What was the pg_dump command?

> Didn't try given:
> $ df /mnt/db
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sdh1        17T   13T  3.0T  82% /mnt/db

I'd say give it a try; be sure to use one of the pg_dump modes
that compress the data.

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_upgrade: can I use same binary for old & new?
  2025-07-05 18:24 Re: pg_upgrade: can I use same binary for old & new? [email protected]
@ 2025-07-05 19:58 ` Adrian Klaver <[email protected]>
  2025-07-05 21:11   ` Re: pg_upgrade: can I use same binary for old & new? Pierre Fortin <[email protected]>
  1 sibling, 1 reply; 4+ messages in thread

From: Adrian Klaver @ 2025-07-05 19:58 UTC (permalink / raw)
  To: [email protected]; [email protected]

On 7/5/25 11:24, [email protected] wrote:
> On Sat, 5 Jul 2025 11:11:32 -0700 Adrian Klaver wrote:
> 

> Didn't try given:
> $ df /mnt/db
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sdh1        17T   13T  3.0T  82% /mnt/db

You said you have ~70TB of free space, so where is the other  ~63TB?

> 
> I suppose I could dump each of the 1408 objects to various available
> drives; but given my previous experience with PG13 to PG15 using --link
> which took seconds; I'm hoping to avoid wasting time (at my age, hours
> matter).
> 
> Cheers,
> Pierre
> 
> 

-- 
Adrian Klaver
[email protected]







^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_upgrade: can I use same binary for old & new?
  2025-07-05 18:24 Re: pg_upgrade: can I use same binary for old & new? [email protected]
  2025-07-05 19:58 ` Re: pg_upgrade: can I use same binary for old & new? Adrian Klaver <[email protected]>
@ 2025-07-05 21:11   ` Pierre Fortin <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Pierre Fortin @ 2025-07-05 21:11 UTC (permalink / raw)
  To: [email protected]

On Sat, 5 Jul 2025 12:58:10 -0700 Adrian Klaver wrote:

>On 7/5/25 11:24, [email protected] wrote:
>> On Sat, 5 Jul 2025 11:11:32 -0700 Adrian Klaver wrote:
>>   
>
>> Didn't try given:
>> $ df /mnt/db
>> Filesystem      Size  Used Avail Use% Mounted on
>> /dev/sdh1        17T   13T  3.0T  82% /mnt/db  
>
>You said you have ~70TB of free space, so where is the other  ~63TB?

I never said "free space" with ~70TB; that's the total space on about 8
drives :)
The biggest free space I have is 7.6TB which is less than the 8TB DB;
but thanks to the responses, I should be able to make this work...

Also, I appreciate the clarification re CREATE INDEX (Doh!) and --jobs

Best,
Pierre






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2025-07-05 21:11 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-05 18:24 Re: pg_upgrade: can I use same binary for old & new? [email protected]
2025-07-05 18:30 ` Tom Lane <[email protected]>
2025-07-05 19:58 ` Adrian Klaver <[email protected]>
2025-07-05 21:11   ` Pierre Fortin <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox