Postgres XLOG_SWITCH

I am trying to understand the implementation of WAL in Postgres 9.3.5. There is an XLOG_SWITCH parameter in the xlog.c file that I do not understand. I searched for this option, but I did not find any useful information. Can someone explain the purpose of this parameter?

+4
source share
1 answer

Changes to the database are stored in xlog files, the default size of which is 16 MB, mainly for recovering from a failure or a hot standby server, which means that the server must fill in the file using commands of the type create table, insert intoetc. They cause the log to switch before 16MB is full, you don’t want to wait to transfer the current xlog to the backup server, and they are also reasons to expand this size, and this is because you consider that 16 MB is a bit. and transactions in your database generate so many xlog files, the size for switching xlogs depends on the amount of data that you are ready to lose

+3
source

All Articles