Vous n'êtes pas identifié(e).
Merci pour vos réponses,
nous utilisons effectivement jenkins, mais pour le moment, on va se contenter de sensibiliser les programmeurs et aussi faire des code review.
je sais tout ca, ma question est ce que on peut limiter cela a 30.
des objets.
quand tu fais : create table aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
comment faire pour que ça renvoie "character too long" ?
Salut,
Existe t'il un moyen de limiter les nombres de caractères des colonnes, tables,views et fonctions sur Posgresql pour empêcher les programmeurs de dépasser les 30 caractères lors de la création des colonnes,tables,views et fonctions.
Merci
Salut,
j'aimerais savoir s'il existe un outil qui analyse la base de donnée et indique des potentiels index à créer.
Merci
salut, ca marche, la requete n'est pas trop optimisé, mais ca pourra aider d'autre presonnes, et si vous aviez une version optimisé, svp, j'attend votre solution:
CREATE OR REPLACE FUNCTION bis_ca_prog_get_adress(
id integer, opostal_address_street character varying,opostal_address_city character varying,opostal_address_state character varying, opostal_address_postcode character varying,
omain_address_street character varying,omain_address_city character varying,omain_address_state character varying, omain_address_postcode character varying,
ipostal_address_street character varying,ipostal_address_city character varying,ipostal_address_state character varying, ipostal_address_postcode character varying,
imain_address_street character varying,imain_address_city character varying,imain_address_state character varying, imain_address_postcode character varying)
RETURNS SETOF address_ind_org_type AS
$BODY$
DECLARE
mon_record address_ind_org_type;
id ALIAS FOR $1;
request_orga int;
request_cont int;
BEGIN
request_orga := contact_organisation_stk_stakeholder_id from ca_programme where ca_programme_id = id;
request_cont := contact_stk_stakeholder_id from ca_programme where ca_programme_id = id;
if request_orga is not null then
if (opostal_address_street !='' or opostal_address_city !='' or opostal_address_state !='' or opostal_address_postcode !='') then
FOR mon_record IN
SELECT case when so2.postal_address_street != '' then so2.postal_address_street else '[INSERT THE STREET AND NUMBER]' end as address_street,
case when so2.postal_address_city != '' then so2.postal_address_city else '[INSERT THE CITY/SUBURB]' end as address_city,
case when so2.postal_address_state != '' then so2.postal_address_state else '[INSERT THE STATE]' end as address_state,
case when so2.postal_address_postcode != '' then so2.postal_address_postcode else '[INSERT THE POSTAL CODE]' end as address_postcode
FROM ca_programme p
LEFT JOIN catalog_table fs ON p.ca_cat_fund = fs.catalog_table_id
LEFT JOIN stk_stakeholder ss2 ON ss2.stk_stakeholder_id = p.contact_stk_stakeholder_id
LEFT JOIN ind_individual i2 ON ss2.individual_id = i2.individual_id
LEFT JOIN vw_stk_stakeholder vs2 ON vs2.stk_stakeholder_id = p.contact_organisation_stk_stakeholder_id
LEFT JOIN stk_organisation so2 ON vs2.stk_organisation_id = so2.stk_organisation_id
left join (
SELECT * FROM cat_currency WHERE currency_country = (SELECT param_value FROM cat_global_params WHERE param_name = 'Country')
) bar on true
WHERE ca_programme_id = id
loop
return next mon_record;
end loop;
elsif (omain_address_street !='' or omain_address_city !='' or omain_address_state !='' or omain_address_postcode !='') then
FOR mon_record IN
SELECT case when so2.main_address_street != '' then so2.main_address_street else '[INSERT THE STREET AND NUMBER]' end as address_street,
case when so2.main_address_city != '' then so2.main_address_city else '[INSERT THE CITY/SUBURB]' end as address_city,
case when so2.main_address_state != '' then so2.main_address_state else '[INSERT THE STATE]' end as address_state,
case when so2.main_address_postcode != '' then so2.main_address_postcode else '[INSERT THE POSTAL CODE]' end as address_postcode
FROM ca_programme p
LEFT JOIN catalog_table fs ON p.ca_cat_fund = fs.catalog_table_id
LEFT JOIN stk_stakeholder ss2 ON ss2.stk_stakeholder_id = p.contact_stk_stakeholder_id
LEFT JOIN ind_individual i2 ON ss2.individual_id = i2.individual_id
LEFT JOIN vw_stk_stakeholder vs2 ON vs2.stk_stakeholder_id = p.contact_organisation_stk_stakeholder_id
LEFT JOIN stk_organisation so2 ON vs2.stk_organisation_id = so2.stk_organisation_id
left join (
SELECT * FROM cat_currency WHERE currency_country = (SELECT param_value FROM cat_global_params WHERE param_name = 'Country')
) bar on true
WHERE ca_programme_id = id
loop
return next mon_record;
end loop;
end if;
elsif (request_orga is null and request_cont is not null) then
if (ipostal_address_street !='' or ipostal_address_city !='' or ipostal_address_state !='' or ipostal_address_postcode !='') then
FOR mon_record IN
SELECT case when i2.postal_address_street != '' then i2.postal_address_street else '[INSERT THE STREET AND NUMBER]' end as address_street,
case when i2.postal_address_city != '' then i2.postal_address_city else '[INSERT THE CITY/SUBURB]' end as address_city,
case when i2.postal_address_state != '' then i2.postal_address_state else '[INSERT THE STATE]' end as address_state,
case when i2.postal_address_postcode != '' then i2.postal_address_postcode else '[INSERT THE POSTAL CODE]' end as address_postcode
FROM ca_programme p
LEFT JOIN catalog_table fs ON p.ca_cat_fund = fs.catalog_table_id
LEFT JOIN stk_stakeholder ss2 ON ss2.stk_stakeholder_id = p.contact_stk_stakeholder_id
LEFT JOIN ind_individual i2 ON ss2.individual_id = i2.individual_id
LEFT JOIN vw_stk_stakeholder vs2 ON vs2.stk_stakeholder_id = p.contact_organisation_stk_stakeholder_id
LEFT JOIN stk_organisation so2 ON vs2.stk_organisation_id = so2.stk_organisation_id
left join (
SELECT * FROM cat_currency WHERE currency_country = (SELECT param_value FROM cat_global_params WHERE param_name = 'Country')
) bar on true
WHERE ca_programme_id = id
loop
return next mon_record;
end loop;
elsif (imain_address_street !='' or imain_address_city !='' or imain_address_state !='' or imain_address_postcode !='') then
FOR mon_record IN
SELECT case when i2.main_address_street != '' then i2.main_address_street else '[INSERT THE STREET AND NUMBER]' end as address_street,
case when i2.main_address_city != '' then i2.main_address_city else '[INSERT THE CITY/SUBURB]' end as address_city,
case when i2.main_address_state != '' then i2.main_address_state else '[INSERT THE STATE]' end as address_state,
case when i2.main_address_postcode != '' then i2.main_address_postcode else '[INSERT THE POSTAL CODE]' end as address_postcode
FROM ca_programme p
LEFT JOIN catalog_table fs ON p.ca_cat_fund = fs.catalog_table_id
LEFT JOIN stk_stakeholder ss2 ON ss2.stk_stakeholder_id = p.contact_stk_stakeholder_id
LEFT JOIN ind_individual i2 ON ss2.individual_id = i2.individual_id
LEFT JOIN vw_stk_stakeholder vs2 ON vs2.stk_stakeholder_id = p.contact_organisation_stk_stakeholder_id
LEFT JOIN stk_organisation so2 ON vs2.stk_organisation_id = so2.stk_organisation_id
left join (
SELECT * FROM cat_currency WHERE currency_country = (SELECT param_value FROM cat_global_params WHERE param_name = 'Country')
) bar on true
WHERE ca_programme_id = id
loop
return next mon_record;
end loop;
end if;
else --if request_cont is null then
FOR mon_record IN
SELECT '[INSERT THE STREET AND NUMBER]' as address_street, '[INSERT THE CITY/SUBURB]' as address_city,'[INSERT THE STATE]' as address_state,
'[INSERT THE POSTAL CODE]' as address_postcode
loop
return next mon_record;
end loop;
end if;
return;
END
$BODY$
LANGUAGE plpgsql STABLE;
ALTER FUNCTION bis_ca_prog_get_adress(
id integer, postal_address_street character varying,postal_address_city character varying,postal_address_state character varying, postal_address_postcode character varying,
main_address_street character varying,main_address_city character varying,main_address_state character varying, main_address_postcode character varying)
OWNER TO postgres;
Bonjour , je m'embrouille depuis de matin avec ma fonction, je souhaite afficher une selection selon des conditions, mais j'ai une erreur :
ERROR: syntax error at end of input
LINE 54: $BODY$
la fonction fonctionne bien sans l'instruction apres else if.
voici la fonction
CREATE OR REPLACE FUNCTION bis_ca_prog_get_adress(
id integer, postal_address_street character varying,postal_address_city character varying,postal_address_state character varying, postal_address_postcode character varying,
main_address_street character varying,main_address_city character varying,main_address_state character varying, main_address_postcode character varying)
RETURNS SETOF address_ind_org_type AS
$BODY$
DECLARE
mon_record address_ind_org_type;
id ALIAS FOR $1;
BEGIN
if (select contact_organisation_stk_stakeholder_id from ca_programme where ca_programme_id = id) is not null then
if (postal_address_street !='' or postal_address_city !='' or postal_address_state !='' or postal_address_postcode !='') then
FOR mon_record IN
SELECT case when so2.postal_address_street != '' then so2.postal_address_street else '[INSERT THE STREET AND NUMBER]' end as address_street,
case when so2.postal_address_city != '' then so2.postal_address_city else '[INSERT THE CITY/SUBURB]' end as address_city,
case when so2.postal_address_state != '' then so2.postal_address_state else '[INSERT THE STATE]' end as address_state,
case when so2.postal_address_postcode != '' then so2.postal_address_postcode else '[INSERT THE POSTAL CODE]' end as address_postcode
FROM ca_programme p
LEFT JOIN catalog_table fs ON p.ca_cat_fund = fs.catalog_table_id
LEFT JOIN stk_stakeholder ss2 ON ss2.stk_stakeholder_id = p.contact_stk_stakeholder_id
LEFT JOIN ind_individual i2 ON ss2.individual_id = i2.individual_id
LEFT JOIN vw_stk_stakeholder vs2 ON vs2.stk_stakeholder_id = p.contact_organisation_stk_stakeholder_id
LEFT JOIN stk_organisation so2 ON vs2.stk_organisation_id = so2.stk_organisation_id
left join (
SELECT * FROM cat_currency WHERE currency_country = (SELECT param_value FROM cat_global_params WHERE param_name = 'Country')
) bar on true
WHERE ca_programme_id = id
loop
return next mon_record;
end loop;
else if (main_address_street !='' or main_address_city !='' or main_address_state !='' or main_address_postcode !='') then
FOR mon_record IN
SELECT case when so2.main_address_street != '' then so2.main_address_street else '[INSERT THE STREET AND NUMBER]' end as address_street,
case when so2.main_address_city != '' then so2.main_address_city else '[INSERT THE CITY/SUBURB]' end as address_city,
case when so2.main_address_state != '' then so2.main_address_state else '[INSERT THE STATE]' end as address_state,
case when so2.main_address_postcode != '' then so2.main_address_postcode else '[INSERT THE POSTAL CODE]' end as address_postcode
FROM ca_programme p
LEFT JOIN catalog_table fs ON p.ca_cat_fund = fs.catalog_table_id
LEFT JOIN stk_stakeholder ss2 ON ss2.stk_stakeholder_id = p.contact_stk_stakeholder_id
LEFT JOIN ind_individual i2 ON ss2.individual_id = i2.individual_id
LEFT JOIN vw_stk_stakeholder vs2 ON vs2.stk_stakeholder_id = p.contact_organisation_stk_stakeholder_id
LEFT JOIN stk_organisation so2 ON vs2.stk_organisation_id = so2.stk_organisation_id
left join (
SELECT * FROM cat_currency WHERE currency_country = (SELECT param_value FROM cat_global_params WHERE param_name = 'Country')
) bar on true
WHERE ca_programme_id = id
loop
return next mon_record;
end loop;
end if;
end if;
return;
END
$BODY$
LANGUAGE plpgsql STABLE;
ALTER FUNCTION bis_ca_prog_get_adress(
id integer, postal_address_street character varying,postal_address_city character varying,postal_address_state character varying, postal_address_postcode character varying,
main_address_street character varying,main_address_city character varying,main_address_state character varying, main_address_postcode character varying)
OWNER TO postgres;
merci pour votre aide
Bonjour,
quelqu'un peut m'aider a reduire ma requete ci dessous?
INSERT INTO stk_organisation_staff_in_charge (stk_organisation_id, staff_in_charge_individual_id) SELECT (SELECT max(stk_organisation_id) FROM stk_organisation), (SELECT individual_id FROM ind_individual WHERE complete_name = TRIM('TEST')
and split_individual_staff =1) WHERE TRIM('TEST') != '' AND (SELECT individual_id FROM ind_individual WHERE complete_name = TRIM('TEST') and split_individual_staff =1) != NULL;
surtout je souhaite eviter d'ecrire 2 fois la requete
SELECT individual_id FROM ind_individual WHERE complete_name = TRIM('TEST') and split_individual_staff =1
Merci
OUF, finalement j'ai casté et ca marche avec ca
INSERT INTO organisation(excel_unique_id,last_audited)
VALUES (1,(SELECT CASE when TRIM('') = '' THEN ('now'::text)::date ELSE (TRIM('')::text)::date END));
merci
Bonjour,
j'importe des données de excel vers postgresql,
j'aio fait un controle qui lorsque le champs last_audited n'est pas renseigné, on insert la date actuel, sinon on recupere la valeur du champs.
INSERT INTO organisation(excel_unique_id,last_audited)
VALUES (1,CASE WHEN TRIM('') = '' THEN (select now()::date) ELSE ''::date END);
mais j'ai une rerreur lorsque je lance la reqeute
ERROR: invalid input syntax for type date: ""
********** Error **********
ERROR: invalid input syntax for type date: ""
SQL state: 22007
quelquun a t'il une idée?
super,
ca marche bien.
Merci encore rjuju
Salut,
apres avoir installer strawberry perl, et télécharger pgbadger,
j'ai lancé l'outil perl(commande line) de strawberry.
et ensuite
C:\>cd pgbadger-master
C:\pgbadger-master>Makefile.PL
Cheicking if your kit is complete...
Writing Makefile for pgBadger
Writing MYMETA.yml and MYMETA.json
C:\pgbadger-master>Makefile
'Makefile' n'est pas reconnu en tant que commande interne ou externe,.......
Jai lu le readme sur https://github.com/dalibo/pgbadger
mais je ne vois pas comment générer les rapports.
MErci
Bonjour,
je suis heureux de retrouver le forum postgresql apres 7 mois d'absence.
j'ai regardé l'install de pgfoune(http://pgfouine.projects.pgfoundry.org/tutorial.html),
mais je ne vois que la procedure d'installation sur linux.
les autres outils proposé par Gleu ne fonctionnent aussi que sur linux.
pourriez vous m’éclairer pour une installation sur windows 7.
merci
Salut,
Il est temps que je bascule notre gros serveur dédié hébergeant postgresql-8.4.11.
config:
-heberge sur ubuntu
-occupation disque: 46 Go
-a_directory = '/postgres_db/pg-8.4/main'
Je souhaite avoir des conseils sur la version a migrer entre 9.0 et 9.1.
aussi pour la migration, je souhaite avoir votre avis sur cette procédure
-pg_dumpall > sauvegarde.sql
/etc/init.d/postgresql-8.4 stop
mv /postgres_db/pg-8.4 /postgres_db/pg-8.4.old
-installer la nouvelle version en utilisant un autre port (l'ancienne utilisant le port 5432), je garde l'ancienne au cas ou.
$ sudo apt-get install postgresql-9.0 postgresql-client-9.0 postgresql-contrib-9.0
initdb -D /postgres_db/pg-8.4
postgres -D /postgres_db/pg-8.4
restaurer les données: psql -f sauvegarde.sql postgres
Merci
mais a quoi cela peut etre du, je vous envois une bonne partie du log
<12345 - 2012-03-22 19:54:55 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<12345 - 2012-03-22 19:54:55 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<12339 - 2012-03-22 19:55:06 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<12339 - 2012-03-22 19:55:06 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<24181 - 2012-03-22 19:56:51 EDT -209.xxx.xx.220> SELECTLOG: duration: 3028.592 ms execute S_3: SELECT addresses.address_id, addresses.street_address, addresses.city, addresses.province, addresses.country, addresses.is_correct FROM address.mappoint_address addresses WHERE addresses.latitude_wgs84 = $1 AND addresses.longitude_wgs84 = $2
<24181 - 2012-03-22 19:56:51 EDT -209.xxx.xx.220> SELECTDETAIL: parameters: $1 = '45.2864', $2 = '-74.0365'
<12319 - 2012-03-22 19:57:48 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<12319 - 2012-03-22 19:57:48 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<11583 - 2012-03-22 20:00:03 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11583 - 2012-03-22 20:00:03 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<24194 - 2012-03-22 20:00:14 EDT -209.xxx.xx.220> SELECTLOG: duration: 3654.631 ms execute S_2: SELECT addresses.address_id, addresses.street_address, addresses.city, addresses.province, addresses.country, addresses.is_correct FROM address.mappoint_address addresses WHERE addresses.latitude_wgs84 = $1 AND addresses.longitude_wgs84 = $2
<24194 - 2012-03-22 20:00:14 EDT -209.xxx.xx.220> SELECTDETAIL: parameters: $1 = '45.2862', $2 = '-74.0373'
<24181 - 2012-03-22 20:00:15 EDT -209.xxx.xx.220> SELECTLOG: duration: 3705.581 ms execute S_3: SELECT addresses.address_id, addresses.street_address, addresses.city, addresses.province, addresses.country, addresses.is_correct FROM address.mappoint_address addresses WHERE addresses.latitude_wgs84 = $1 AND addresses.longitude_wgs84 = $2
<24181 - 2012-03-22 20:00:15 EDT -209.xxx.xx.220> SELECTDETAIL: parameters: $1 = '45.4876', $2 = '-75.6424'
<11582 - 2012-03-22 20:00:24 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11582 - 2012-03-22 20:00:24 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<11581 - 2012-03-22 20:00:30 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11581 - 2012-03-22 20:00:30 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<11579 - 2012-03-22 20:00:30 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11579 - 2012-03-22 20:00:30 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<11580 - 2012-03-22 20:00:30 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11580 - 2012-03-22 20:00:30 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<11578 - 2012-03-22 20:01:10 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11578 - 2012-03-22 20:01:10 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<25097 - 2012-03-22 20:01:26 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<25097 - 2012-03-22 20:01:26 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<1247 - 2012-03-22 20:01:27 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<1247 - 2012-03-22 20:01:27 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<14812 - 2012-03-22 20:01:40 EDT -209.xxx.xx.216> idleLOG: could not receive data from client: Connection timed out
<14812 - 2012-03-22 20:01:40 EDT -209.xxx.xx.216> idleLOG: unexpected EOF on client connection
<11577 - 2012-03-22 20:01:54 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11577 - 2012-03-22 20:01:54 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<11658 - 2012-03-22 20:01:55 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11658 - 2012-03-22 20:01:55 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<11677 - 2012-03-22 20:01:56 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<11677 - 2012-03-22 20:01:56 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<12304 - 2012-03-22 20:01:56 EDT -209.xxx.xx.220> idleLOG: could not receive data from client: Connection timed out
<12304 - 2012-03-22 20:01:56 EDT -209.xxx.xx.220> idleLOG: unexpected EOF on client connection
<24194 - 2012-03-22 20:02:35 EDT -209.xxx.xx.220> SELECTLOG: duration: 3159.124 ms execute S_2: SELECT addresses.address_id, addresses.street_address, addresses.city, addresses.province, addresses.country, addresses.is_correct FROM address.mappoint_address addresses WHERE addresses.latitude_wgs84 = $1 AND addresses.longitude_wgs84 = $2
<24194 - 2012-03-22 20:02:35 EDT -209.xxx.xx.220> SELECTDETAIL: parameters: $1 = '48.2664', $2 = '-70.8745'
Salut,
Il me semble que le problème ne vient pas forcement de la car hier on a constaté une lenteur du serveur vers 19h, et j'ai vu dans les logs une 20taine de ce message de suite provenant de notre serveur web.
je pense que ce doit être le paramètre max-connexions qui a été dépassé par le nombre de connexion.
je vais augmenter ce paramètre de 100 a 150.
qu'est ce que tu en penses?
Merci, effectivement, c'est dû aux ruptures de mes connexion ssh sur mon serveur.
merci
Salut,
J'ai remarqué dans mes logs ces erreurs qui datent depuis un certains moment.
<1167 - 2012-03-15 17:17:56 EDT - 10.8.0.14> idleLOG: could not receive data from client: Connection timed out
<1167 - 2012-03-15 17:17:56 EDT - 10.8.0.14> idleLOG: unexpected EOF on client connection
pourtant le réseau 10.8.0.0 est autorisé dans le fichier pg_hba.conf
aviez vous une idée?
Merci
Lorsque je remet mon ancien fichier postgresql.conf original, j'arrive a demarer le serveur,mais quand je remets l'ancien avec les modif, ca refuse, donc je vais voir dans ce fichier ce qui bloque.
Salut,
j'avais un serveur postgresql en dev 8.4.10 et hier j'ai lancé la commande aptitude safe-upgrade pour recuperer les derniere mise a jour de ubuntu, et j'ai mise a jour postgresql 8.4.11,
ca fonctionnais hier, mais aujourd'hui, j'ai essaye d'arrter le serveur:impossible,
j'ai fais un kill -9 sur le processus du serveur qui etait a 24143,
mais je n'arrive pas a relancer avec sudo /etc/init.d/postgresql-8.4 start
j'ai l'erreur suivant
* The PostgreSQL server failed to start. Please check the log output.
[fail]
et dans le fichier log, j'ai le message suivant
<26497 - 2012-03-09 11:10:03 EST -> LOG: 00000: database system was interrupted; last known up at 2012-03-09 09:42:57 EST
<26497 - 2012-03-09 11:10:03 EST -> LOCATION: StartupXLOG, xlog.c:5278
<26497 - 2012-03-09 11:10:03 EST -> LOG: 00000: invalid magic number 0000 in log file 463, segment 176, offset 0
<26497 - 2012-03-09 11:10:03 EST -> LOCATION: ValidXLOGHeader, xlog.c:3792
<26497 - 2012-03-09 11:10:03 EST -> LOG: 00000: invalid primary checkpoint record
<26497 - 2012-03-09 11:10:03 EST -> LOCATION: ReadCheckpointRecord, xlog.c:6066
<26497 - 2012-03-09 11:10:03 EST -> LOG: 00000: invalid magic number 0000 in log file 463, segment 176, offset 0
<26497 - 2012-03-09 11:10:03 EST -> LOCATION: ValidXLOGHeader, xlog.c:3792
<26497 - 2012-03-09 11:10:03 EST -> LOG: 00000: invalid secondary checkpoint record
<26497 - 2012-03-09 11:10:03 EST -> LOCATION: ReadCheckpointRecord, xlog.c:6070
<26497 - 2012-03-09 11:10:03 EST -> PANIC: XX000: could not locate a valid checkpoint record
<26497 - 2012-03-09 11:10:03 EST -> LOCATION: StartupXLOG, xlog.c:5387
<26495 - 2012-03-09 11:10:03 EST -> LOG: 00000: startup process (PID 26497) was terminated by signal 6: Aborted
<26495 - 2012-03-09 11:10:03 EST -> LOCATION: LogChildExit, postmaster.c:2745
<26495 - 2012-03-09 11:10:03 EST -> LOG: 00000: aborting startup due to startup process failure
<26495 - 2012-03-09 11:10:03 EST -> LOCATION: reaper, postmaster.c:2266
c'est bizarre,
j'ai stopper la bd, puis relancé ma commande rsync(rsync -e ssh -avz /postgres_db/pg-8.4/main/pg_tblspc/16392/16394/18434 user@xxx.xxx.x.x:/postgres_db/pg-8.4/main/pg_tblspc/16392/16394/)
et relancé le serveur depuis 1h, plus de message d'erreur.
Donc, je pense que c'est le fait que je n'avais pas arrêté mes 2 serveurs avant le rsync que j'avais eu ce problème.
bon, j'attend de faire d'autre manip pour voir encore
Salut,
Suite a une nouvelle installation de postgresql-8.4.10 sur un nouveau serveur ubuntu,
J'ai fais un rsync pour copier le repertoire data( /postgresql_db/) de l'encien serveur(postgresql-8.4.8) vers le nouveau,
tout marche bien aparamment, sauf que j'ai dans le fichier log ce message d'erreur sur plusieurs lignes qui se repete
<16561 - 2012-02-28 11:38:53 EST -> ERROR: xlog flush request 1C9/FED02350 is not satisfied --- flushed only to 1C9/FE58E418
<16561 - 2012-02-28 11:38:54 EST -> ERROR: xlog flush request 1C9/FED02350 is not satisfied --- flushed only to 1C9/FE58E418
<16561 - 2012-02-28 11:38:54 EST -> WARNING: could not write block 2 of pg_tblspc/16392/16394/18434
quelqu'un a une idee ?
salut,
environ 60 connexions simultanées.
bcp d’écritures a la seconde.
j'ai vu dans un la documentation postgresql(http://docs.postgresql.fr/8.4/runtime-config-resource.html), qu'il faut allouer 40% de la memoire a la variable shared_buffer.
est ce la memoire totale ou memoire free?
aussi quelle valeure donnees a shmmax et shmall ?
merci
Bonjour, j'ai un nouveau serveur dédié postgresql-8.4 installe sur ubuntu.
voici les paramètres
# free
total used free shared buffers cached
Mem: 6117392 4239636 1877756 0 112308 3796344
-/+ buffers/cache: 330984 5786408
Swap: 2000052 76 1999976
-----
# df -h /*
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 546G 42G 477G 8% /
/dev/sda1 183M 22M 152M 13% /boot
none 3.0G 220K 3.0G 1% /dev
-------------
le répertoire data de la bd est actuellement a 42 Go.
Ma préoccupation est de donner les meilleurs valeurs aux variables shared_buffers et autres.
sur l’ancien serveur, voici les valeurs qui existent:
shared_buffers = 1024MB
temp_buffers = 10MB
#max_prepared_transactions = 5
effective_cache_size = 3000MB
work_mem = 30MB
maintenance_work_mem = 16MB
et dans le fichier /etc/sysctl.conf, on
kernel.shmmax=4907034880
kernel.shmall=40971520
net.ipv6.conf.all.disable_ipv6 = 1
or sur le nouveau serveur, ces variables sont inexistant
Quel sera votre conseil pour parametrer postgresql.conf et /etc/sysctl.conf ?
salut,
Il s'agit du même FAI, on a demandé une machine ubuntu plus puissante qui a été livré.
techniquement, est ce que c'est possible de récupérer l'image virtuelle de ce serveur sur le nouveau serveur ubuntu?
si oui, comment on peut le faire?
je précise que l’ancien serveur a deux bd postgresql plus un bd mysql et auusi des taches cront. et aussi on a plusieurs clients java, web-service et php qui utilisent l’ancien serveur.
sinon, en passant par rsync, est ce que la copie de tous les répertoires liés a postgresql de l’ancien serveur vers le nouveau peut me garantir que la bd va bien fonctionner sur le nouveau?
Merci