On Fri, Dec 5, 2008 at 11:41 PM, Randy Isbell <[EMAIL PROTECTED]> wrote: > > The following bug has been logged online: > > Bug reference: 4566 > Logged by: Randy Isbell > Email address: [EMAIL PROTECTED] > PostgreSQL version: 8.3.4 > Operating system: FreeBSD 6.2 > Description: pg_stop_backup() reports incorrect STOP WAL LOCATION > Details: > > An inconsistency exists between the segment name reported by > pg_stop_backup() and the actual WAL file name. > > > SELECT pg_start_backup('filename'); > pg_start_backup > ----------------- > 10/FE1E2BAC > (1 row) > > Later: > SELECT pg_stop_backup(); > pg_stop_backup > ---------------- > 10/FF000000 > (1 row) > > The resulting *.backup file: > > START WAL LOCATION: 10/FE1E2BAC (file 0000000200000010000000FE) > STOP WAL LOCATION: 10/FF000000 (file 0000000200000010000000FF) > CHECKPOINT LOCATION: 10/FE1E2BAC > START TIME: 2008-11-09 01:15:06 CST > LABEL: /bck/db/sn200811090115.tar.gz > STOP TIME: 2008-11-09 01:15:48 CST > > In my 8.3.4 instance, WAL file naming occurs as: > > ... > 0000000100000003000000FD > 0000000100000003000000FE > 000000010000000400000000 > 000000010000000400000001 > ... > > WAL files never end in 'FF'. This causes a problem when trying to collect > the ending WAL file for backup.
It's a bug of pg_stop_backup(), which has been talked before. http://archives.postgresql.org/pgsql-hackers/2008-12/msg00108.php Attached is a patch against HEAD. I think that we should also backport. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
? GNUmakefile ? config.log ? config.status ? src/Makefile.global ? src/backend/postgres ? src/backend/catalog/postgres.bki ? src/backend/catalog/postgres.description ? src/backend/catalog/postgres.shdescription ? src/backend/snowball/snowball_create.sql ? src/backend/utils/probes.h ? src/backend/utils/mb/conversion_procs/conversion_create.sql ? src/bin/initdb/initdb ? src/bin/pg_config/pg_config ? src/bin/pg_controldata/pg_controldata ? src/bin/pg_ctl/pg_ctl ? src/bin/pg_dump/pg_dump ? src/bin/pg_dump/pg_dumpall ? src/bin/pg_dump/pg_restore ? src/bin/pg_resetxlog/pg_resetxlog ? src/bin/psql/psql ? src/bin/scripts/clusterdb ? src/bin/scripts/createdb ? src/bin/scripts/createlang ? src/bin/scripts/createuser ? src/bin/scripts/dropdb ? src/bin/scripts/droplang ? src/bin/scripts/dropuser ? src/bin/scripts/reindexdb ? src/bin/scripts/vacuumdb ? src/include/pg_config.h ? src/include/stamp-h ? src/interfaces/ecpg/compatlib/exports.list ? src/interfaces/ecpg/compatlib/libecpg_compat.so.3.1 ? src/interfaces/ecpg/ecpglib/exports.list ? src/interfaces/ecpg/ecpglib/libecpg.so.6.1 ? src/interfaces/ecpg/include/ecpg_config.h ? src/interfaces/ecpg/pgtypeslib/exports.list ? src/interfaces/ecpg/pgtypeslib/libpgtypes.so.3.1 ? src/interfaces/ecpg/preproc/ecpg ? src/interfaces/libpq/exports.list ? src/interfaces/libpq/libpq.so.5.2 ? src/port/pg_config_paths.h ? src/test/regress/log ? src/test/regress/pg_regress ? src/test/regress/results ? src/test/regress/testtablespace ? src/test/regress/tmp_check ? src/test/regress/expected/constraints.out ? src/test/regress/expected/copy.out ? src/test/regress/expected/create_function_1.out ? src/test/regress/expected/create_function_2.out ? src/test/regress/expected/largeobject.out ? src/test/regress/expected/largeobject_1.out ? src/test/regress/expected/misc.out ? src/test/regress/expected/tablespace.out ? src/test/regress/sql/constraints.sql ? src/test/regress/sql/copy.sql ? src/test/regress/sql/create_function_1.sql ? src/test/regress/sql/create_function_2.sql ? src/test/regress/sql/largeobject.sql ? src/test/regress/sql/misc.sql ? src/test/regress/sql/tablespace.sql ? src/timezone/zic Index: src/backend/access/transam/xlog.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/xlog.c,v retrieving revision 1.323 diff -c -r1.323 xlog.c *** src/backend/access/transam/xlog.c 3 Dec 2008 08:20:11 -0000 1.323 --- src/backend/access/transam/xlog.c 6 Dec 2008 04:21:05 -0000 *************** *** 6710,6716 **** */ stoppoint = RequestXLogSwitch(); ! XLByteToSeg(stoppoint, _logId, _logSeg); XLogFileName(stopxlogfilename, ThisTimeLineID, _logId, _logSeg); /* Use the log timezone here, not the session timezone */ --- 6710,6716 ---- */ stoppoint = RequestXLogSwitch(); ! XLByteToPrevSeg(stoppoint, _logId, _logSeg); XLogFileName(stopxlogfilename, ThisTimeLineID, _logId, _logSeg); /* Use the log timezone here, not the session timezone */
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs