Re: Tests with switch of WAL segment files. - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: Tests with switch of WAL segment files.
Date
Msg-id 4A604FF7020000250002890D@gw.wicourts.gov
Whole thread Raw
In response to Re: Tests with switch of WAL segment files.  ("J. Carlos Muro" <murojc@gmail.com>)
List pgsql-admin
"J. Carlos Muro" <murojc@gmail.com> 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

pgsql-admin by date:

Previous
From: Michael Gould
Date:
Subject: 8.4 contrib binaries
Next
From: Anj Adu
Date:
Subject: migrating from 8.1.x to 8.4