Changeset 824
- Timestamp:
- 11/29/07 23:48:12 (1 year ago)
- Files:
-
- traduc/trunk/manuel/contrib.xml (modified) (1 diff)
- traduc/trunk/manuel/earthdistance.xml (modified) (1 diff)
- traduc/trunk/manuel/lo.xml (modified) (4 diffs)
- traduc/trunk/manuel/oid2name.xml (modified) (13 diffs)
- traduc/trunk/manuel/pageinspect.xml (modified) (8 diffs)
- traduc/trunk/manuel/pgrowlocks.xml (modified) (5 diffs)
- traduc/trunk/manuel/pgstattuple.xml (modified) (8 diffs)
- traduc/trunk/manuel/release.xml (modified) (2 diffs)
- traduc/trunk/manuel/sslinfo.xml (modified) (11 diffs)
- traduc/trunk/manuel/uuid-ossp.xml (modified) (14 diffs)
- traduc/trunk/manuel/vacuumlo.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
traduc/trunk/manuel/contrib.xml
r803 r824 2 2 3 3 <appendix id="contrib"> 4 <title> Additional Supplied Modules</title>4 <title>Modules supplémentaires fournis</title> 5 5 6 6 <para> 7 This appendix contains information regarding the modules that 8 can be found in the <literal>contrib</literal> directory of the 9 <productname>PostgreSQL</productname> distribution. 10 These include porting tools, analysis utilities, 11 and plug-in features that are not part of the core PostgreSQL system, 12 mainly because they address a limited audience or are too experimental 13 to be part of the main source tree. This does not preclude their 14 usefulness. 7 Cette annexe contient des informations concernant les modules disponibles 8 dans le répertoire <literal>contrib</literal> de la distribution 9 <productname>PostgreSQL</productname>. Ce sont des outils de portage, 10 des outils d'analyse, des fonctionnalités supplémentaires qui ne font pas 11 partie du systÚme PostgreSQL de base, principalement parce qu'ils 12 s'adressent à une audience limitée ou sont trop expérimentals pour faire 13 partie de la distribution de base. Cela ne concerne en rien leur utilité. 15 14 </para> 16 15 17 16 <para> 18 When building from the source distribution, these modules are not built 19 automatically. You can build and install all of them by running 17 Lors de la construction à partir des sources de la distribution, ces modules 18 ne sont pas construit automatiquement. Vous pouvez les construire et les 19 installer en exécutant : 20 20 <screen> 21 21 <userinput>gmake</userinput> 22 22 <userinput>gmake install</userinput> 23 23 </screen> 24 in the <literal>contrib</literal> directory of a configured source tree;25 or to build and install26 just one selected module, do the same in that module's subdirectory.27 Many of the modules have regression tests, which can be executed by28 running24 dans le répertoire <literal>contrib</literal> d'un répertoire des sources 25 configuré ; ou pour ne construire et installer qu'un seul module 26 sélectionné, faites de mêmes dans le sous-répertoire du module. Beaucoup 27 de ces modules ont des tests de régression qui peuvent être exécutés 28 en lançant la commande : 29 29 <screen> 30 30 <userinput>gmake installcheck</userinput> 31 31 </screen> 32 once you have a <productname>PostgreSQL</productname> server running. (Note that 33 <literal>gmake check</literal> is not supported; you must have an operational 34 database server to perform these tests, and you must have built and 35 installed the module(s) to be tested.) 32 une fois que le serveur <productname>PostgreSQL</productname> est en cours 33 d'exécution. (Notez que <literal>gmake check</literal> n'est pas 34 supporté ; vous devez avoir un serveur de base de données opérationnel 35 pour réaliser ces tests, et vous devez avoir construit et installer le 36 module pour qu'il soit testé.) 36 37 </para> 37 38 38 39 <para> 39 If you are using a pre-packaged version of <productname>PostgreSQL</productname>, 40 these modules are typically made available as a separate subpackage, 41 such as <literal>postgresql-contrib</literal>. 40 Si vous utilisez une version déjà packagée de 41 <productname>PostgreSQL</productname>, ces modules sont typiquement 42 disponibles dans un package séparé, comme par exemple 43 <literal>postgresql-contrib</literal>. 42 44 </para> 43 45 44 46 <para> 45 Many modules supply new user-defined functions, operators, or types. 46 To make use of one of these modules, after you have installed the code 47 you need to register the new objects in the database 48 system by running the SQL commands in the <literal>.sql</literal> file 49 supplied by the module. For example, 47 Beaucoup de ces modules fournissent de nouvelles fonctions, de nouveaux 48 opérateurs ou types utilisateurs. Pour pouvoir utiliser un de ces 49 modules, aprÚs avoir installé le code, vous devez enregistrer les 50 nouveaux objets dans la base de donnéesen exécutant les commandes SQL 51 contenus dans le fichier <literal>.sql</literal> fourni par le module. 52 Par exemple : 50 53 51 54 <programlisting> 52 psql -d dbname -f <replaceable>SHAREDIR</replaceable>/contrib/<replaceable>module</replaceable>.sql55 psql -d nom_base -f <replaceable>SHAREDIR</replaceable>/contrib/<replaceable>module</replaceable>.sql 53 56 </programlisting> 54 57 55 Here, <replaceable>SHAREDIR</replaceable> means the installation's <quote>share</quote> 56 directory (<literal>pg_config --sharedir</literal> will tell you what this is). 58 Ici, <replaceable>SHAREDIR</replaceable> est le répertoire 59 <quote>share</quote> de l'installation (<literal>pg_config 60 --sharedir</literal> vous indiquera de quel répertoire il s'agit). 57 61 </para> 58 62 59 63 <para> 60 You need to run the <literal>.sql</literal> file in each database that you want61 the module's facilities to be available in. Alternatively, run it in62 database <literal>template1</literal> so that the module will be copied into63 s ubsequently-created databases by default.64 Vous avez besoin d'exécuter le fichier <literal>.sql</literal> dans 65 chaque base de données où le module doit être disponible. Autrement, 66 exécutez-le dans la base <literal>template1</literal> pour que le module 67 soit automatiquement copiée dans toute nouvelle base de données créée. 64 68 </para> 65 69 66 70 <para> 67 You can modify the first command in the <literal>.sql</literal> file to determine68 which schema within the database the module's objects will be created in.69 By default, they will be placed in<literal>public</literal>.71 Vous pouvez modifier la premiÚre commande du fichier 72 <literal>.sql</literal> pour déterminer le schéma de la base où seront créés 73 les objets. Par défaut, ils seront placés dans <literal>public</literal>. 70 74 </para> 71 75 72 76 <para> 73 A fter a major-version upgrade of <productname>PostgreSQL</productname>, run the74 installation script again, even though the module's objects might have75 been brought forward from the old installation by dump and restore.76 This ensures that any new functions will be available and any needed77 corrections will be applied.77 AprÚs une mise à jour majeure de <productname>PostgreSQL</productname>, 78 exécutez de nouveau le script d'installation, même si les objets du 79 module peuvent être créés par la sauvegarde de l'ancienne 80 installation. Cela vous assure que toute nouvelle fonction sera 81 disponible et tout correction nécessaire sera appliquée. 78 82 </para> 79 83 traduc/trunk/manuel/earthdistance.xml
r803 r824 7 7 8 8 <para> 9 This module contains two different approaches to calculating10 great circle distances on the surface of the Earth. The one described11 first depends on the contrib/cube package (which MUST be installed before12 e arthdistance is installed). The second one is based on the point13 datatype using latitude and longitude for the coordinates. The install14 script makes the defined functions executable by anyone.9 Ce module contient deux approches différentes dans le calcul 10 de distances sur la surface de la Terre. La premiÚre dépend du module 11 contrib cube (qui doit être installé avant earthdistance). La seconde 12 est basée sur le type de données point et utilise latitude et longitude 13 pour les coordonnées. Le script d'installation rend les fonctions 14 définies exécutables par tout le monde. 15 15 </para> 16 16 <para> 17 A spherical model of the Earth is used.17 Un modÚle sphérique de la Terre est utilisé. 18 18 </para> 19 19 <para> 20 Data is stored in cubes that are points (both corners are the same) using 3 21 coordinates representing the distance from the center of the Earth. 20 Les données sont stockées dans des cubes (dont les coins se touchent) en 21 utilisant trois coordonnées représentant la distance à partir du centre de 22 la Terre. 22 23 </para> 23 24 <para> 24 The radius of the Earth is obtained from the earth() function. It is25 given in meters. But by changing this one function you can change it26 to use some other units or to use a different value of the radius27 that you feel is more appropiate.25 Le radius de la Terre est obtenu à partir de la fonction earth(). Il est 26 donné en mÚtre. Vous pouvez la modifier pour qu'elle utilise d'autres 27 unités ou pour utiliser une valeur différente du radius que vous trouvez 28 plus appropriée. 28 29 </para> 29 30 <para> 30 This package also has applications to astronomical databases as well. 31 Astronomers will probably want to change earth() to return a radius of 32 180/pi() so that distances are in degrees. 31 Ce package a aussi des applications avec les bases de données astronomiques. 32 Les astronautes voudront probablement modifier earth() pour qu'elle 33 renvoie un radius de 180/pi() de façon à ce que les distances soient en 34 degrés. 33 35 </para> 34 36 <para> 35 Functions are provided to allow for input in latitude and longitude (in36 degrees), to allow for output of latitude and longitude, to calculate37 the great circle distance between two points and to easily specify a38 bo unding box usable for index searches.37 Les fonctions sont fournies pour permettre en saisie en latitude et 38 longitude (en degrés), en affichage en latitude et longitude, pour calculer 39 la distance en cercle entre deux points et pour spécifier facilement une 40 boîte intégrante pour les recherches d'index. 39 41 </para> 40 42 <para> 41 The functions are all 'sql' functions. If you want to make these functions 42 executable by other people you will also have to make the referenced 43 cube functions executable. cube(text), cube(float8), cube(cube,float8), 44 cube_distance(cube,cube), cube_ll_coord(cube,int) and 45 cube_enlarge(cube,float8,int) are used indirectly by the earth distance 46 functions. is_point(cube) and cube_dim(cube) are used in constraints for data 47 in domain earth. cube_ur_coord(cube,int) is used in the regression tests and 48 might be useful for looking at bounding box coordinates in user applications. 43 Les fonctions sont toutes des fonctions SQL. Si vous voulez que ces 44 fonctions soient exécutables par d'autres personnes, vous devrez aussi 45 rendre les fonctions cube référencées exécutables par ces personnes. 46 cube(text), cube(float8), cube(cube,float8), cube_distance(cube,cube), 47 cube_ll_coord(cube,int) et cube_enlarge(cube,float8,int) sont utilisées 48 indirectement par les fonctions EarthDistance. is_point(cube) et 49 cube_dim(cube) sont utilisées dans les contraintes pour les données du 50 domaine earth. cube_ur_coord(cube,int) est utilisé dans les tests de 51 régression et pourrait être utile pour rechercher les coordonnées d'une 52 boîte englobante dans les applications utilisateur. 49 53 </para> 50 54 <para> 51 A domain of type cube named earth is defined. 52 There are constraints on it defined to make sure the cube is a point, 53 that it does not have more than 3 dimensions and that it is very near 54 the surface of a sphere centered about the origin with the radius of 55 the Earth. 55 Un domaine du type cube nommé earth est défini. Des contraintes sont 56 définies pour s'assurer que le cube est un point, qu'il n'a pas plus de 57 trois dimensions et qu'il est trÚs proche de la surface d'une sphÚre 58 centrée sur l'origine avec le radius de la Terre. 56 59 </para> 57 60 <para> 58 The following functions are provided:61 Les fonctions suivantes sont fournies : 59 62 </para> 60 63 61 64 <table id="earthdistance-functions"> 62 <title> EarthDistance functions</title>65 <title>Fonctions EarthDistance</title> 63 66 <tgroup cols="2"> 64 67 <tbody> 65 68 <row> 66 69 <entry><literal>earth()</literal></entry> 67 <entry>re turns the radius of the Earth in meters.</entry>70 <entry>renvoie le radius de la Terre en mÚtres.</entry> 68 71 </row> 69 72 <row> 70 73 <entry><literal>sec_to_gc(float8)</literal></entry> 71 <entry>convert s the normal straight line72 (secant) distance between between two points on the surface of the Earth73 to the great circle distance between them.74 <entry>convertie la distance en ligne directe normale (secant) entre 75 deux points sur la surface de la Terre par le grand cercle entre eux 76 deux. 74 77 </entry> 75 78 </row> 76 79 <row> 77 80 <entry><literal>gc_to_sec(float8)</literal></entry> 78 <entry>Converts the great circle distance 79 between two points on the surface of the Earth to the normal straight line 80 (secant) distance between them. 81 <entry>convertie la distance entre deux points sur la surface de 82 la Terre en une ligne directe normale entre eux deux (secant). 81 83 </entry> 82 84 </row> 83 85 <row> 84 86 <entry><literal>ll_to_earth(float8, float8)</literal></entry> 85 <entry> Returns the location of a point on the surface of the Earth given86 its latitude (argument 1) and longitude (argument 2) in degrees.87 <entry>renvoie l'emplacement d'un point sur la surface de la Terre 88 suivant sa latitude (argument 1) et sa longitude (argument 2) en degrés. 87 89 </entry> 88 90 </row> 89 91 <row> 90 92 <entry><literal>latitude(earth)</literal></entry> 91 <entry> Returns the latitude in degrees of a point on the surface of the92 Earth.93 <entry>renvoie la latitude en degrés d'un point sur la surface de la 94 Terre. 93 95 </entry> 94 96 </row> 95 97 <row> 96 98 <entry><literal>longitude(earth)</literal></entry> 97 <entry> Returns the longitude in degrees of a point on the surface of the98 Earth.99 <entry>renvoie la longitude en degrés d'un point sur la surface de la 100 Terre. 99 101 </entry> 100 102 </row> 101 103 <row> 102 104 <entry><literal>earth_distance(earth, earth)</literal></entry> 103 <entry> Returns the great circle distance between two points on the104 surface of the Earth.105 <entry>renvoie la distance entre deux points sur la surface de la 106 Terre. 105 107 </entry> 106 108 </row> 107 109 <row> 108 110 <entry><literal>earth_box(earth, float8)</literal></entry> 109 <entry>Returns a box suitable for an indexed search using the cube @> 110 operator for points within a given great circle distance of a location. 111 Some points in this box are further than the specified great circle 112 distance from the location so a second check using earth_distance 113 should be made at the same time. 111 <entry>renvoie une boîte convenable pour une recherche par index 112 en utilisant l'opérateur cube @> pour les points à l'intérieur d'une 113 distance en cercle d'un emplacement. Certains points de cette boîte 114 sont plus loins que la distance spécifiée à partir d'un emplacement donc 115 un deuxiÚme test utilisant earth_distance doit être fait au même 116 moment. 114 117 </entry> 115 118 </row> 116 119 <row> 117 120 <entry><literal><![CDATA[<@>]]></literal> operator</entry> 118 <entry> gives the distance in statute miles between119 two points on the Earth's surface. Coordinates are in degrees. Points are120 taken as (longitude, latitude) and not vice versa as longitude is closer121 to the intuitive idea of x-axis and latitude to y-axis.121 <entry>donne la distance en <quote>statute miles</quote> entre deux points 122 sur la surface de la Terre. Les coordonnées sont en degrés. Les points 123 sont pris en (longitude, latitude) et pas vice-versa car la longitude 124 est plus proche. 122 125 </entry> 123 126 </row> traduc/trunk/manuel/lo.xml
r803 r824 2 2 <sect1 id="lo"> 3 3 <title>lo</title> 4 4 5 5 <indexterm zone="lo"> 6 6 <primary>lo</primary> … … 8 8 9 9 <para> 10 PostgreSQL type extension for managing Large Objects10 Extension PostgreSQL pour la gestion des <quote>Large Objects</quote>. 11 11 </para> 12 12 13 13 <sect2> 14 <title> Overview</title>14 <title>Aperçu</title> 15 15 <para> 16 One of the problems with the JDBC driver (and this affects the ODBC driver17 also), is that the specification assumes that references to BLOBS(Binary18 Large OBject S) are stored within a table, and if that entry is changed, the19 associated BLOB is deleted from the database.16 Un des problÚmes avec le pilote JDBC (mais cela affecte aussi le pilote 17 ODBC) est que la spécification suppose que les références aux BLOB (Binary 18 Large OBject) sont stockées dans une table et que, si une entrée est 19 modifiée, le BLOB associé est supprimé de cette base. 20 20 </para> 21 21 <para> 22 As PostgreSQL stands, this doesn't occur. Large objects are treated as 23 objects in their own right; a table entry can reference a large object by 24 OID, but there can be multiple table entries referencing the same large 25 object OID, so the system doesn't delete the large object just because you 26 change or remove one such entry. 22 Au niveau de PostgreSQL, ceci n'arrive pas. Les <quote>Large Objects</quote> 23 sont traités comme des objets propres ; une entrée de table peut 24 référencer un <quote>Large Object</quote> par son OID, mais plusieurs 25 tables peuvent référencer le même OID. Donc, le systÚme ne peut pas 26 supprimer un <quote>Large Object</quote> simplement parce que vous 27 avez modifié ou supprimé une entrée contenant son OID. 27 28 </para> 28 29 <para> 29 Now this is fine for new PostgreSQL-specific applications, but existing ones 30 using JDBC or ODBC won't delete the objects, resulting in orphaning - objects 31 that are not referenced by anything, and simply occupy disk space. 30 Ceci n'est pas un problÚme pour les nouvelles applications spécifiques 31 à PostgreSQL mais celles qui existent déjà , qui utilisent JDBC ou ODBC, 32 ne suppriment pas les objets, ceci aboutissant à des <quote>Large 33 Objects</quote> orphelins - des objets qui ne sont référencés par 34 personne et occupant donc un espace disque précieux sans raison. 32 35 </para> 33 36 </sect2> 34 37 35 38 <sect2> 36 <title> The Fix</title>39 <title>La correction</title> 37 40 <para> 38 I've fixed this by creating a new data type 'lo', some support functions, and 39 a Trigger which handles the orphaning problem. The trigger essentially just 40 does a 'lo_unlink' whenever you delete or modify a value referencing a large 41 object. When you use this trigger, you are assuming that there is only one 42 database reference to any large object that is referenced in a 43 trigger-controlled column! 41 J'ai corrigé ceci en créant un nouveau type de données, 42 <literal>lo</literal>, quelques fonctions de support et un trigger qui 43 gÚre le problÚme des <quote>Large Objects</quote> orphelins. Le trigger 44 exécute essentiellement un <command>lo_unlink</command> à chaque fois 45 que vous voulez supprimer ou modifier une valeur référencer un 46 <quote>Large Object</quote>. Quand vous utilisez ce trigger, vous supposez 47 qu'il n'existe qu'une référence à ce <quote>Large Object</quote> dans 48 toute la base de données ! 44 49 </para> 45 50 <para> 46 The 'lo' type was created because we needed to differentiate between plain 47 OIDs and Large Objects. Currently the JDBC driver handles this dilemma easily, 48 but (after talking to Byron), the ODBC driver needed a unique type. They had 49 created an 'lo' type, but not the solution to orphaning. 51 Le type <literal>lo</literal> a été créé car nous avons besoin de 52 différencier les OID normaux des OID de <quote>Large Object</quote>. 53 Actuellement, le pilote JDBC gÚre ce dilemne facilement mais, aprÚs 54 en avoir discuté avec Byron, le pilote ODBC a besoin d'un type unique. 55 Ils avaient créé un type <literal>lo</literal> mais sans solution pour 56 les orphelins. 50 57 </para> 51 58 <para> 52 You don't actually have to use the 'lo' type to use the trigger, but it may be 53 convenient to use it to keep track of which columns in your database represent 54 large objects that you are managing with the trigger. 59 Vous n'avez pas à utiliser le type <literal>lo</literal> pour utiliser 60 le trigger mais c'est plus agréable de l'utiliser car ça vous permet 61 de bien visualiser les colonnes de votre base qui contiennent des 62 <quote>Large Objects</quote> et que vous gérez avec le trigger. 55 63 </para> 56 64 </sect2> 57 65 58 66 <sect2> 59 <title> How to Use</title>67 <title>Comment l'utiliser</title> 60 68 <para> 61 The easiest way is by an example:69 Voici la façon la plus simple : 62 70 </para> 63 71 <programlisting> … … 67 75 </programlisting> 68 76 <para> 69 Create a trigger for each column that contains a lo type, and give the column 70 name as the trigger procedure argument. You can have more than one trigger on 71 a table if you need multiple lo columns in the same table, but don't forget to 72 give a different name to each trigger. 77 Crée un trigger pour chaque colonne contenant un type <literal>lo</literal> 78 et donne le nom de la colonne en argument de la procédure trigger. Vous 79 pouvez avoir plus d'un trigger sur une table si cette derniÚre contient 80 plusieurs colonnes de type <literal>lo</literal> mais n'oubliez pas de 81 donner un nom différent à chaque trigger. 73 82 </para> 74 83 </sect2> 75 84 76 85 <sect2> 77 <title> Issues</title>86 <title>ProblÚmes</title> 78 87 79 88 <itemizedlist> 80 89 <listitem> 81 90 <para> 82 Dropping a table will still orphan any objects it contains, as the trigger83 i s not executed.91 Supprimer une table laissera toujours un grand nombre d'orphelins car 92 il n'existe pas de trigger pour cette opération. 84 93 </para> 85 94 <para> 86 Avoid this by preceding the 'drop table' with 'delete from {table}'. 95 Ãviter ceci en exécutant avant le <literal>DROP TABLE</literal> un 96 <literal>DELETE FROM</literal>. 87 97 </para> 88 98 <para> 89 If you already have, or suspect you have, orphaned large objects, see90 the contrib/vacuumlo module to help you clean them up. It's a good idea91 to run contrib/vacuumlo occasionally as a back-stop to the lo_manage92 trigger.99 Si vous avez déjà , ou suspecté avoir, des <quote>Large Objects</quote> 100 orphelins, jetez un œil au module contrib vacuumlo pour vous aider à 101 faire le nettoyage. Exécuter vacuumlo de temps en temps est une bonne 102 idée. 93 103 </para> 94 104 </listitem> 95 105 <listitem> 96 106 <para> 97 Some frontends may create their own tables, and will not create the98 associated trigger(s). Also, users may not remember (or know) to create99 thetriggers.107 Certaines interfaces pourraient créer leur propres tables, sans associer 108 le(s) trigger(s) associé(s). De plus, le sutilisateurs pourraient ne 109 plus se rappeler (ou savoir) d'avoir à créer les triggers. 100 110 </para> 101 111 </listitem> … … 103 113 104 114 <para> 105 As the ODBC driver needs a permanent lo type (& JDBC could be optimised to 106 use it if it's Oid is fixed), and as the above issues can only be fixed by 107 some internal changes, I feel it should become a permanent built-in type. 115 Comme le pilote ODBC a besoin d'un type <literal>lo</literal> permanent 116 (& JDBC pourrait être optimisé pour l'utiliser si son OID est fixe) 117 et comme les problÚmes ci-dessus peuvent seulement être corrigés par 118 des modifications internes, je pense qu'il devrait être un type interne. 108 119 </para> 109 120 </sect2> 110 121 111 122 <sect2> 112 <title>Aut hor</title>123 <title>Auteur</title> 113 124 <para> 114 125 Peter Mount <email>peter@retep.org.uk</email> June 13 1998 traduc/trunk/manuel/oid2name.xml
r803 r824 7 7 8 8 <para> 9 This utility allows administrators to examine the file structure used by10 PostgreSQL. To make use of it, you need to be familiar with the file11 structure, which is described in<xref linkend="storage"/>.9 Cet outil permet aux administrateurs d'examiner la structure de fichiers 10 utilisée par PostgreSQL. Pour l'utiliser, vous devez être familier avec 11 la structure des fichiers décrite dans <xref linkend="storage"/>. 12 12 </para> 13 13 14 14 <sect2> 15 <title>Overview</title> 16 <para> 17 <literal>oid2name</literal> connects to the database and extracts OID, 18 filenode, and table name information. You can also have it show database 19 OIDs and tablespace OIDs. 20 </para> 21 <para> 22 When displaying specific tables, you can select which tables to show by 23 using -o, -f and -t. The first switch takes an OID, the second takes 24 a filenode, and the third takes a tablename (actually, it's a LIKE 25 pattern, so you can use things like "foo%"). Note that you can use as many 26 of these switches as you like, and the listing will include all objects 27 matched by any of the switches. Also note that these switches can only 28 show objects in the database given in -d. 29 </para> 30 <para> 31 If you don't give any of -o, -f or -t it will dump all the tables in the 32 database given in -d. If you don't give -d, it will show a database 33 listing. Alternatively you can give -s to get a tablespace listing. 15 <title>Aperçu</title> 16 <para> 17 <literal>oid2name</literal> se connecte à la base de données et récupÚre 18 les OID, filenode et noms de table. Vous pouvez aussi affcher les OID des 19 bases et des tablespaces. 20 </para> 21 <para> 22 Lors de l'affichage de tables spécifiques, vous pouvez sélectionner les 23 tables à afficher avec les options -o, -f et -t. La premiÚre option prend 24 un OID, la seconde un filenode, et la troisiÚme un nom de table 25 (en fait, c'est un modÚle pour LIKE donc vous pouvez utiliser un texte 26 comme <quote>foo%</quote>). Notez que vous pouvez utiliser autant de fois 27 que vous voulez les différentes options. Le résultat incluera tous les 28 objets correspondant à une des options. De plus, notez que ces options 29 peuvent seulement affichées les objets de la base indiquée par l'option 30 -d. 31 </para> 32 <para> 33 Si vous ne passez pas les options -o, -f ou -t, il affichera toutes les 34 tables de la base indiquée par l'option -d. Si vous ne passez pas non plus 35 l'option -d, il affichera une liste des bases de données. Autrement, 36 vous pouvez passer -s pour obtenir une liste des tablespaces. 34 37 </para> 35 38 <table> 36 <title> Additional switches</title>39 <title>Options supplémentaires</title> 37 40 <tgroup cols="2"> 38 41 <tbody> 39 42 <row> 40 43 <entry><literal>-i</literal></entry> 41 <entry>inclu de indexes and sequences in the database listing.</entry>44 <entry>inclut les index et séquences dans l'affichage de la base.</entry> 42 45 </row> 43 46 <row> 44 47 <entry><literal>-x</literal></entry> 45 <entry> display more information about each object shown: tablespace name,46 schema name, OID.48 <entry>affiche plus d'informations sur chaque objet affiché : 49 nom du tablespace, nom du schéma, OID. 47 50 </entry> 48 51 </row> 49 52 <row> 50 53 <entry><literal>-S</literal></entry> 51 <entry>a lso show system objects (those in information_schema, pg_toast52 andpg_catalog schemas)54 <entry>affiche aussi les objets systÚme (ceux compris dans 55 information_schema, pg_toast et pg_catalog schemas) 53 56 </entry> 54 57 </row> 55 58 <row> 56 59 <entry><literal>-q</literal></entry> 57 <entry> don't display headers(useful for scripting)</entry>60 <entry>n'affiche pas les en-têtes (utile pour les scripts)</entry> 58 61 </row> 59 62 </tbody> … … 63 66 64 67 <sect2> 65 <title>Ex amples</title>68 <title>Exemples</title> 66 69 67 70 <programlisting> … … 86 89 $ cd $PGDATA/17228 87 90 88 $ # get top 10 db objects in the default tablespace, ordered by size 91 $ # obtenir les 10 objets de la base de données, tablespace par défaut, 92 $ # classés par taille 89 93 $ ls -lS * | head -10 90 94 -rw------- 1 alvherre alvherre 136536064 sep 14 09:51 155173 … … 105 109 155173 accounts 106 110 107 $ # you can ask for more than one object111 $ # vous pouvez demander plus d'un objet 108 112 $ oid2name -d alvherre -f 155173 -f 1155291 109 113 From database "alvherre": … … 113 117 1155291 accounts_pkey 114 118 115 $ # you can also mix the options, and have more details119 $ # vous pouvez aussi mixer les options et avoir plus de détails 116 120 $ oid2name -d alvherre -t accounts -f 1155291 -x 117 121 From database "alvherre": … … 121 125 1155291 accounts_pkey 1155291 public pg_default 122 126 123 $ # show disk space for every db object127 $ # affiche l'espace disque de chaque objet de la base 124 128 $ du [0-9]* | 125 129 > while read SIZE FILENODE … … 132 136 ... 133 137 134 $ # same, but sort by size138 $ # idem mais trié par taille 135 139 $ du [0-9]* | sort -rn | while read SIZE FN 136 140 > do … … 142 146 ... 143 147 144 $ # If you want to see what's in tablespaces, use the pg_tblspc directory 148 $ # Si vous voulez voir le contenu des tablespaces, utilisez le répertoire 149 $ # pg_tblspc 145 150 $ cd $PGDATA/pg_tblspc 146 151 $ oid2name -s … … 153 158 155152 bigdisk 154 159 155 $ # what databases have objects in tablespace "fastdisk"?160 $ # quelles bases a des objets dans le tablespace nommé fastdisk ? 156 161 $ ls -d 155151/* 157 162 155151/17228/ 155151/PG_VERSION 158 163 159 $ # Oh, what was database 17228 again?164 $ # Oh, mais quelle est la base de données 17228 ? 160 165 $ oid2name 161 166 All databases: … … 167 172 1 template1 pg_default 168 173 169 $ # Let's see what objects does this database have in the tablespace.174 $ # Voyons les objets que cette base a dans le tablespace. 170 175 $ cd 155151/17228 171 176 $ ls -l … … 173 178 -rw------- 1 postgres postgres 0 sep 13 23:20 155156 174 179 175 $ # OK, this is a pretty small table ... but which one is it?180 $ # OK, c'est une trÚs petite table... mais laquelle est-ce ? 176 181 $ oid2name -d alvherre -f 155156 177 182 From database "alvherre": … … 180 185 155156 foo 181 186 182 $ # end of sample session.187 $ # fin de la session d'exemple. 183 188 </programlisting> 184 189 185 190 <para> 186 You can also get approximate size data for each object using psql. For187 example,191 Vous pouvez aussi obtenir la taille approximative des données pour 192 chaque objet en utilisant psql. Par exemple : 188 193 </para> 189 194 <programlisting> … … 191 196 </programlisting> 192 197 <para> 193 Each page is typically 8k. Relpages is updated by VACUUM. 198 Chaque page fait typiquement 8 Ko. Le champ relpages est mis à jour 199 par VACUUM. 194 200 </para> 195 201 </sect2> 196 202 197 203 <sect2> 198 <title>Aut hor</title>204 <title>Auteur</title> 199 205 <para> 200 206 b. palmer, <email>bpalmer@crimelabs.net</email> traduc/trunk/manuel/pageinspect.xml
r803 r824 8 8 9 9 <para> 10 The functions in this module allow you to inspect the contents of data pages 11 at a low level, for debugging purposes. 10 Les fonctions de ce module vous permettent d'inspecter le contenu des 11 pages de données. Ce module est bas niveau, son intérêt est surtout flagrant 12 pour les développeurs ayant besoin de déboguer leurs modifications du 13 moteur. 12 14 </para> 13 15 14 16 <sect2> 15 <title>F unctions included</title>17 <title>Fonctions fournies</title> 16 18 17 19 <itemizedlist> 18 20 <listitem> 19 21 <para> 20 <literal>get_raw_page</literal> reads one block of the named table and returns a copy as a 21 bytea field. This allows a single time-consistent copy of the block to be 22 made. Use of this functions is restricted to superusers. 22 <literal>get_raw_page</literal> lit un bloc de la table nommée et 23 renvoie une copie dans un champ de type bytea. Ceci permet d'avoir une 24 copie cohérente du bloc. L'utilisation de cette fonction est restreinte 25 aux super-utilisateurs. 23 26 </para> 24 27 </listitem> … … 26 29 <listitem> 27 30 <para> 28 <literal>page_header</literal> shows fields which are common to all PostgreSQL heap and index 29 pages. Use of this function is restricted to superusers. 31 <literal>page_header</literal> affiche les champs communs aux pages 32 heap et index de PostgreSQL. L'utilisation de cette fonction est 33 restreinte aux super-utilisateurs. 30 34 </para> 31 35 <para> 32 A page image obtained with <literal>get_raw_page</literal> should be passed as argument: 36 Une image de page obtenu avec <literal>get_raw_page</literal> doit 37 être passé comme argument : 33 38 </para> 34 39 <programlisting> … … 40 45 </programlisting> 41 46 <para> 42 The returned columns correspond to the fields in the PageHeaderData-struct,43 see src/include/storage/bufpage.h for more details.47 Les valeurs renvoyées correspondent aux champs de la structure 48 PageHeaderData. Voir src/include/storage/bufpage.h pour les détails. 44 49 </para> 45 50 </listitem> … … 47 52 <listitem> 48 53 <para> 49 <literal>heap_page_items</literal> shows all line pointers on a heap page. For those line 50 pointers that are in use, tuple headers are also shown. All tuples are 51 shown, whether or not the tuples were visible to an MVCC snapshot at the 52 time the raw page was copied. Use of this function is restricted to 53 superusers. 54 <literal>heap_page_items</literal> affiche tous les pointeurs de ligne 55 sur une page heap. Pour les pointeurs en cours d'utilisation, les 56 en-têtes des lignes sont aussi affichées. Toutes les lignes sont 57 affichées, qu'elles soient visibles ou non par l'image MVCC au moment 58 de la copie de la page brute. L'utilisation de cette fonction est 59 restreinte aux super-utilisateurs. 54 60 </para> 55 61 <para> 56 A heap page image obtained with <literal>get_raw_page</literal> should be passed as argument: 62 Une image de page heap obtenue avec <literal>get_raw_page</literal> doit 63 être passée comme argument : 57 64 </para> 58 65 <programlisting> … … 60 67 </programlisting> 61 68 <para> 62 See src/include/storage/itemid.h and src/include/access/htup.h for63 expl anations of the fields returned.69 Voir src/include/storage/itemid.h et src/include/access/htup.h pour des 70 explications sur les champs renvoyés. 64 71 </para> 65 72 </listitem> … … 67 74 <listitem> 68 75 <para> 69 <literal>bt_metap()</literal> returns information about the btree index metapage: 76 <literal>bt_metap()</literal> renvoie des informations sur la metapage 77 d'un index btree : 70 78 </para> 71 79 <programlisting> … … 83 91 <listitem> 84 92 <para> 85 <literal>bt_page_stats()</literal> shows information about single btree pages: 93 <literal>bt_page_stats()</literal> affiche des informations sur les pages 94 btree seules : 86 95 </para> 87 96 <programlisting> … … 104 113 <listitem> 105 114 <para> 106 <literal>bt_page_items()</literal> returns information about specific items on btree pages: 115 <literal>bt_page_items()</literal> renvoie des informations sur les 116 éléments spécifiques des pages btree : 107 117 </para> 108 118 <programlisting> traduc/trunk/manuel/pgrowlocks.xml
r803 r824 8 8 9 9 <para> 10 The <literal>pgrowlocks</literal> module provides a function to show row11 locking information for a specified table.10 Le module <literal>pgrowlocks</literal> fournit une fonction affichant les 11 informations de verrouillage des lignes pour une table spécifique. 12 12 </para> 13 13 14 14 <sect2> 15 <title> Overview</title>15 <title>Aperçu</title> 16 16 <programlisting> 17 17 pgrowlocks(text) RETURNS pgrowlocks_type 18 18 </programlisting> 19 19 <para> 20 The parameter is a name of table. And <literal>pgrowlocks_type</literal> is21 d efined as:20 Le paramÚtre est un nom de table. <literal>pgrowlocks_type</literal> est 21 défini comme : 22 22 </para> 23 23 <programlisting> … … 38 38 <row> 39 39 <entry>locked_row</entry> 40 <entry>tuple ID(TID) of each locked rows</entry> 40 <entry>ID de ligne (TID, comme Tuple ID) pour chaque ligne 41 verrouillée</entry> 41 42 </row> 42 43 <row> 43 44 <entry>lock_type</entry> 44 <entry>"Shared" for shared lock, "Exclusive" for exclusive lock</entry> 45 <entry><quote>Shared</quote> pour les verrous partagés, 46 <quote>Exclusive</quote> pour les verrous exclusifs</entry> 45 47 </row> 46 48 <row> 47 49 <entry>locker</entry> 48 <entry>transaction ID of locker (Note 1)</entry> 50 <entry>ID de transaction de l'opération qui a posé le verrou 51 (Note 1)</entry> 49 52 </row> 50 53 <row> 51 54 <entry>multi</entry> 52 <entry>"t" if locker is a multi transaction, otherwise "f"</entry> 55 <entry>true si l'opération qui a posé le verrou est une 56 multi-transaction, sinon false</entry> 53 57 </row> 54 58 <row> … … 58 62 <row> 59 63 <entry>pids</entry> 60 <entry> process ids oflocking backends</entry>64 <entry>PID des processus de verrouillage locking backends</entry> 61 65 </row> 62 66 </tbody> … … 64 68 </table> 65 69 <para> 66 Note1: If the locker is multi transaction, it represents the multi ID. 70 Note1 : Si l'opération qui a posé le verrou est multi-transaction, ce 71 champ représente le multi-ID. 67 72 </para> 68 73 <para> 69 Note2: If the locker is multi, multiple data are shown. 74 Note2 : Si l'opération qui a posé le verrou est multi, les données 75 multiples sont affichées. 70 76 </para> 71 77 72 78 <para> 73 The calling sequence for <literal>pgrowlocks</literal> is as follows:74 <literal>pgrowlocks</literal> grabs AccessShareLock for the target table and75 reads each row one by one to get the row locking information. You should76 notice that:79 La séquence d'appels de <literal>pgrowlocks</literal> ressemble à ceci : 80 <literal>pgrowlocks</literal> récupÚre un AccessShareLock pour la table 81 cible et lit chaque ligne, une par une, pour obtenir les informations de 82 verrou. Vous devez noter que : 77 83 </para> 78 84 <orderedlist> 79 85 <listitem> 80 86 <para> 81 if the table is exclusive locked by someone else,82 <literal>pgrowlocks</literal> will be blocked.87 si la table est verrouillée exclusivement par quelqu'un d'autre, 88 <literal>pgrowlocks</literal> sera bloqué. 83 89 </para> 84 90 </listitem> 85 91 <listitem> 86 92 <para> 87 <literal>pgrowlocks</literal> may show incorrect information if there's a 88 new lock or a lock is freeed while its execution. 93 <literal>pgrowlocks</literal> peut afficher des informations incorrectes 94 si un nouveau verrou apparaît pendant l'exécution de la fonction et si 95 un verrou est libéré dans ce temps. 89 96 </para> 90 97 </listitem> 91 98 </orderedlist> 92 99 <para> 93 <literal>pgrowlocks</literal> does not show the contents of locked rows. If94 you want to take a look at the row contents at the same time, you could do95 something like this:100 <literal>pgrowlocks</literal> n'affiche pas le contenu des lignes 101 verrouillées. Si vous voulez avoir le contenu des lignes en même temps, 102 vous pouvez faire ceci : 96 103 </para> 97 104 <programlisting> … … 101 108 102 109 <sect2> 103 <title>Ex ample</title>110 <title>Exemple</title> 104 111 <para> 105 <literal>pgrowlocks</literal> returns the following data type: 106 </para> 107 <para> 108 Here is a sample execution of pgrowlocks: 112 Voici un exemple d'exécution de pgrowlocks : 109 113 </para> 110 114 <programlisting> traduc/trunk/manuel/pgstattuple.xml
r803 r824 8 8 9 9 <para> 10 <literal>pgstat

