Subject: Reg pg_restore taking more time in windows compare to linux

From: Praveen Kumar Mandula <[email-masked]>
Date: Sun, 26 Jan 2025 07:14:57 +0000

Hi Team,
In our AccuRev product we are using postgres 9.5.3 ( open source ).

For one of our customer, when they are restoring DB, its taking more time.
In Windows its taking around 43 hours, where as in Linux its taking around 3 hours.

We tried modifying these in postgresql.conf , but still same behaviour.
shared_buffers = 7GB
effective_cache_size : 20GB
work_mem = '256MB'
maintenance_work_mem = '1GB';

max_wal_size = '3GB';

full_page_writes = off

autovacuum = off

wal_buffers = -1

min_wal_size = '1GB'

Note : we tried in postgres 17.2 also,  still in windows its taking 43 hours for restore, where as in linux its taking just 3hours.

Attached linux and windows logs, Can you please provide any suggestions?

Thanks,
Praveen

---

From: Laurenz Albe <[email-masked]>
Date: Mon, 27 Jan 2025 09:53:52 +0100

> In Windows its taking around 43 hours, where as in Linux its taking around 3 hours.

Check if the problem is caused by lame hardware.

Other than that, activate pg_stat_statements and see which statements take
more time on the windows machine.  Investigating those statements could help
solve the mystery.

Yours,
Laurenz Albe

---

From: Praveen Kumar Mandula <[email-masked]>
Date: Mon, 27 Jan 2025 12:29:03 +0000

linux is a single log file - linux-postgressql-2025-01-07
remaining are windows logs

Attaching linux and windows logs, are they useful in identifying why its taking time more in windows ?

________________________________
From: Laurenz Albe <[email-masked]>
Sent: Monday, January 27, 2025 2:23 PM
To: Praveen Kumar Mandula <[email-masked]>; [email-masked] <[email-masked]>
Subject: [EXTERNAL] - Re: Reg pg_restore taking more time in windows compare to linux

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. If you feel that the email is suspicious, please report it using PhishAlarm.

Yours,
Laurenz Albe

---

From: Laurenz Albe <[email-masked]>
Date: Mon, 27 Jan 2025 16:06:21 +0100

> Attaching linux and windows logs, are they useful in identifying why its taking time more in windows ?

No.

I told you what to investigate, right?

Yours,
Laurenz Albe

---

From: Laurenz Albe <[email-masked]>
Date: Tue, 28 Jan 2025 18:12:47 +0100

No.

Yours,
Laurenz Albe