markokr/pgreplay — pull request #1 by darold (2014-12-09 18:30:58+00:00)
Title: Introduce replay filter option with "-D database" and "-U username" 

This patch introduce new replay filter options with "-D database" and "-U username" to only parse log entries related to the specified database name and/or username. By default pgreplay replay the log entries of a complete PostgreSQL instance, using those command lines options you will be able to replay only statements related to a single database and/or executed by a single username.

Some more explanation:

I'm replaying a log files from a 8.4 to a 9.3 with lot of database but I only need to replay a single one. I first use a Perl script to extract only the relevant log entries and give the resulting file to pgreplay but I've though that having those features with pgreplay could help. In my use of pgreplay I also met issues by replaying statements from 8.4 to 9.3 with some queries on PostgreSQL catalog done by pg_dump because the table pg_trigger has changed. This is why I also added the "-U username" option, the pg_dump is done as postgres user and the application user is fortunately not the same.

Great tool !