Recently, on irc, there have been some talks with people using various pg_dump/pg_dumpall calls to get dumps of database.

I voiced my ideas, but figured it could be good subject for a blog post.

First things first – we have two tools available:

  • pg_dumpall
  • pg_dump

pg_dumpall dumps all databases in given PostgreSQL installation (cluster), and does it to plain text file. Everything goes there. Additionally, it dumps global things – roles and tablespaces, which cannot be dumped by pg_dump.

The major benefit of pg_dumpall is that it’s single command, and you get results.

There is huge number of drawbacks though:

  • dump is large, because it’s uncompressed
  • dumping is slow, because it’s done sequentially, with single w…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help