Commit b0a738f4 authored by Peter Eisentraut's avatar Peter Eisentraut

Move pg_xlogdump from contrib/ to src/bin/

Reviewed-by: default avatarMichael Paquier <michael.paquier@gmail.com>
parent 0275ecf3
...@@ -37,7 +37,6 @@ SUBDIRS = \ ...@@ -37,7 +37,6 @@ SUBDIRS = \
pgcrypto \ pgcrypto \
pgrowlocks \ pgrowlocks \
pgstattuple \ pgstattuple \
pg_xlogdump \
postgres_fdw \ postgres_fdw \
seg \ seg \
spi \ spi \
......
...@@ -202,6 +202,5 @@ pages. ...@@ -202,6 +202,5 @@ pages.
</para> </para>
&pgstandby; &pgstandby;
&pgxlogdump;
</sect1> </sect1>
</appendix> </appendix>
...@@ -134,7 +134,6 @@ ...@@ -134,7 +134,6 @@
<!ENTITY pgstatstatements SYSTEM "pgstatstatements.sgml"> <!ENTITY pgstatstatements SYSTEM "pgstatstatements.sgml">
<!ENTITY pgstattuple SYSTEM "pgstattuple.sgml"> <!ENTITY pgstattuple SYSTEM "pgstattuple.sgml">
<!ENTITY pgtrgm SYSTEM "pgtrgm.sgml"> <!ENTITY pgtrgm SYSTEM "pgtrgm.sgml">
<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
<!ENTITY postgres-fdw SYSTEM "postgres-fdw.sgml"> <!ENTITY postgres-fdw SYSTEM "postgres-fdw.sgml">
<!ENTITY seg SYSTEM "seg.sgml"> <!ENTITY seg SYSTEM "seg.sgml">
<!ENTITY contrib-spi SYSTEM "contrib-spi.sgml"> <!ENTITY contrib-spi SYSTEM "contrib-spi.sgml">
......
...@@ -196,6 +196,7 @@ Complete list of usable sgml source files in this directory. ...@@ -196,6 +196,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml"> <!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml"> <!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml"> <!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
<!ENTITY postgres SYSTEM "postgres-ref.sgml"> <!ENTITY postgres SYSTEM "postgres-ref.sgml">
<!ENTITY postmaster SYSTEM "postmaster.sgml"> <!ENTITY postmaster SYSTEM "postmaster.sgml">
<!ENTITY psqlRef SYSTEM "psql-ref.sgml"> <!ENTITY psqlRef SYSTEM "psql-ref.sgml">
......
...@@ -266,6 +266,7 @@ ...@@ -266,6 +266,7 @@
&pgtestfsync; &pgtestfsync;
&pgtesttiming; &pgtesttiming;
&pgupgrade; &pgupgrade;
&pgxlogdump;
&postgres; &postgres;
&postmaster; &postmaster;
......
...@@ -26,6 +26,7 @@ SUBDIRS = \ ...@@ -26,6 +26,7 @@ SUBDIRS = \
pg_test_fsync \ pg_test_fsync \
pg_test_timing \ pg_test_timing \
pg_upgrade \ pg_upgrade \
pg_xlogdump \
pgbench \ pgbench \
psql \ psql \
scripts scripts
......
# contrib/pg_xlogdump/Makefile # src/bin/pg_xlogdump/Makefile
PGFILEDESC = "pg_xlogdump - decode and display WAL" PGFILEDESC = "pg_xlogdump - decode and display WAL"
PGAPPICON=win32 PGAPPICON=win32
PROGRAM = pg_xlogdump subdir = src/bin/pg_xlogdump
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
OBJS = pg_xlogdump.o compat.o xlogreader.o rmgrdesc.o \ OBJS = pg_xlogdump.o compat.o xlogreader.o rmgrdesc.o \
$(RMGRDESCOBJS) $(WIN32RES) $(RMGRDESCOBJS) $(WIN32RES)
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
RMGRDESCSOURCES = $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c)) RMGRDESCSOURCES = $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c))
RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES)) RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
EXTRA_CLEAN = $(RMGRDESCSOURCES) xlogreader.c
ifdef USE_PGXS
$(error "pg_xlogdump cannot be built with PGXS")
endif
subdir = contrib/pg_xlogdump
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
all: pg_xlogdump
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) pg_xlogdump: $(OBJS) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/% xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
rm -f $@ && $(LN_S) $< . rm -f $@ && $(LN_S) $< .
$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/% $(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/%
rm -f $@ && $(LN_S) $< . rm -f $@ && $(LN_S) $< .
install: all installdirs
$(INSTALL_PROGRAM) pg_xlogdump$(X) '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
installdirs:
$(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
clean distclean maintainer-clean:
rm -f pg_xlogdump$(X) $(OBJS) $(RMGRDESCSOURCES) xlogreader.c
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 2013-2015, PostgreSQL Global Development Group * Portions Copyright (c) 2013-2015, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* contrib/pg_xlogdump/compat.c * src/bin/pg_xlogdump/compat.c
* *
* This file contains client-side implementations for various backend * This file contains client-side implementations for various backend
* functions that the rm_desc functions in *desc.c files rely on. * functions that the rm_desc functions in *desc.c files rely on.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Copyright (c) 2013-2015, PostgreSQL Global Development Group * Copyright (c) 2013-2015, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* contrib/pg_xlogdump/pg_xlogdump.c * src/bin/pg_xlogdump/pg_xlogdump.c
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* pg_xlogdump resource managers definition * pg_xlogdump resource managers definition
* *
* contrib/pg_xlogdump/rmgrdesc.c * src/bin/pg_xlogdump/rmgrdesc.c
*/ */
#define FRONTEND 1 #define FRONTEND 1
#include "postgres.h" #include "postgres.h"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* pg_xlogdump resource managers declaration * pg_xlogdump resource managers declaration
* *
* contrib/pg_xlogdump/rmgrdesc.h * src/bin/pg_xlogdump/rmgrdesc.h
*/ */
#ifndef RMGRDESC_H #ifndef RMGRDESC_H
#define RMGRDESC_H #define RMGRDESC_H
......
...@@ -35,12 +35,10 @@ my @contrib_uselibpq = ...@@ -35,12 +35,10 @@ my @contrib_uselibpq =
my @contrib_uselibpgport = ( my @contrib_uselibpgport = (
'oid2name', 'oid2name',
'pg_standby', 'pg_standby',
'pg_xlogdump',
'vacuumlo'); 'vacuumlo');
my @contrib_uselibpgcommon = ( my @contrib_uselibpgcommon = (
'oid2name', 'oid2name',
'pg_standby', 'pg_standby',
'pg_xlogdump',
'vacuumlo'); 'vacuumlo');
my $contrib_extralibs = undef; my $contrib_extralibs = undef;
my $contrib_extraincludes = my $contrib_extraincludes =
...@@ -53,8 +51,8 @@ my @contrib_excludes = ('pgcrypto', 'commit_ts', 'intagg', 'sepgsql'); ...@@ -53,8 +51,8 @@ my @contrib_excludes = ('pgcrypto', 'commit_ts', 'intagg', 'sepgsql');
# Set of variables for frontend modules # Set of variables for frontend modules
my $frontend_defines = { 'initdb' => 'FRONTEND' }; my $frontend_defines = { 'initdb' => 'FRONTEND' };
my @frontend_uselibpq = ('pg_ctl', 'pg_upgrade', 'pgbench', 'psql'); my @frontend_uselibpq = ('pg_ctl', 'pg_upgrade', 'pgbench', 'psql');
my @frontend_uselibpgport = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pgbench' ); my @frontend_uselibpgport = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pg_xlogdump', 'pgbench' );
my @frontend_uselibpgcommon = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pgbench' ); my @frontend_uselibpgcommon = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pg_xlogdump', 'pgbench' );
my $frontend_extralibs = { my $frontend_extralibs = {
'initdb' => ['ws2_32.lib'], 'initdb' => ['ws2_32.lib'],
'pg_restore' => ['ws2_32.lib'], 'pg_restore' => ['ws2_32.lib'],
...@@ -69,7 +67,7 @@ my $frontend_extrasource = { ...@@ -69,7 +67,7 @@ my $frontend_extrasource = {
[ 'src\bin\pgbench\exprscan.l', 'src\bin\pgbench\exprparse.y' ], [ 'src\bin\pgbench\exprscan.l', 'src\bin\pgbench\exprparse.y' ],
}; };
my @frontend_excludes = my @frontend_excludes =
('pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', 'scripts'); ('pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', 'pg_xlogdump', 'scripts');
sub mkvcbuild sub mkvcbuild
{ {
...@@ -648,9 +646,7 @@ sub mkvcbuild ...@@ -648,9 +646,7 @@ sub mkvcbuild
# fix up pg_xlogdump once it's been set up # fix up pg_xlogdump once it's been set up
# files symlinked on Unix are copied on windows # files symlinked on Unix are copied on windows
my $pg_xlogdump = my $pg_xlogdump = AddSimpleFrontend('pg_xlogdump');
(grep { $_->{name} eq 'pg_xlogdump' }
@{ $solution->{projects}->{contrib} })[0];
$pg_xlogdump->AddDefine('FRONTEND'); $pg_xlogdump->AddDefine('FRONTEND');
foreach my $xf (glob('src\\backend\\access\\rmgrdesc\\*desc.c')) foreach my $xf (glob('src\\backend\\access\\rmgrdesc\\*desc.c'))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment