How are Postgres database files updated?
The linked documentation page says:


  Each table and index is stored in a separate file. […]
  each table and index has a free space map … stored in a file named with the filenode number plus the suffix _fsm. Tables also have a visibility map, stored in a fork with the suffix _vm


So the actual table data ends up in a single file, or in multiple segments all belonging to the same 'virtual' file.

However, a table update can also affect indexes, or statistical information in the system tables.

In any case, the WAL tracks all changes to all tables, and at the end of each transaction, all files are in a coherent state.