Pushing to gerrit error: unpack failed, fatal: Unpack error, check server log

If you encounter a/m error, consider adding --no-thin to the command as follows:

git push --no-thin origin HEAD:refs/for/master

Taken from:


PostgreSQL faster dump & restore

For PostgreSQL it takes a lot of time to import a text-based dump.

It turns out that binary dumps are imported much faster.
To create a binary dump run:

pg_dump -Fc dbname > /tmp/database.bak

Creating a database upon dump import should work, but for me it didn’t on PostgreSQL 9.4, so I recommend first creating the database and then running:

pg_restore -Fc /tmp/database.bak -d dbname