77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
99 * IDENTIFICATION
10- *$PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.24 2006/10/04 00:29:49 momjian Exp $
10+ *$PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.25 2006/10/06 17:13:58 petere Exp $
1111 *
1212 * NOTES
1313 *Each global transaction is associated with a global transaction
@@ -866,7 +866,7 @@ EndPrepare(GlobalTransaction gxact)
866866if (fd < 0 )
867867ereport (ERROR ,
868868(errcode_for_file_access (),
869- errmsg ("could not createtwophase state file \"%s\": %m" ,
869+ errmsg ("could not createtwo-phase state file \"%s\": %m" ,
870870path )));
871871
872872/* Write data to file, and calculate CRC as we pass over it */
@@ -880,7 +880,7 @@ EndPrepare(GlobalTransaction gxact)
880880close (fd );
881881ereport (ERROR ,
882882(errcode_for_file_access (),
883- errmsg ("could not writetwophase state file: %m" )));
883+ errmsg ("could not writetwo-phase state file: %m" )));
884884}
885885}
886886
@@ -897,7 +897,7 @@ EndPrepare(GlobalTransaction gxact)
897897close (fd );
898898ereport (ERROR ,
899899(errcode_for_file_access (),
900- errmsg ("could not writetwophase state file: %m" )));
900+ errmsg ("could not writetwo-phase state file: %m" )));
901901}
902902
903903/* Back up to prepare for rewriting the CRC */
@@ -906,7 +906,7 @@ EndPrepare(GlobalTransaction gxact)
906906close (fd );
907907ereport (ERROR ,
908908(errcode_for_file_access (),
909- errmsg ("could not seek intwophase state file: %m" )));
909+ errmsg ("could not seek intwo-phase state file: %m" )));
910910}
911911
912912/*
@@ -946,13 +946,13 @@ EndPrepare(GlobalTransaction gxact)
946946close (fd );
947947ereport (ERROR ,
948948(errcode_for_file_access (),
949- errmsg ("could not writetwophase state file: %m" )));
949+ errmsg ("could not writetwo-phase state file: %m" )));
950950}
951951
952952if (close (fd )!= 0 )
953953ereport (ERROR ,
954954(errcode_for_file_access (),
955- errmsg ("could not closetwophase state file: %m" )));
955+ errmsg ("could not closetwo-phase state file: %m" )));
956956
957957/*
958958 * Mark the prepared transaction as valid.As soon as xact.c marks MyProc
@@ -1022,7 +1022,7 @@ ReadTwoPhaseFile(TransactionId xid)
10221022{
10231023ereport (WARNING ,
10241024(errcode_for_file_access (),
1025- errmsg ("could not opentwophase state file \"%s\": %m" ,
1025+ errmsg ("could not opentwo-phase state file \"%s\": %m" ,
10261026path )));
10271027return NULL ;
10281028}
@@ -1036,7 +1036,7 @@ ReadTwoPhaseFile(TransactionId xid)
10361036close (fd );
10371037ereport (WARNING ,
10381038(errcode_for_file_access (),
1039- errmsg ("could not stattwophase state file \"%s\": %m" ,
1039+ errmsg ("could not stattwo-phase state file \"%s\": %m" ,
10401040path )));
10411041return NULL ;
10421042}
@@ -1067,7 +1067,7 @@ ReadTwoPhaseFile(TransactionId xid)
10671067close (fd );
10681068ereport (WARNING ,
10691069(errcode_for_file_access (),
1070- errmsg ("could not readtwophase state file \"%s\": %m" ,
1070+ errmsg ("could not readtwo-phase state file \"%s\": %m" ,
10711071path )));
10721072pfree (buf );
10731073return NULL ;
@@ -1128,7 +1128,7 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
11281128if (buf == NULL )
11291129ereport (ERROR ,
11301130(errcode (ERRCODE_DATA_CORRUPTED ),
1131- errmsg ("twophase state file for transaction %u is corrupt" ,
1131+ errmsg ("two-phase state file for transaction %u is corrupt" ,
11321132xid )));
11331133
11341134/*
@@ -1250,7 +1250,7 @@ RemoveTwoPhaseFile(TransactionId xid, bool giveWarning)
12501250if (errno != ENOENT || giveWarning )
12511251ereport (WARNING ,
12521252(errcode_for_file_access (),
1253- errmsg ("could not removetwophase state file \"%s\": %m" ,
1253+ errmsg ("could not removetwo-phase state file \"%s\": %m" ,
12541254path )));
12551255}
12561256
@@ -1279,7 +1279,7 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
12791279if (fd < 0 )
12801280ereport (ERROR ,
12811281(errcode_for_file_access (),
1282- errmsg ("could not recreatetwophase state file \"%s\": %m" ,
1282+ errmsg ("could not recreatetwo-phase state file \"%s\": %m" ,
12831283path )));
12841284
12851285/* Write content and CRC */
@@ -1288,14 +1288,14 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
12881288close (fd );
12891289ereport (ERROR ,
12901290(errcode_for_file_access (),
1291- errmsg ("could not writetwophase state file: %m" )));
1291+ errmsg ("could not writetwo-phase state file: %m" )));
12921292}
12931293if (write (fd ,& statefile_crc ,sizeof (pg_crc32 ))!= sizeof (pg_crc32 ))
12941294{
12951295close (fd );
12961296ereport (ERROR ,
12971297(errcode_for_file_access (),
1298- errmsg ("could not writetwophase state file: %m" )));
1298+ errmsg ("could not writetwo-phase state file: %m" )));
12991299}
13001300
13011301/*
@@ -1307,13 +1307,13 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
13071307close (fd );
13081308ereport (ERROR ,
13091309(errcode_for_file_access (),
1310- errmsg ("could not fsynctwophase state file: %m" )));
1310+ errmsg ("could not fsynctwo-phase state file: %m" )));
13111311}
13121312
13131313if (close (fd )!= 0 )
13141314ereport (ERROR ,
13151315(errcode_for_file_access (),
1316- errmsg ("could not closetwophase state file: %m" )));
1316+ errmsg ("could not closetwo-phase state file: %m" )));
13171317}
13181318
13191319/*
@@ -1390,7 +1390,7 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
13901390}
13911391ereport (ERROR ,
13921392(errcode_for_file_access (),
1393- errmsg ("could not opentwophase state file \"%s\": %m" ,
1393+ errmsg ("could not opentwo-phase state file \"%s\": %m" ,
13941394path )));
13951395}
13961396
@@ -1399,14 +1399,14 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
13991399close (fd );
14001400ereport (ERROR ,
14011401(errcode_for_file_access (),
1402- errmsg ("could not fsynctwophase state file \"%s\": %m" ,
1402+ errmsg ("could not fsynctwo-phase state file \"%s\": %m" ,
14031403path )));
14041404}
14051405
14061406if (close (fd )!= 0 )
14071407ereport (ERROR ,
14081408(errcode_for_file_access (),
1409- errmsg ("could not closetwophase state file \"%s\": %m" ,
1409+ errmsg ("could not closetwo-phase state file \"%s\": %m" ,
14101410path )));
14111411}
14121412
@@ -1462,7 +1462,7 @@ PrescanPreparedTransactions(void)
14621462if (TransactionIdFollowsOrEquals (xid ,origNextXid ))
14631463{
14641464ereport (WARNING ,
1465- (errmsg ("removing futuretwophase state file \"%s\"" ,
1465+ (errmsg ("removing futuretwo-phase state file \"%s\"" ,
14661466clde -> d_name )));
14671467RemoveTwoPhaseFile (xid , true);
14681468continue ;
@@ -1478,7 +1478,7 @@ PrescanPreparedTransactions(void)
14781478if (buf == NULL )
14791479{
14801480ereport (WARNING ,
1481- (errmsg ("removing corrupttwophase state file \"%s\"" ,
1481+ (errmsg ("removing corrupttwo-phase state file \"%s\"" ,
14821482clde -> d_name )));
14831483RemoveTwoPhaseFile (xid , true);
14841484continue ;
@@ -1489,7 +1489,7 @@ PrescanPreparedTransactions(void)
14891489if (!TransactionIdEquals (hdr -> xid ,xid ))
14901490{
14911491ereport (WARNING ,
1492- (errmsg ("removing corrupttwophase state file \"%s\"" ,
1492+ (errmsg ("removing corrupttwo-phase state file \"%s\"" ,
14931493clde -> d_name )));
14941494RemoveTwoPhaseFile (xid , true);
14951495pfree (buf );
@@ -1566,7 +1566,7 @@ RecoverPreparedTransactions(void)
15661566if (TransactionIdDidCommit (xid )|| TransactionIdDidAbort (xid ))
15671567{
15681568ereport (WARNING ,
1569- (errmsg ("removing staletwophase state file \"%s\"" ,
1569+ (errmsg ("removing staletwo-phase state file \"%s\"" ,
15701570clde -> d_name )));
15711571RemoveTwoPhaseFile (xid , true);
15721572continue ;
@@ -1577,7 +1577,7 @@ RecoverPreparedTransactions(void)
15771577if (buf == NULL )
15781578{
15791579ereport (WARNING ,
1580- (errmsg ("removing corrupttwophase state file \"%s\"" ,
1580+ (errmsg ("removing corrupttwo-phase state file \"%s\"" ,
15811581clde -> d_name )));
15821582RemoveTwoPhaseFile (xid , true);
15831583continue ;