PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#26 Général » Pg_dumpall sur windows : Pas d'ordre DROP DATABASE ? » 29/06/2010 10:06:04

philwood
Réponses : 4

Bonjour,
Je découvre Postgresql sur windows et j'ai l'impression que la commande pg_dumpall n'a pas le même comportement que sur Linux ?

Quand je lance la commande "pg_dumpall -U postgres -l postgres -cvf C:\bases\postgresql\ig9d\var\export\export_full_ig9d.sql" sur windows, j'ai en en-tête de mon dump ça :
--
-- PostgreSQL database cluster dump
--

-- Started on 2010-06-24 17:11:30

\connect postgres

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET escape_string_warning = 'off';

--
-- Roles
--

DROP ROLE postgres;
CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN PASSWORD 'md52a035251f5d8cdd905109be57af5ec35';
DROP ROLE spelgd;
CREATE ROLE spelgd;
ALTER ROLE spelgd WITH SUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN PASSWORD 'md5417c7d60a436380458eaff7282322b42';






--
-- Database creation
--

REVOKE ALL ON DATABASE template1 FROM PUBLIC;
REVOKE ALL ON DATABASE template1 FROM postgres;
GRANT ALL ON DATABASE template1 TO postgres;
GRANT CONNECT ON DATABASE template1 TO PUBLIC;


\connect postgres

--
-- PostgreSQL database dump
--

-- Started on 2010-06-24 17:11:30

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1481 (class 1259 OID 16410)
-- Dependencies: 3
-- Name: customer; Type: TABLE; Schema: public; Owner: spelgd; Tablespace:
--

CREATE TABLE customer (
    c_w_id integer NOT NULL,
    c_d_id integer NOT NULL,
    c_id integer NOT NULL,
etc...


Pas d'ordre drop database donc ?

Alors que sur Linux, j'ai ça avec la même commande :

--
-- PostgreSQL database cluster dump
--

-- Started on 2010-05-27 17:26:19 CEST

\connect postgres

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET escape_string_warning = off;

--
-- Drop databases
--

DROP DATABASE ig9d;




--
-- Drop roles
--

DROP ROLE exppgs;
DROP ROLE ig9d;
DROP ROLE patrol;
DROP ROLE spelgd;


--
-- Roles
--

CREATE ROLE exppgs;
ALTER ROLE exppgs WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN PASSWORD 'md5d92946b75ef33e2db6e72661d66c9227';
CREATE ROLE ig9d;
ALTER ROLE ig9d WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN PASSWORD 'md5ba60b153e064f49613c0d2d3ad2efb6d';
CREATE ROLE patrol;
ALTER ROLE patrol WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN;
CREATE ROLE spelgd;
ALTER ROLE spelgd WITH SUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN PASSWORD 'md5417c7d60a436380458eaff7282322b42';






--
-- Database creation
--

CREATE DATABASE ig9d WITH TEMPLATE = template0 OWNER = ig9d;
REVOKE ALL ON DATABASE template1 FROM PUBLIC;
REVOKE ALL ON DATABASE template1 FROM exppgs;
GRANT ALL ON DATABASE template1 TO exppgs;
GRANT CONNECT ON DATABASE template1 TO PUBLIC;


\connect ig9d

--
-- PostgreSQL database dump
--

-- Started on 2010-05-27 17:26:19 CEST

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 9 (class 2615 OID 26321)
-- Name: audit; Type: SCHEMA; Schema: -; Owner: exppgs
--

CREATE SCHEMA audit;


ALTER SCHEMA audit OWNER TO exppgs;

--
-- TOC entry 8 (class 2615 OID 18015)
-- Name: audit2; Type: SCHEMA; Schema: -; Owner: spelgd
--

CREATE SCHEMA audit2;


ALTER SCHEMA audit2 OWNER TO spelgd;

--
-- TOC entry 6 (class 2615 OID 16472)
-- Name: ig9d; Type: SCHEMA; Schema: -; Owner: ig9d
--

CREATE SCHEMA ig9d;


ALTER SCHEMA ig9d OWNER TO ig9d;

--
-- TOC entry 453 (class 2612 OID 16475)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: exppgs
--

CREATE PROCEDURAL LANGUAGE plpgsql;
etc ...


Bref beaucoup plus de chose avec la même commande.

Est ce que c'est normale ?
Merci d'avance

#27 Re : Général » Comportement base de données PostgreSQL en cas de FS plein » 18/12/2009 14:42:58

Mes logs étant sur un fs séparé, quand j'ai un pgdata full, il n'y a pas beaucoup de marges de manœuvre.
En fait, je parlais de WAL non archivés. Je rencontre souvent des pb sur le fs des archives full qui du coup remplit par vase communiquant le fs pgdata (pg_xlog).
Bonne idée l'option du lien symbolique.

#28 Re : Général » Comportement base de données PostgreSQL en cas de FS plein » 18/12/2009 10:38:07

Bonjour,
Comment justement faire du ménage si le fs pgdata est plein si la base ne veut plus démarrer ? Personnellement, je supprime qq WAL sous pg_xlog pour pouvoir redémarrer mais peut-être y a t-il une autre solution ?
Cdt

Pied de page des forums

Propulsé par FluxBB