Robert Haas <robertmhaas@gmail.com> writes:
> Or ... maybe this is intentional behavior? Now that I think about it,
> doesn't each backend cache this info the first time its transaction
> reads the data?
Your view of pg_stat_activity is supposed to hold still within a
transaction, yes. Otherwise it'd be really painful to do any complicated
joins. I think there may be a function to explicitly flush the cache,
if you really need to see intratransaction changes.
regards, tom lane