Reverse out XLogDir/-X write-ahead log handling, per discussion.

Original patch from Thomas.
This commit is contained in:
Bruce Momjian 2002-08-17 15:12:07 +00:00
parent 7c02c86d0f
commit d04e9137c9
8 changed files with 57 additions and 157 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.101 2002/08/06 02:36:33 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.102 2002/08/17 15:12:06 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -398,8 +398,7 @@ static ControlFileData *ControlFile = NULL;
/* File path names */ /* File path names */
char *XLogDir = NULL; static char XLogDir[MAXPGPATH];
static char ControlFilePath[MAXPGPATH]; static char ControlFilePath[MAXPGPATH];
/* /*
@ -2075,29 +2074,11 @@ ValidXLOGHeader(XLogPageHeader hdr, int emode, bool checkSUI)
* I/O and compatibility-check functions, but there seems no need currently. * I/O and compatibility-check functions, but there seems no need currently.
*/ */
void
SetXLogDir(char *path)
{
char *xsubdir = "/pg_xlog";
if (path != NULL)
{
XLogDir = malloc(strlen(path)+1);
strcpy(XLogDir, path);
}
else
{
XLogDir = malloc(strlen(DataDir)+strlen(xsubdir)+1);
snprintf(XLogDir, MAXPGPATH, "%s%s", DataDir, xsubdir);
}
}
void void
XLOGPathInit(void) XLOGPathInit(void)
{ {
/* Init XLOG file paths */ /* Init XLOG file paths */
if (XLogDir == NULL) snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir);
SetXLogDir(NULL);
snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir); snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir);
} }

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.137 2002/08/10 20:29:17 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.138 2002/08/17 15:12:06 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -222,7 +222,6 @@ BootstrapMain(int argc, char *argv[])
int flag; int flag;
int xlogop = BS_XLOG_NOP; int xlogop = BS_XLOG_NOP;
char *potential_DataDir = NULL; char *potential_DataDir = NULL;
char *potential_XLogDir = NULL;
/* /*
* initialize globals * initialize globals
@ -249,22 +248,17 @@ BootstrapMain(int argc, char *argv[])
if (!IsUnderPostmaster) if (!IsUnderPostmaster)
{ {
InitializeGUCOptions(); InitializeGUCOptions();
/* Null if no PGDATA variable */ potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA
potential_DataDir = getenv("PGDATA"); * variable */
/* Null if no PGXLOG variable */
potential_XLogDir = getenv("PGXLOG");
} }
while ((flag = getopt(argc, argv, "B:d:D:X:Fo:px:")) != -1) while ((flag = getopt(argc, argv, "B:d:D:Fo:px:")) != -1)
{ {
switch (flag) switch (flag)
{ {
case 'D': case 'D':
potential_DataDir = optarg; potential_DataDir = optarg;
break; break;
case 'X':
potential_XLogDir = optarg;
break;
case 'd': case 'd':
{ {
/* Turn on debugging for the bootstrap process. */ /* Turn on debugging for the bootstrap process. */
@ -319,7 +313,6 @@ BootstrapMain(int argc, char *argv[])
proc_exit(1); proc_exit(1);
} }
SetDataDir(potential_DataDir); SetDataDir(potential_DataDir);
SetXLogDir(potential_XLogDir);
} }
/* Validate we have been given a reasonable-looking DataDir */ /* Validate we have been given a reasonable-looking DataDir */

View File

@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.283 2002/08/10 20:29:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.284 2002/08/17 15:12:06 momjian Exp $
* *
* NOTES * NOTES
* *
@ -346,7 +346,6 @@ PostmasterMain(int argc, char *argv[])
int status; int status;
char original_extraoptions[MAXPGPATH]; char original_extraoptions[MAXPGPATH];
char *potential_DataDir = NULL; char *potential_DataDir = NULL;
char *potential_XLogDir = NULL;
*original_extraoptions = '\0'; *original_extraoptions = '\0';
@ -404,11 +403,10 @@ PostmasterMain(int argc, char *argv[])
InitializeGUCOptions(); InitializeGUCOptions();
potential_DataDir = getenv("PGDATA"); /* default value */ potential_DataDir = getenv("PGDATA"); /* default value */
potential_XLogDir = getenv("PGXLOG"); /* default value */
opterr = 1; opterr = 1;
while ((opt = getopt(argc, argv, "A:a:B:b:c:D:X:d:Fh:ik:lm:MN:no:p:Ss-:")) != -1) while ((opt = getopt(argc, argv, "A:a:B:b:c:D:d:Fh:ik:lm:MN:no:p:Ss-:")) != -1)
{ {
switch (opt) switch (opt)
{ {
@ -431,9 +429,6 @@ PostmasterMain(int argc, char *argv[])
case 'D': case 'D':
potential_DataDir = optarg; potential_DataDir = optarg;
break; break;
case 'X':
potential_XLogDir = optarg;
break;
case 'd': case 'd':
{ {
/* Turn on debugging for the postmaster. */ /* Turn on debugging for the postmaster. */
@ -568,7 +563,6 @@ PostmasterMain(int argc, char *argv[])
checkDataDir(potential_DataDir); /* issues error messages */ checkDataDir(potential_DataDir); /* issues error messages */
SetDataDir(potential_DataDir); SetDataDir(potential_DataDir);
SetXLogDir(potential_XLogDir);
ProcessConfigFile(PGC_POSTMASTER); ProcessConfigFile(PGC_POSTMASTER);

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.282 2002/08/15 16:36:05 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.283 2002/08/17 15:12:07 momjian Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
@ -1120,7 +1120,6 @@ PostgresMain(int argc, char *argv[], const char *username)
StringInfo parser_input; StringInfo parser_input;
char *potential_DataDir = NULL; char *potential_DataDir = NULL;
char *potential_XLogDir = NULL;
/* /*
* Catch standard options before doing much else. This even works on * Catch standard options before doing much else. This even works on
@ -1164,7 +1163,6 @@ PostgresMain(int argc, char *argv[], const char *username)
{ {
InitializeGUCOptions(); InitializeGUCOptions();
potential_DataDir = getenv("PGDATA"); potential_DataDir = getenv("PGDATA");
potential_XLogDir = getenv("PGXLOG");
} }
/* ---------------- /* ----------------
@ -1189,7 +1187,7 @@ PostgresMain(int argc, char *argv[], const char *username)
ctx = PGC_POSTMASTER; ctx = PGC_POSTMASTER;
gucsource = PGC_S_ARGV; /* initial switches came from command line */ gucsource = PGC_S_ARGV; /* initial switches came from command line */
while ((flag = getopt(argc, argv, "A:B:c:CD:X:d:Eef:FiNOPo:p:S:st:v:W:x:-:")) != -1) while ((flag = getopt(argc, argv, "A:B:c:CD:d:Eef:FiNOPo:p:S:st:v:W:x:-:")) != -1)
switch (flag) switch (flag)
{ {
case 'A': case 'A':
@ -1221,11 +1219,6 @@ PostgresMain(int argc, char *argv[], const char *username)
potential_DataDir = optarg; potential_DataDir = optarg;
break; break;
case 'X': /* PGXLOG directory */
if (secure)
potential_XLogDir = optarg;
break;
case 'd': /* debug level */ case 'd': /* debug level */
{ {
/* Set server debugging level. */ /* Set server debugging level. */
@ -1517,7 +1510,6 @@ PostgresMain(int argc, char *argv[], const char *username)
proc_exit(1); proc_exit(1);
} }
SetDataDir(potential_DataDir); SetDataDir(potential_DataDir);
SetXLogDir(potential_XLogDir);
} }
Assert(DataDir); Assert(DataDir);
@ -1674,7 +1666,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if (!IsUnderPostmaster) if (!IsUnderPostmaster)
{ {
puts("\nPOSTGRES backend interactive interface "); puts("\nPOSTGRES backend interactive interface ");
puts("$Revision: 1.282 $ $Date: 2002/08/15 16:36:05 $\n"); puts("$Revision: 1.283 $ $Date: 2002/08/17 15:12:07 $\n");
} }
/* /*

View File

@ -27,7 +27,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.167 2002/08/17 13:04:15 momjian Exp $ # $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.168 2002/08/17 15:12:07 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -252,19 +252,6 @@ do
-D*) -D*)
PGDATA=`echo $1 | sed 's/^-D//'` PGDATA=`echo $1 | sed 's/^-D//'`
;; ;;
# Directory to hold WAL log files.
--pgxlog|-X)
PGXLOG="$2"
defined_pgxlog=yes
shift;;
--pgxlog=*)
PGXLOG=`echo $1 | sed 's/^--pgxlog=//'`
defined_pgxlog=yes
;;
-X*)
PGXLOG=`echo $1 | sed 's/^-X//'`
defined_pgxlog=yes
;;
# The directory where the .bki input files are stored. Normally # The directory where the .bki input files are stored. Normally
# they are in PREFIX/share and this option should be unnecessary. # they are in PREFIX/share and this option should be unnecessary.
-L) -L)
@ -354,7 +341,6 @@ if [ "$usage" ]; then
echo echo
echo "Options:" echo "Options:"
echo " [-D, --pgdata] DATADIR Location for this database cluster" echo " [-D, --pgdata] DATADIR Location for this database cluster"
echo " [-X, --pgxlog] XLOGDIR Location for the cluster transaction logs"
echo " -W, --pwprompt Prompt for a password for the new superuser" echo " -W, --pwprompt Prompt for a password for the new superuser"
if [ -n "$MULTIBYTE" ] ; then if [ -n "$MULTIBYTE" ] ; then
echo " -E, --encoding ENCODING Set default encoding for new databases" echo " -E, --encoding ENCODING Set default encoding for new databases"
@ -415,11 +401,6 @@ then
exit 1 exit 1
fi fi
if [ -z "$PGXLOG" ]
then
PGXLOG="$PGDATA"/pg_xlog
fi
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# Find the input files # Find the input files
@ -437,7 +418,7 @@ then
( (
echo echo
echo "initdb variables:" echo "initdb variables:"
for var in PGDATA PGXLOG datadir PGPATH MULTIBYTE MULTIBYTEID \ for var in PGDATA datadir PGPATH MULTIBYTE MULTIBYTEID \
POSTGRES_SUPERUSERNAME POSTGRES_BKI \ POSTGRES_SUPERUSERNAME POSTGRES_BKI \
POSTGRES_DESCR POSTGRESQL_CONF_SAMPLE \ POSTGRES_DESCR POSTGRESQL_CONF_SAMPLE \
PG_HBA_SAMPLE PG_IDENT_SAMPLE ; do PG_HBA_SAMPLE PG_IDENT_SAMPLE ; do
@ -522,61 +503,44 @@ then
echo "$CMDNAME: The directory $PGDATA exists but is not empty." echo "$CMDNAME: The directory $PGDATA exists but is not empty."
echo "If you want to create a new database system, either remove or empty" echo "If you want to create a new database system, either remove or empty"
echo "the directory $PGDATA or run initdb with" echo "the directory $PGDATA or run initdb with"
echo "an argument for -D other than $PGDATA." echo "an argument other than $PGDATA."
) 1>&2 ) 1>&2
exit 1 exit 1
fi
# find out if transaction log directory is empty
pgxlog_contents=`ls -A "$PGXLOG" 2>/dev/null`
if [ x"$pgxlog_contents" != x ]
then
(
echo "$CMDNAME: The directory $PGXLOG exists but is not empty."
echo "If you want to create a new transaction log, either remove or empty"
echo "the directory $PGXLOG or run initdb with"
echo "an argument for -X other than $PGXLOG."
) 1>&2
exit 1
fi
if [ ! -d "$PGDATA" ]; then
$ECHO_N "creating directory $PGDATA... "$ECHO_C
mkdir -p "$PGDATA" >/dev/null 2>&1 || mkdir "$PGDATA" || exit_nicely
made_new_pgdata=yes
else else
$ECHO_N "Fixing permissions on existing directory $PGDATA... "$ECHO_C if [ ! -d "$PGDATA" ]; then
chmod go-rwx "$PGDATA" || exit_nicely $ECHO_N "creating directory $PGDATA... "$ECHO_C
fi mkdir -p "$PGDATA" >/dev/null 2>&1 || mkdir "$PGDATA" || exit_nicely
echo "ok" made_new_pgdata=yes
else
$ECHO_N "Fixing permissions on existing directory $PGDATA... "$ECHO_C
chmod go-rwx "$PGDATA" || exit_nicely
fi
echo "ok"
if [ ! -d "$PGXLOG" ]; then if [ ! -d "$PGDATA"/base ]
$ECHO_N "creating directory $PGXLOG... "$ECHO_C then
mkdir -p "$PGXLOG" >/dev/null 2>&1 || mkdir "$PGXLOG" || exit_nicely $ECHO_N "creating directory $PGDATA/base... "$ECHO_C
made_new_pgxlog=yes mkdir "$PGDATA"/base || exit_nicely
else echo "ok"
$ECHO_N "Fixing permissions on existing directory $PGXLOG... "$ECHO_C fi
chmod go-rwx "$PGXLOG" || exit_nicely if [ ! -d "$PGDATA"/global ]
fi then
echo "ok" $ECHO_N "creating directory $PGDATA/global... "$ECHO_C
mkdir "$PGDATA"/global || exit_nicely
if [ ! -d "$PGDATA"/base ] echo "ok"
then fi
$ECHO_N "creating directory $PGDATA/base... "$ECHO_C if [ ! -d "$PGDATA"/pg_xlog ]
mkdir "$PGDATA"/base || exit_nicely then
echo "ok" $ECHO_N "creating directory $PGDATA/pg_xlog... "$ECHO_C
fi mkdir "$PGDATA"/pg_xlog || exit_nicely
if [ ! -d "$PGDATA"/global ] echo "ok"
then fi
$ECHO_N "creating directory $PGDATA/global... "$ECHO_C if [ ! -d "$PGDATA"/pg_clog ]
mkdir "$PGDATA"/global || exit_nicely then
echo "ok" $ECHO_N "creating directory $PGDATA/pg_clog... "$ECHO_C
fi mkdir "$PGDATA"/pg_clog || exit_nicely
if [ ! -d "$PGDATA"/pg_clog ] echo "ok"
then fi
$ECHO_N "creating directory $PGDATA/pg_clog... "$ECHO_C
mkdir "$PGDATA"/pg_clog || exit_nicely
echo "ok"
fi fi
@ -585,7 +549,7 @@ fi
# RUN BKI SCRIPT IN BOOTSTRAP MODE TO CREATE TEMPLATE1 # RUN BKI SCRIPT IN BOOTSTRAP MODE TO CREATE TEMPLATE1
# common backend options # common backend options
PGSQL_OPT="-F -D$PGDATA -X$PGXLOG" PGSQL_OPT="-F -D$PGDATA"
if [ "$debug" = yes ] if [ "$debug" = yes ]
then then
@ -1130,24 +1094,14 @@ echo "ok"
# #
# FINISHED # FINISHED
postmaster_startup="$PGPATH/postmaster -D $PGDATA"
if [ x"$defined_pgxlog" != x ]; then
postmaster_startup="$postmaster_startup -X $PGXLOG"
fi
pg_ctl_startup="$PGPATH/pg_ctl -D $PGDATA"
if [ x"$defined_pgxlog" != x ]; then
pg_ctl_startup="$pg_ctl_startup -X $PGXLOG"
fi
pg_ctl_startup="$pg_ctl_startup -l logfile start"
echo echo
echo "Success. You can now start the database server using:" echo "Success. You can now start the database server using:"
echo "" echo ""
echo " $postmaster_startup" echo " $PGPATH/postmaster -D $PGDATA"
echo "or" echo "or"
# (Advertise -l option here, otherwise we have a background # (Advertise -l option here, otherwise we have a background
# process writing to the terminal.) # process writing to the terminal.)
echo " $pg_ctl_startup" echo " $PGPATH/pg_ctl -D $PGDATA -l logfile start"
echo echo
exit 0 exit 0

View File

@ -8,7 +8,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.28 2002/08/04 06:26:38 thomas Exp $ # $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.29 2002/08/17 15:12:07 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -19,23 +19,20 @@ $CMDNAME is a utility to start, stop, restart, reload configuration files,
or report the status of a PostgreSQL server. or report the status of a PostgreSQL server.
Usage: Usage:
$CMDNAME start [-w] [-D DATADIR] [-s] [-X PGXLOG] [-l FILENAME] [-o \"OPTIONS\"] $CMDNAME start [-w] [-D DATADIR] [-s] [-l FILENAME] [-o \"OPTIONS\"]
$CMDNAME stop [-W] [-D DATADIR] [-s] [-m SHUTDOWN-MODE] $CMDNAME stop [-W] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]
$CMDNAME restart [-w] [-D DATADIR] [-s] [-X PGXLOG] [-m SHUTDOWN-MODE] [-o \"OPTIONS\"] $CMDNAME restart [-w] [-D DATADIR] [-s] [-m SHUTDOWN-MODE] [-o \"OPTIONS\"]
$CMDNAME reload [-D DATADIR] [-s] $CMDNAME reload [-D DATADIR] [-s]
$CMDNAME status [-D DATADIR] $CMDNAME status [-D DATADIR]
Common options: Common options:
-D DATADIR Location of the database storage area -D DATADIR Location of the database storage area
-X XLOGDIR Location of the WAL log file storage area
-s Only print errors, no informational messages -s Only print errors, no informational messages
-w Wait until operation completes -w Wait until operation completes
-W Do not wait until operation completes -W Do not wait until operation completes
(The default is to wait for shutdown, but not for start or restart.) (The default is to wait for shutdown, but not for start or restart.)
If the -D option is omitted, the environment variable PGDATA is used. If the -D option is omitted, the environment variable PGDATA is used.
If the -X option is omitted, the environment variable PGXLOG is used
or the postmaster defaults to looking in $PGDATA/pg_xlog.
Options for start or restart: Options for start or restart:
-l FILENAME Write (or append) server log to FILENAME. The -l FILENAME Write (or append) server log to FILENAME. The
@ -135,12 +132,6 @@ do
PGDATA="$1" PGDATA="$1"
export PGDATA export PGDATA
;; ;;
-X)
shift
# pass environment into new postmaster
PGXLOG="$1"
export PGXLOG
;;
-l) -l)
logfile="$2" logfile="$2"
shift;; shift;;

View File

@ -23,7 +23,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.1 2002/08/17 02:44:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.2 2002/08/17 15:12:07 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -67,7 +67,7 @@
static char *DataDir; /* locations of important stuff */ static char *DataDir; /* locations of important stuff */
static char *XLogDir; static char XLogDir[MAXPGPATH];
static char ControlFilePath[MAXPGPATH]; static char ControlFilePath[MAXPGPATH];
static ControlFileData ControlFile; /* pg_control values */ static ControlFileData ControlFile; /* pg_control values */
@ -527,7 +527,6 @@ main(int argc, char **argv)
DataDir = argv[argn++]; DataDir = argv[argn++];
XLogDir=malloc(MAXPGPATH);
snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir); snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir);
snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir); snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir);

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: xlog.h,v 1.34 2002/08/06 02:36:35 tgl Exp $ * $Id: xlog.h,v 1.35 2002/08/17 15:12:07 momjian Exp $
*/ */
#ifndef XLOG_H #ifndef XLOG_H
#define XLOG_H #define XLOG_H
@ -175,9 +175,6 @@ typedef struct XLogRecData
struct XLogRecData *next; struct XLogRecData *next;
} XLogRecData; } XLogRecData;
/* XLOG directory name */
extern char *XLogDir;
extern StartUpID ThisStartUpID; /* current SUI */ extern StartUpID ThisStartUpID; /* current SUI */
extern bool InRecovery; extern bool InRecovery;
extern XLogRecPtr MyLastRecPtr; extern XLogRecPtr MyLastRecPtr;
@ -193,7 +190,6 @@ extern int XLOG_DEBUG;
extern char *XLOG_sync_method; extern char *XLOG_sync_method;
extern const char XLOG_sync_method_default[]; extern const char XLOG_sync_method_default[];
extern void SetXLogDir(char *path);
extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata); extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata);
extern void XLogFlush(XLogRecPtr RecPtr); extern void XLogFlush(XLogRecPtr RecPtr);