Обсуждение: pgsql: Split xlog.c into xlog.c and xlogrecovery.c.

Поиск
Список
Период
Сортировка

pgsql: Split xlog.c into xlog.c and xlogrecovery.c.

От
Heikki Linnakangas
Дата:
Split xlog.c into xlog.c and xlogrecovery.c.

This moves the functions related to performing WAL recovery into the new
xlogrecovery.c source file, leaving xlog.c responsible for maintaining
the WAL buffers, coordinating the startup and switch from recovery to
normal operations, and other miscellaneous stuff that have always been in
xlog.c.

Reviewed-by: Andres Freund, Kyotaro Horiguchi, Robert Haas
Discussion: https://www.postgresql.org/message-id/a31f27b4-a31d-f976-6217-2b03be646ffa%40iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/70e81861fadd9112fa2d425c762e163910a4ee52

Modified Files
--------------
contrib/pg_prewarm/autoprewarm.c               |    1 +
src/backend/access/transam/Makefile            |    1 +
src/backend/access/transam/xact.c              |    1 +
src/backend/access/transam/xlog.c              | 4623 ++----------------------
src/backend/access/transam/xlogfuncs.c         |    2 +-
src/backend/access/transam/xlogrecovery.c      | 4537 +++++++++++++++++++++++
src/backend/access/transam/xlogutils.c         |    6 +-
src/backend/postmaster/checkpointer.c          |    1 +
src/backend/postmaster/postmaster.c            |    1 +
src/backend/postmaster/startup.c               |    1 +
src/backend/replication/logical/logicalfuncs.c |    1 +
src/backend/replication/slotfuncs.c            |    1 +
src/backend/replication/walreceiver.c          |    1 +
src/backend/replication/walreceiverfuncs.c     |    1 +
src/backend/replication/walsender.c            |    1 +
src/backend/storage/ipc/ipci.c                 |    3 +
src/backend/storage/ipc/standby.c              |    1 +
src/backend/storage/sync/sync.c                |    1 +
src/backend/utils/misc/guc.c                   |    1 +
src/include/access/xlog.h                      |   87 +-
src/include/access/xlogrecovery.h              |  157 +
src/tools/pgindent/typedefs.list               |    2 +
22 files changed, 4982 insertions(+), 4449 deletions(-)


Re: pgsql: Split xlog.c into xlog.c and xlogrecovery.c.

От
Heikki Linnakangas
Дата:
There are some segfaults in the buildfarm because of this, eg:

Program terminated with signal 11, Segmentation fault.
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 
2) [in module /usr/libexec/ld.so]
#0  memcpy (dst0=Variable "dst0" is not available.
) at /usr/src/lib/libc/string/memcpy.c:103
103    /usr/src/lib/libc/string/memcpy.c: No such file or directory.
    in /usr/src/lib/libc/string/memcpy.c
#0  memcpy (dst0=Variable "dst0" is not available.
) at /usr/src/lib/libc/string/memcpy.c:103
#1  0x00000317017597c3 in StartupXLOG () at xlog.c:5457
#2  0x0000031701c2413e in InitPostgres (in_dbname=0x0, dboid=0, 
username=0x0,
     useroid=0, out_dbname=0x0) at postinit.c:727
#3  0x000003170177265b in BootstrapModeMain (argc=6, argv=0x7f7ffffbbb90)
     at bootstrap.c:358
#4  0x000003170191f3da in main (argc=7, argv=0x7f7ffffbbb88) at main.c:191
Current language:  auto; currently minimal
$1 = void

I will investigate..

- Heikki