aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2015-06-09 03:03:24 +0900
committerFujii Masao <fujii@postgresql.org>2015-06-09 03:03:24 +0900
commit7abc68597436da1475b4d9b08f4fa9f3c5ed6185 (patch)
tree006e323dfd135b511b369b9d4bbf7e145609ca83 /src/backend/access/gist/gistxlog.c
parentd1b958218ac183d0e88348341ff6ba31397086ad (diff)
downloadpostgresql-7abc68597436da1475b4d9b08f4fa9f3c5ed6185.tar.gz
postgresql-7abc68597436da1475b4d9b08f4fa9f3c5ed6185.zip
Refactor WAL segment copying code.
* Remove unused argument "dstfname" and related code from XLogFileCopy(). * Previously XLogFileCopy() returned a pstrdup'd string so that InstallXLogFileSegment() used it later. Since the pstrdup'd string was never free'd, there could be a risk of memory leak. It was almost harmless because the startup process exited just after calling XLogFileCopy(), it existed. This commit changes XLogFileCopy() so that it directly calls InstallXLogFileSegment() and doesn't call pstrdup() at all. Which fixes that memory leak problem. * Extend InstallXLogFileSegment() so that the caller can specify the log level. Which allows us to emit an error when InstallXLogFileSegment() fails a disk file access like link() and rename(). Previously it was always logged with LOG level and additionally needed to be logged with ERROR when we wanted to treat it as an error. Michael Paquier
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions