Do you use archive_command or pg_receivexlog to archive your WAL files? If you use archive_command, then, as Jarry has already stated, you will have *.backup files in your WAL archive, the latest of which points to the beginning of the WAL files set needed for the latest base backup. If you use pg_receivexlog, you will not have *.backup in the archive, but could either get the starting WAL segment's name from the backup_label file, that you can find in the root of your base backup, or to just get all the WAL files that was modified not earlier than the time your base backup file/directory was created. BTW, the modification/creation time technique works for me, but I would like to ask the community if there could be any caveats in this case? On Tue, May 28, 2013 at 3:03 PM, Jerry Sievers <gsievers19@xxxxxxxxxxx> wrote: > Virupaksha Kanjilal <v.kanjilal@xxxxxxxxx> writes: > >> Hi >> >> I perform a pg_basebackup with tar option and do not bring in the WAL segments created during the backup. Now I want >> to make the backup a consistent copy and for that I need the WAL segments. How can I know which all WAL segments to >> apply to bring the backup to a consistent state? > > Look in your WAL repository for files named *.backup. > > The prefix part will match the name of a regular WALf file from when > the backup was started and the .backup file itself will contain some > human readable text indicating the last WAL segment that you'll need > for a consistent recovery. > > HTH > >> Thanks >> Viru >> > > -- > Jerry Sievers > Postgres DBA/Development Consulting > e: postgres.consulting@xxxxxxxxxxx > p: 312.241.7800 > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray.ru@xxxxxxxxx -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin