Skip to content

Commit 172029d

Browse files
committed
翻译 mvcc.sgml parallel.sgml pgstandby.sgml
1 parent a176d2a commit 172029d

File tree

3 files changed

+27
-61
lines changed

3 files changed

+27
-61
lines changed

postgresql/doc/src/sgml/mvcc.sgml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ ____________________________________________________________________________-->
13451345

13461346
<sect2 id="locking-tables">
13471347
<!--==========================orignal english content==========================
1348-
<title>Table-level Locks</title>
1348+
<title>Table-Level Locks</title>
13491349
____________________________________________________________________________-->
13501350
<title>表级锁</title>
13511351

@@ -1390,7 +1390,7 @@ ____________________________________________________________________________-->
13901390

13911391
<variablelist>
13921392
<!--==========================orignal english content==========================
1393-
<title>Table-level Lock Modes</title>
1393+
<title>Table-Level Lock Modes</title>
13941394
____________________________________________________________________________-->
13951395
<title>表级锁模式</title>
13961396
<varlistentry>
@@ -1527,14 +1527,19 @@ ____________________________________________________________________________-->
15271527
<para>
15281528
Acquired by <command>VACUUM</command> (without <option>FULL</option>),
15291529
<command>ANALYZE</command>, <command>CREATE INDEX CONCURRENTLY</command>,
1530-
<command>CREATE STATISTICS</command> and
1531-
<command>ALTER TABLE VALIDATE</command> and other
1532-
<command>ALTER TABLE</command> variants (for full details see
1533-
<xref linkend="sql-altertable"/>).
1530+
<command>REINDEX CONCURRENTLY</command>,
1531+
<command>CREATE STATISTICS</command>, and certain <command>ALTER
1532+
INDEX</command> and <command>ALTER TABLE</command> variants (for full
1533+
details see <xref linkend="sql-alterindex"/> and <xref
1534+
linkend="sql-altertable"/>).
15341535
</para>
15351536
____________________________________________________________________________-->
15361537
<para>
1537-
由<command>VACUUM</command>(不带<option>FULL</option>)、<command>ANALYZE</command>、<command>CREATE INDEX CONCURRENTLY</command>、<command>CREATE STATISTICS</command>和<command>ALTER TABLE VALIDATE</command>以及其他<command>ALTER TABLE</command>的变体获得。
1538+
由<command>VACUUM</command>(不带<option>FULL</option>)、<command>ANALYZE</command>、
1539+
<command>CREATE INDEX CONCURRENTLY</command>、<command>REINDEX CONCURRENTLY</command>、
1540+
<command>CREATE STATISTICS</command>以及某些<command>ALTER INDEX</command>和
1541+
<command>ALTER TABLE</command>的变体获得(完整的详细请参考<xref linkend="sql-alterindex"/>
1542+
和<xref linkend="sql-altertable"/>)。
15381543
</para>
15391544
</listitem>
15401545
</varlistentry>
@@ -1601,14 +1606,13 @@ ____________________________________________________________________________-->
16011606

