OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / doc / postgresql / html / wal-benefits-later.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Future Benefits</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9 REV="MADE"
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
11 REL="HOME"
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
14 REL="UP"
15 TITLE="Write-Ahead Logging (WAL)"
16 HREF="wal.html"><LINK
17 REL="PREVIOUS"
18 TITLE="Write-Ahead Logging (WAL)"
19 HREF="wal.html"><LINK
20 REL="NEXT"
21 TITLE="WAL Configuration"
22 HREF="wal-configuration.html"><LINK
23 REL="STYLESHEET"
24 TYPE="text/css"
25 HREF="stylesheet.css"><META
26 NAME="creation"
27 CONTENT="2003-12-22T03:48:47"></HEAD
28 ><BODY
29 CLASS="SECT1"
30 ><DIV
31 CLASS="NAVHEADER"
32 ><TABLE
33 SUMMARY="Header navigation table"
34 WIDTH="100%"
35 BORDER="0"
36 CELLPADDING="0"
37 CELLSPACING="0"
38 ><TR
39 ><TH
40 COLSPAN="5"
41 ALIGN="center"
42 VALIGN="bottom"
43 >PostgreSQL 7.4.1 Documentation</TH
44 ></TR
45 ><TR
46 ><TD
47 WIDTH="10%"
48 ALIGN="left"
49 VALIGN="top"
50 ><A
51 HREF="wal.html"
52 ACCESSKEY="P"
53 >Prev</A
54 ></TD
55 ><TD
56 WIDTH="10%"
57 ALIGN="left"
58 VALIGN="top"
59 ><A
60 HREF="wal.html"
61 >Fast Backward</A
62 ></TD
63 ><TD
64 WIDTH="60%"
65 ALIGN="center"
66 VALIGN="bottom"
67 >Chapter 25. Write-Ahead Logging (<ACRONYM
68 CLASS="ACRONYM"
69 >WAL</ACRONYM
70 >)</TD
71 ><TD
72 WIDTH="10%"
73 ALIGN="right"
74 VALIGN="top"
75 ><A
76 HREF="wal.html"
77 >Fast Forward</A
78 ></TD
79 ><TD
80 WIDTH="10%"
81 ALIGN="right"
82 VALIGN="top"
83 ><A
84 HREF="wal-configuration.html"
85 ACCESSKEY="N"
86 >Next</A
87 ></TD
88 ></TR
89 ></TABLE
90 ><HR
91 ALIGN="LEFT"
92 WIDTH="100%"></DIV
93 ><DIV
94 CLASS="SECT1"
95 ><H1
96 CLASS="SECT1"
97 ><A
98 NAME="WAL-BENEFITS-LATER"
99 >25.2. Future Benefits</A
100 ></H1
101 ><P
102 >    The UNDO operation is not implemented. This means that changes
103     made by aborted transactions will still occupy disk space and that
104     a permanent <TT
105 CLASS="FILENAME"
106 >pg_clog</TT
107 > file to hold
108     the status of transactions is still needed, since
109     transaction identifiers cannot be reused. Once UNDO is implemented,
110     <TT
111 CLASS="FILENAME"
112 >pg_clog</TT
113 > will no longer be required to be
114     permanent; it will be possible to remove
115     <TT
116 CLASS="FILENAME"
117 >pg_clog</TT
118 > at shutdown. (However, the urgency of
119     this concern has decreased greatly with the adoption of a segmented
120     storage method for <TT
121 CLASS="FILENAME"
122 >pg_clog</TT
123 >: it is no longer
124     necessary to keep old <TT
125 CLASS="FILENAME"
126 >pg_clog</TT
127 > entries around
128     forever.)
129    </P
130 ><P
131 >    With UNDO, it will also be possible to implement
132     <I
133 CLASS="FIRSTTERM"
134 >savepoints</I
135 ><A
136 NAME="AEN19581"
137 ></A
138 > to allow partial rollback of
139     invalid transaction operations (parser errors caused by mistyping
140     commands, insertion of duplicate primary/unique keys and so on)
141     with the ability to continue or commit valid operations made by
142     the transaction before the error.  At present, any error will
143     invalidate the whole transaction and require a transaction abort.
144    </P
145 ><P
146 >    <ACRONYM
147 CLASS="ACRONYM"
148 >WAL</ACRONYM
149 > offers the opportunity for a new method for
150     database on-line backup and restore (<ACRONYM
151 CLASS="ACRONYM"
152 >BAR</ACRONYM
153 >).  To
154     use this method, one would have to make periodic saves of data
155     files to another disk, a tape or another host and also archive the
156     <ACRONYM
157 CLASS="ACRONYM"
158 >WAL</ACRONYM
159 > log files.  The database file copy and the
160     archived log files could be used to restore just as if one were
161     restoring after a crash. Each time a new database file copy was
162     made the old log files could be removed.  Implementing this
163     facility will require the logging of data file and index creation
164     and deletion; it will also require development of a method for
165     copying the data files (operating system copy commands are not
166     suitable).
167    </P
168 ><P
169 >    A difficulty standing in the way of realizing these benefits is that
170     they require saving <ACRONYM
171 CLASS="ACRONYM"
172 >WAL</ACRONYM
173 > entries for considerable
174     periods of time (e.g., as long as the longest possible transaction if
175     transaction UNDO is wanted). The present <ACRONYM
176 CLASS="ACRONYM"
177 >WAL</ACRONYM
178 >
179     format is extremely bulky since it includes many disk page
180     snapshots. This is not a serious concern at present, since the
181     entries only need to be kept for one or two checkpoint intervals;
182     but to achieve these future benefits some sort of compressed
183     <ACRONYM
184 CLASS="ACRONYM"
185 >WAL</ACRONYM
186 > format will be needed.
187    </P
188 ></DIV
189 ><DIV
190 CLASS="NAVFOOTER"
191 ><HR
192 ALIGN="LEFT"
193 WIDTH="100%"><TABLE
194 SUMMARY="Footer navigation table"
195 WIDTH="100%"
196 BORDER="0"
197 CELLPADDING="0"
198 CELLSPACING="0"
199 ><TR
200 ><TD
201 WIDTH="33%"
202 ALIGN="left"
203 VALIGN="top"
204 ><A
205 HREF="wal.html"
206 ACCESSKEY="P"
207 >Prev</A
208 ></TD
209 ><TD
210 WIDTH="34%"
211 ALIGN="center"
212 VALIGN="top"
213 ><A
214 HREF="index.html"
215 ACCESSKEY="H"
216 >Home</A
217 ></TD
218 ><TD
219 WIDTH="33%"
220 ALIGN="right"
221 VALIGN="top"
222 ><A
223 HREF="wal-configuration.html"
224 ACCESSKEY="N"
225 >Next</A
226 ></TD
227 ></TR
228 ><TR
229 ><TD
230 WIDTH="33%"
231 ALIGN="left"
232 VALIGN="top"
233 >Write-Ahead Logging (<ACRONYM
234 CLASS="ACRONYM"
235 >WAL</ACRONYM
236 >)</TD
237 ><TD
238 WIDTH="34%"
239 ALIGN="center"
240 VALIGN="top"
241 ><A
242 HREF="wal.html"
243 ACCESSKEY="U"
244 >Up</A
245 ></TD
246 ><TD
247 WIDTH="33%"
248 ALIGN="right"
249 VALIGN="top"
250 ><ACRONYM
251 CLASS="ACRONYM"
252 >WAL</ACRONYM
253 > Configuration</TD
254 ></TR
255 ></TABLE
256 ></DIV
257 ></BODY
258 ></HTML
259 >