0

I am using below command to append.

pg_dump -Fc -h hostname -W --dbname=dbanme -f dbname.sql --username 2>demo.log

I want to log into demo.log like below sample output.

pg_dump: reading user-defined tables
pg_dump: reading packages variables
pg_dump: reading user-defined packages
pg_dump: reading user-defined synonyms
pg_dump: reading extensions
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: finding typelem dependencies for user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
.
.
.
....```

If we run in mysql using --verbose it will log all stuff using below command.
``` mysqldump -u -p dbname --log-error=error.log --verbose >bkp.sql```
how we can achive in PostgreSQL?

Please help. 

Adam Mulla
  • 61
  • 3
  • 12

1 Answers1

1

use --verbose as stated below

./pg_dump -Fc -h hostname -W --dbname=dbanme -f dbname.sql --username postgres --verbose 2>demo.log

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Amjad Shahzad
  • 706
  • 5
  • 12