Modify LOCK to LOCK-NOWAIT-and-loop at swap tables to avoid holding exclusive locks long time. Suggested by Kenny Gorman.
This commit is contained in:
176
doc/index.html
176
doc/index.html
@ -1,53 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<link rel="icon" type="image/png" href="http://pgfoundry.org/images/elephant-icon.png" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>pg_reorg: Project Home Page</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center><img style="border: none; margin-left: auto; margin-right: auto; " src="http://pgfoundry.org/images/elephantSmall.png" height="75" width="75" />
|
||||
<hr />
|
||||
<h1>Welcome to the pg_reorg Project Home Page</h1>
|
||||
<hr />
|
||||
</center>
|
||||
<p>
|
||||
pg_reorg can re-organize tables on a postgres database without any locks so that you can retrieve or update rows in tables being reorganized.
|
||||
The module is developed to be a better alternative of CLUSTER and VACUUM FULL.
|
||||
</p>
|
||||
<p>
|
||||
The pg_reorg project is a <a href="http://www.postgresql.org">PostgreSQL</a> Community project that is a part of the <a href="http://pgfoundry.org">pgFoundry</a>.
|
||||
</p>
|
||||
<p>
|
||||
The pgFoundry page for the project is at <a href="http://pgfoundry.org/projects/reorg">http://pgfoundry.org/projects/reorg</a>,
|
||||
where you can find <a href="http://pgfoundry.org/frs/?group_id=1000411">downloads</a>, documentation, bug reports, mailing lists, and a whole lot more.
|
||||
</p>
|
||||
<div>
|
||||
<a href="index-ja.html">日本語のページはこちら。</a>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<p>
|
||||
<a href="pg_reorg.html">Documentations here</a>.
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<div align="right">
|
||||
Copyright (c) 2008-2009, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
|
||||
</div>
|
||||
|
||||
<!-- PLEASE LEAVE "Powered By GForge" on your site -->
|
||||
<br />
|
||||
<center>
|
||||
<a href="http://gforge.org/"><img src="http://gforge.org/images/pow-gforge.png"
|
||||
alt="Powered By GForge Collaborative Development Environment" border="0" /></a>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<link rel="icon" type="image/png" href="http://pgfoundry.org/images/elephant-icon.png" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>pg_reorg: Project Home Page</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center><img style="border: none; margin-left: auto; margin-right: auto; " src="http://pgfoundry.org/images/elephantSmall.png" height="75" width="75" />
|
||||
<hr />
|
||||
<h1>Welcome to the pg_reorg Project Home Page</h1>
|
||||
<hr />
|
||||
</center>
|
||||
<p>
|
||||
pg_reorg can re-organize tables on a postgres database without any locks so that you can retrieve or update rows in tables being reorganized.
|
||||
The module is developed to be a better alternative of CLUSTER and VACUUM FULL.
|
||||
</p>
|
||||
<p>
|
||||
The pg_reorg project is a <a href="http://www.postgresql.org">PostgreSQL</a> Community project that is a part of the <a href="http://pgfoundry.org">pgFoundry</a>.
|
||||
</p>
|
||||
<p>
|
||||
The pgFoundry page for the project is at <a href="http://pgfoundry.org/projects/reorg">http://pgfoundry.org/projects/reorg</a>,
|
||||
where you can find <a href="http://pgfoundry.org/frs/?group_id=1000411">downloads</a>, documentation, bug reports, mailing lists, and a whole lot more.
|
||||
</p>
|
||||
<div>
|
||||
<a href="index-ja.html">日本語のページはこちら。</a>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<h2>Documentation</h2>
|
||||
<p>
|
||||
<a href="pg_reorg.html">Documentations here</a>.
|
||||
</p>
|
||||
|
||||
<h2>Execution time</h2>
|
||||
<p>
|
||||
Here is a comparison between pg_reorg and clusterdb.
|
||||
Clusterdb is faster on not fragmented conditions, but pg_reorg is faster on fully fragmented conditions.
|
||||
Since reorganization is needed only if tables are fragmented, pg_reorg should be faster than clusterdb.
|
||||
</p>
|
||||
|
||||
<center>
|
||||
<div style="margin: 2em">
|
||||
<img src="result.png" />
|
||||
</div>
|
||||
|
||||
<table border="1">
|
||||
<caption>Configuration</caption>
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<th>Item</th>
|
||||
<th>Details</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">Hardware</td>
|
||||
<td>CPU</td>
|
||||
<td>2 * Xeon 5160 3.00GHz (Dual core)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Memory</td>
|
||||
<td>2GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Storage</td>
|
||||
<td>Ultra320 SCSI, 15000rpm (220GB)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">Software</td>
|
||||
<td>OS</td>
|
||||
<td>RHEL 5.2 (64bit) 2.6.18-92.el5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DB</td>
|
||||
<td>PostgreSQL 8.3.3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pg_reorg</td>
|
||||
<td>1.0.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clusterdb</td>
|
||||
<td>clusterdb (PostgreSQL) 8.3.3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">Data</td>
|
||||
<td>Scheme</td>
|
||||
<td><code><pre>CREATE TABLE tbl (
|
||||
id bigserial PRIMARY KEY,
|
||||
seqkey timestamp NOT NULL,
|
||||
rndkey timestamp NOT NULL,
|
||||
filler char(75) NOT NULL
|
||||
);
|
||||
CREATE INDEX idx_seq ON tbl (seqkey);
|
||||
CREATE INDEX idx_rnd ON tbl (rndkey);</pre></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rows</td>
|
||||
<td>16.5 M rows (2GB)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</center>
|
||||
|
||||
<hr />
|
||||
<div align="right">
|
||||
Copyright (c) 2008-2009, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
|
||||
</div>
|
||||
|
||||
<!-- PLEASE LEAVE "Powered By GForge" on your site -->
|
||||
<br />
|
||||
<center>
|
||||
<a href="http://gforge.org/"><img src="http://gforge.org/images/pow-gforge.png"
|
||||
alt="Powered By GForge Collaborative Development Environment" border="0" /></a>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user