Use SET TRANSACTION READ ONLY in pg_dump, if server supports it.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 19 Jan 2013 22:56:40 +0000 (17:56 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 19 Jan 2013 22:56:40 +0000 (17:56 -0500)
commit26d905a12dda783783c60cec04decb00cd2e67f4
tree81593b7d91036be3ca5bbc67116db9ac009970c3
parent4b94cfb5647c97a80368346ee0a17f40d301cb63
Use SET TRANSACTION READ ONLY in pg_dump, if server supports it.

This currently does little except serve as documentation.  (The one case
where it has a performance benefit, SERIALIZABLE mode in 9.1 and up, was
already using READ ONLY mode.)  However, it's possible that it might have
performance benefits in future, and in any case it seems like good
practice since it would catch any accidentally non-read-only operations.

Pavan Deolasee
src/bin/pg_dump/pg_dump.c