pgsql: Pre-pad WAL files when streaming transaction log

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Pre-pad WAL files when streaming transaction log
Date: 2011-11-03 14:39:31
Message-ID: E1RLyS3-0005Om-MK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Pre-pad WAL files when streaming transaction log

Instead of filling files as they appear, pre-pad the
WAL files received when streaming xlog the same way
that the server does. Data is streamed into a .partial
file which is then renamed()d into palce when it's complete,
but it will always be 16MB.

This also means that the starting position for pg_receivexlog
is now simply right after the last complete segment, and we
never need to deal with partial segments there.

Patch by me, review by Fujii Masao

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e7cc8437bbff99cbc7f07f852f5169ba1356a414

Modified Files
--------------
src/bin/pg_basebackup/pg_receivexlog.c | 81 +++------------------
src/bin/pg_basebackup/receivelog.c | 123 +++++++++++++++++++++++++++++---
2 files changed, 125 insertions(+), 79 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2011-11-03 14:44:32 pgsql: Properly close replication connection in pg_receivexlog
Previous Message Heikki Linnakangas 2011-11-03 11:56:44 pgsql: Support range data types.