gooderp18绿色标准版
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

69 lines
8.9KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!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"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>vacuumlo</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="oid2name.html" title="oid2name" /><link rel="next" href="contrib-prog-server.html" title="G.2. Server Applications" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center"><span xmlns="http://www.w3.org/1999/xhtml" class="application">vacuumlo</span></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="oid2name.html" title="oid2name">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="contrib-prog-client.html" title="G.1. Client Applications">Up</a></td><th width="60%" align="center">G.1. Client Applications</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="contrib-prog-server.html" title="G.2. Server Applications">Next</a></td></tr></table><hr></hr></div><div class="refentry" id="VACUUMLO"><div class="titlepage"></div><a id="id-1.11.8.4.4.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle"><span class="application">vacuumlo</span></span></h2><p>vacuumlo — remove orphaned large objects from a <span class="productname">PostgreSQL</span> database</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p id="id-1.11.8.4.4.4.1"><code class="command">vacuumlo</code> [<em class="replaceable"><code>option</code></em>...] <em class="replaceable"><code>dbname</code></em>... </p></div></div><div class="refsect1" id="id-1.11.8.4.4.5"><h2>Description</h2><p>
  3. <span class="application">vacuumlo</span> is a simple utility program that will remove any
  4. <span class="quote">“<span class="quote">orphaned</span>”</span> large objects from a
  5. <span class="productname">PostgreSQL</span> database. An orphaned large object (LO) is
  6. considered to be any LO whose OID does not appear in any <code class="type">oid</code> or
  7. <code class="type">lo</code> data column of the database.
  8. </p><p>
  9. If you use this, you may also be interested in the <code class="function">lo_manage</code>
  10. trigger in the <a class="xref" href="lo.html" title="F.20. lo">lo</a> module.
  11. <code class="function">lo_manage</code> is useful to try
  12. to avoid creating orphaned LOs in the first place.
  13. </p><p>
  14. All databases named on the command line are processed.
  15. </p></div><div class="refsect1" id="id-1.11.8.4.4.6"><h2>Options</h2><p>
  16. <span class="application">vacuumlo</span> accepts the following command-line arguments:
  17. </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-l <em class="replaceable"><code>limit</code></em></code><br /></span><span class="term"><code class="option">--limit=<em class="replaceable"><code>limit</code></em></code></span></dt><dd><p>
  18. Remove no more than <em class="replaceable"><code>limit</code></em> large objects per
  19. transaction (default 1000). Since the server acquires a lock per LO
  20. removed, removing too many LOs in one transaction risks exceeding
  21. <a class="xref" href="runtime-config-locks.html#GUC-MAX-LOCKS-PER-TRANSACTION">max_locks_per_transaction</a>. Set the limit to
  22. zero if you want all removals done in a single transaction.
  23. </p></dd><dt><span class="term"><code class="option">-n</code><br /></span><span class="term"><code class="option">--dry-run</code></span></dt><dd><p>Don't remove anything, just show what would be done.</p></dd><dt><span class="term"><code class="option">-v</code><br /></span><span class="term"><code class="option">--verbose</code></span></dt><dd><p>Write a lot of progress messages.</p></dd><dt><span class="term"><code class="option">-V</code><br /></span><span class="term"><code class="option">--version</code></span></dt><dd><p>
  24. Print the <span class="application">vacuumlo</span> version and exit.
  25. </p></dd><dt><span class="term"><code class="option">-?</code><br /></span><span class="term"><code class="option">--help</code></span></dt><dd><p>
  26. Show help about <span class="application">vacuumlo</span> command line
  27. arguments, and exit.
  28. </p></dd></dl></div><p>
  29. </p><p>
  30. <span class="application">vacuumlo</span> also accepts the following command-line
  31. arguments for connection parameters:
  32. </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h <em class="replaceable"><code>host</code></em></code><br /></span><span class="term"><code class="option">--host=<em class="replaceable"><code>host</code></em></code></span></dt><dd><p>Database server's host.</p></dd><dt><span class="term"><code class="option">-p <em class="replaceable"><code>port</code></em></code><br /></span><span class="term"><code class="option">--port=<em class="replaceable"><code>port</code></em></code></span></dt><dd><p>Database server's port.</p></dd><dt><span class="term"><code class="option">-U <em class="replaceable"><code>username</code></em></code><br /></span><span class="term"><code class="option">--username=<em class="replaceable"><code>username</code></em></code></span></dt><dd><p>User name to connect as.</p></dd><dt><span class="term"><code class="option">-w</code><br /></span><span class="term"><code class="option">--no-password</code></span></dt><dd><p>
  33. Never issue a password prompt. If the server requires password
  34. authentication and a password is not available by other means
  35. such as a <code class="filename">.pgpass</code> file, the connection
  36. attempt will fail. This option can be useful in batch jobs and
  37. scripts where no user is present to enter a password.
  38. </p></dd><dt><span class="term"><code class="option">-W</code><br /></span><span class="term"><code class="option">--password</code></span></dt><dd><p>
  39. Force <span class="application">vacuumlo</span> to prompt for a
  40. password before connecting to a database.
  41. </p><p>
  42. This option is never essential, since
  43. <span class="application">vacuumlo</span> will automatically prompt
  44. for a password if the server demands password authentication.
  45. However, <span class="application">vacuumlo</span> will waste a
  46. connection attempt finding out that the server wants a password.
  47. In some cases it is worth typing <code class="option">-W</code> to avoid the extra
  48. connection attempt.
  49. </p></dd></dl></div><p>
  50. </p></div><div class="refsect1" id="id-1.11.8.4.4.7"><h2>Environment</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">PGHOST</code><br /></span><span class="term"><code class="envar">PGPORT</code><br /></span><span class="term"><code class="envar">PGUSER</code></span></dt><dd><p>
  51. Default connection parameters.
  52. </p></dd></dl></div><p>
  53. This utility, like most other <span class="productname">PostgreSQL</span> utilities,
  54. also uses the environment variables supported by <span class="application">libpq</span>
  55. (see <a class="xref" href="libpq-envars.html" title="33.14. Environment Variables">Section 33.14</a>).
  56. </p></div><div class="refsect1" id="id-1.11.8.4.4.8"><h2>Notes</h2><p>
  57. <span class="application">vacuumlo</span> works by the following method:
  58. First, <span class="application">vacuumlo</span> builds a temporary table which contains all
  59. of the OIDs of the large objects in the selected database. It then scans
  60. through all columns in the database that are of type
  61. <code class="type">oid</code> or <code class="type">lo</code>, and removes matching entries from the temporary
  62. table. (Note: Only types with these names are considered; in particular,
  63. domains over them are not considered.) The remaining entries in the
  64. temporary table identify orphaned LOs. These are removed.
  65. </p></div><div class="refsect1" id="id-1.11.8.4.4.9"><h2>Author</h2><p>
  66. Peter Mount <code class="email">&lt;<a class="email" href="mailto:peter@retep.org.uk">peter@retep.org.uk</a>&gt;</code>
  67. </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="oid2name.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="contrib-prog-client.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="contrib-prog-server.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">oid2name </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> G.2. Server Applications</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1