"J. Carlos Muro" <murojc@xxxxxxxxx> wrote: >> Hi! I am trying to better understand when switch of WAL files takes >> place. I believe that it happens when the file is full, when pg_xlog_switch is run (if there has been anything written to the current WAL file). I think, at least in some version, a switch is also forced at certain points in the shutdown or recovery phases. Some of the examples you showed didn't switch files when you expected because you were running statements which bypass WAL logging. (In particular, inserting rows into a table in the same transaction in which the table is created, when archiving is off, doesn't require WAL logging -- if the transaction rolls back the table will be gone anyway.) I hope this helps. -Kevin -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin