pg_dump hang observed: Need help

Started by Atul Dholeabout 3 years ago2 messagesbugs
Jump to latest
#1Atul Dhole
Atul.Dhole@veritas.com

Hi PGSQL Team,

While taking backup of PostgreSQL DB, observed hang in pg_dump.

The PostgreSQL version is 14.6

Need help understand if this is a known issue. If not, need help in resolving the hang seen.

The command that has hung is as follows

pg_dump --host=DBSERVER.postgres.database.azure.com -p 5432 --username=USER1 -w -F c --dbname=DB1 -v -f PATH/DBNAME/DB1.dump

Details of hang are as follows

I]. DB1 - Table count: 667, size around 30 GB

STACK1

————

(gdb) bt

#0 0x00007f6ab8ea6bc8 in write () from /lib64/libc.so.6

#1 0x00007f6ab8e18dad in _IO_file_write@@GLIBC_2.2.5 () from /lib64/libc.so.6

#2 0x00007f6ab8e1811f in new_do_write () from /lib64/libc.so.6

#3 0x00007f6ab8e194de in __GI__IO_file_xsputn () from /lib64/libc.so.6

#4 0x00007f6ab8e0e56c in fwrite () from /lib64/libc.so.6

#5 0x000000000043d861 in flushbuffer ()

#6 0x000000000043f064 in pg_vfprintf ()

#7 0x000000000043f148 in pg_fprintf ()

#8 0x000000000043bf4a in pg_log_generic_v ()

#9 0x000000000043c1d8 in pg_log_generic ()

#10 0x00000000004090d9 in dumpTableData_copy ()

#11 0x000000000043195b in WriteDataChunksForTocEntry ()

#12 0x00000000004319e6 in WriteDataChunks ()

#13 0x0000000000433199 in _CloseArchive ()

#14 0x000000000042c92e in CloseArchive ()

#15 0x0000000000406536 in main ()

II] DB2 - table count : 5193, size around 60 MB

Command fired: pg_dump --host=DBSERVER.postgres.database.azure.com -p 5432 --username=USER1 -w -F c --dbname=DB2 -v -f PATH/DBNAME/DB2.dump

STACK2

————

(gdb) bt

#0 0x00007fe6a9920bc8 in write () from /lib64/libc.so.6

#1 0x00007fe6a9892dad in _IO_file_write@@GLIBC_2.2.5 () from /lib64/libc.so.6

#2 0x00007fe6a989211f in new_do_write () from /lib64/libc.so.6

#3 0x00007fe6a98934de in __GI__IO_file_xsputn () from /lib64/libc.so.6

#4 0x00007fe6a988856c in fwrite () from /lib64/libc.so.6

#5 0x000000000043d861 in flushbuffer ()

#6 0x000000000043f064 in pg_vfprintf ()

#7 0x000000000043f148 in pg_fprintf ()

#8 0x000000000043bf4a in pg_log_generic_v ()

#9 0x000000000043c1d8 in pg_log_generic ()

#10 0x0000000000421db1 in getTableAttrs ()

#11 0x0000000000425431 in getSchemaData ()

#12 0x00000000004059a1 in main ()

Regards,
Atul D.

#2Daniel Gustafsson
daniel@yesql.se
In reply to: Atul Dhole (#1)
Re: pg_dump hang observed: Need help

On 27 Mar 2023, at 14:08, Atul Dhole <Atul.Dhole@veritas.com> wrote:

The command that has hung is as follows

pg_dump --host=DBSERVER.postgres.database.azure.com -p 5432 --username=USER1 -w -F c --dbname=DB1 -v -f PATH/DBNAME/DB1.dump

This seems like a duplicate of what has already been addressed here:

/messages/by-id/2228293.1679668866@sss.pgh.pa.us

Try that advice first and see if it remedies the situation.

--
Daniel Gustafsson