How to avoid modifications during pg_dumpall
From the pg_dump documentation : 


  It makes consistent backups even if the database is being used
  concurrently.


So the backup process takes a snapshot of the DB on a specific moment so each commits which are made during the process are ignored.