16021607
<!--==========================orignal english content==========================
16031608
<para>
1604-
Acquired by <command>CREATE COLLATION</command>,
1605-
<command>CREATE TRIGGER</command>, and many forms of
1609+
Acquired by <command>CREATE TRIGGER</command> and some forms of
16061610
<command>ALTER TABLE</command> (see <xref linkend="sql-altertable"/>).
16071611
</para>
16081612
____________________________________________________________________________-->
16091613
<para>
1610-
由<command>CREATE COLLATION</command>、<command>CREATE TRIGGER</command>和很多
1611-
<command>ALTER TABLE</command>的很多形式所获得(见
1614+
由<command>CREATE TRIGGER</command>和某些形式的
1615+
<command>ALTER TABLE</command>所获得(见
16121616
<xref linkend="sql-altertable"/>)。
16131617
</para>
16141618
</listitem>
@@ -1684,14 +1688,15 @@ ____________________________________________________________________________-->
16841688
<command>CLUSTER</command>, <command>VACUUM FULL</command>,
16851689
and <command>REFRESH MATERIALIZED VIEW</command> (without
16861690
<option>CONCURRENTLY</option>)
1687-
commands. Many forms of <command>ALTER TABLE</command> also acquire
1691+
commands. Many forms of <command>ALTER INDEX</command> and <command>ALTER TABLE</command> also acquire
16881692
a lock at this level. This is also the default lock mode for
16891693
<command>LOCK TABLE</command> statements that do not specify
16901694
a mode explicitly.
16911695
</para>
16921696
____________________________________________________________________________-->
16931697
<para>
1694-
由<command>ALTER TABLE</command>、<command>DROP TABLE</command>、<command>TRUNCATE</command>、<command>REINDEX</command>、<command>CLUSTER</command>、<command>VACUUM FULL</command>和<command>REFRESH MATERIALIZED VIEW</command>(不带<option>CONCURRENTLY</option>)命令获取。<command>ALTER TABLE</command>的很多形式也在这个层面上获得锁(见<xref linkend="sql-altertable"/>)。这也是未显式指定模式的<command>LOCK TABLE</command>命令的默认锁模式。
1698+
由<command>ALTER TABLE</command>、<command>DROP TABLE</command>、<command>TRUNCATE</command>、<command>REINDEX</command>、<command>CLUSTER</command>、<command>VACUUM FULL</command>和<command>REFRESH MATERIALIZED VIEW</command>(不带<option>CONCURRENTLY</option>)命令获取。
1699+
很多形式的<command>ALTER INDEX</command>和<command>ALTER TABLE</command>也在这个层面上获得锁(见<xref linkend="sql-altertable"/>)。这也是未显式指定模式的<command>LOCK TABLE</command>命令的默认锁模式。
16951700
</para>
16961701
</listitem>
16971702
</varlistentry>
@@ -1970,7 +1975,7 @@ ____________________________________________________________________________-->
19701975

19711976
<sect2 id="locking-rows">
19721977
<!--==========================orignal english content==========================
1973-
<title>Row-level Locks</title>
1978+
<title>Row-Level Locks</title>
19741979
____________________________________________________________________________-->
19751980
<title>行级锁</title>
19761981

@@ -2148,7 +2153,7 @@ ____________________________________________________________________________-->
21482153

21492154
<table tocentry="1" id="row-lock-compatibility">
21502155
<!--==========================orignal english content==========================
2151-
<title>Conflicting Row-level Locks</title>
2156+
<title>Conflicting Row-Level Locks</title>
21522157
____________________________________________________________________________-->
21532158
<title>冲突的行级锁</title>
21542159
<tgroup cols="5">
@@ -2253,7 +2258,7 @@ ____________________________________________________________________________-->
22532258

22542259
<sect2 id="locking-pages">
22552260
<!--==========================orignal english content==========================
2256-
<title>Page-level Locks</title>
2261+
<title>Page-Level Locks</title>
22572262
____________________________________________________________________________-->
22582263
<title>页级锁</title>
22592264

@@ -2617,7 +2622,7 @@ ____________________________________________________________________________-->
26172622

26182623
<sect2 id="serializable-consistency">
26192624
<!--==========================orignal english content==========================
2620-
<title>Enforcing Consistency With Serializable Transactions</title>
2625+
<title>Enforcing Consistency with Serializable Transactions</title>
26212626
____________________________________________________________________________-->
26222627
<title>用可序列化事务来强制一致性</title>
26232628

@@ -2678,7 +2683,7 @@ ____________________________________________________________________________-->
26782683

26792684
<sect2 id="non-serializable-consistency">
26802685
<!--==========================orignal english content==========================
2681-
<title>Enforcing Consistency With Explicit Blocking Locks</title>
2686+
<title>Enforcing Consistency with Explicit Blocking Locks</title>
26822687
____________________________________________________________________________-->
26832688
<title>使用显式锁定强制一致性</title>
26842689

postgresql/doc/src/sgml/parallel.sgml

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,7 @@ ____________________________________________________________________________-->
188188
<para>
189189
<xref linkend="guc-max-parallel-workers-per-gather"/>必须被设置为大于零的值。这是一种特殊情况,更加普遍的原则是所用的工作者数量不能超过<varname>max_parallel_workers_per_gather</varname>所配置的数量。
190190
</para>
191-
</listitem>
192191

193-
<listitem>
194-
<!--==========================orignal english content==========================
195-
<para>
196-
<xref linkend="guc-dynamic-shared-memory-type"/> must be set to a
197-
value other than <literal>none</literal>. Parallel query requires dynamic
198-
shared memory in order to pass data between cooperating processes.
199-
</para>
200-
____________________________________________________________________________-->
201-
<para>
202-
<xref linkend="guc-dynamic-shared-memory-type"/>必须被设置为除<literal>none</literal>之外的值。并行查询要求动态共享内存以便在合作的进程之间传递数据。
203-
</para>
204192
</listitem>
205193
</itemizedlist>
206194

@@ -292,18 +280,6 @@ ____________________________________________________________________________-->
292280
该查询运行在另一个已经存在的并行查询内部。例如,如果一个被并行查询调用的函数自己发出一个 SQL 查询,那么该查询将不会使用并行计划。这是当前实现的一个限制,但是或许不值得移除这个限制,因为它会导致单个查询使用大量的进程。
293281
</para>
294282
</listitem>
295-
296-
<listitem>
297-
<!--==========================orignal english content==========================
298-
<para>
299-
The transaction isolation level is serializable. This is
300-
a limitation of the current implementation.
301-
</para>
302-
____________________________________________________________________________-->
303-
<para>
304-
事务隔离级别是可串行化。这是当前实现的一个限制。
305-
</para>
306-
</listitem>
307283
</itemizedlist>
308284

309285
<!--==========================orignal english content==========================
@@ -366,21 +342,6 @@ ____________________________________________________________________________-->
366342
客户端发送了一个执行消息,并且消息中要求取元组的数量不为零。执行消息可见<link linkend="protocol-flow-ext-query">扩展查询协议</link>中的讨论。因为<link linkend="libpq">libpq</link>当前没有提供方法来发送这种消息,所以这种情况只可能发生在不依赖 libpq 的客户端中。如果这种情况经常发生,那在它可能发生的会话中设置 <xref linkend="guc-max-parallel-workers-per-gather"/>为零是一个很好的主意,这样可以避免产生连续运行时次优的查询计划。
367343
</para>
368344
</listitem>
369-
370-
<listitem>
371-
<!--==========================orignal english content==========================
372-
<para>
373-
The transaction isolation level is serializable. This situation
374-
does not normally arise, because parallel query plans are not
375-
generated when the transaction isolation level is serializable.
376-
However, it can happen if the transaction isolation level is changed to
377-
serializable after the plan is generated and before it is executed.
378-
</para>
379-
____________________________________________________________________________-->
380-
<para>
381-
事务隔离级别是可串行化。这种情况通常不会出现,因为当事务隔离级别是可串行化时不会产生并行查询计划。不过,如果在产生计划之后并且在执行计划之前把事务隔离级别改成可串行化,这种情况就有可能发生。
382-
</para>
383-
</listitem>
384345
</itemizedlist>
385346
</sect1>
386347

@@ -444,7 +405,7 @@ ____________________________________________________________________________-->
444405
scan</emphasis>, the cooperating processes take turns reading data from the
445406
index. Currently, parallel index scans are supported only for
446407
btree indexes. Each process will claim a single index block and will
447-
scan and return all tuples referenced by that block; other process can
408+
scan and return all tuples referenced by that block; other processes can
448409
at the same time be returning tuples from a different index block.
449410
The results of a parallel btree scan are returned in sorted order
450411
within each worker process.
@@ -656,7 +617,7 @@ ____________________________________________________________________________-->
656617
involve appending multiple results sets can therefore achieve
657618
coarse-grained parallelism even when efficient partial plans are not
658619
available. For example, consider a query against a partitioned table
659-
which can be only be implemented efficiently by using an index that does
620+
which can only be implemented efficiently by using an index that does
660621
not support parallel scans. The planner might choose a <literal>Parallel
661622
Append</literal> of regular <literal>Index Scan</literal> plans; each
662623
individual index scan would have to be executed to completion by a single

postgresql/doc/src/sgml/pgstandby.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ ____________________________________________________________________________-->
8989
<para>
9090
To configure a standby
9191
server to use <application>pg_standby</application>, put this into its
92-
<filename>recovery.conf</filename> configuration file:
92+
<filename>postgresql.conf</filename> configuration file:
9393
<programlisting>
9494
restore_command = 'pg_standby <replaceable>archiveDir</replaceable> %f %p %r'
9595
</programlisting>
@@ -98,7 +98,7 @@ restore_command = 'pg_standby <replaceable>archiveDir</replaceable> %f %p %r'
9898
</para>
9999
____________________________________________________________________________-->
100100
<para>
101-
要配置一台后备服务器去使用<application>pg_standby</application>,可以把下面的内容放在<filename>recovery.conf</filename>配置文件中:
101+
要配置一台后备服务器去使用<application>pg_standby</application>,可以把下面的内容放在<filename>postgresql.conf</filename>配置文件中:
102102
<programlisting>
103103
restore_command = 'pg_standby <replaceable>archiveDir</replaceable> %f %p %r'
104104
</programlisting>

0 commit comments

Comments
 (0)