En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies. Ces derniers assurent le bon fonctionnement de nos services. En savoir plus.

Le dernier Mohican - The last Mohican - Page 4

  • oradebug


  • Show replication status in PostgreSQL



    select client_addr, state, sent_location, write_location,
            flush_location, replay_location from pg_stat_replication;

    This query can output can be like this:

    postgres=# select client_addr, state, sent_location,write_location, flush_location, replay_location, sync_priority from pg_stat_replication;
  • Disable Streaming Replication without restarting either master or slave

    I understand the way things work currently, but would it not be more
    convenient to let the replication be stopped and started from SQL commands

    On Master:

    select pg_pause_streaming_replication(slave_fqdn);
    select pg_resume_streaming_replication(slave_fqdn);

    On Slave:

    select pg_pause_streaming_replication();
    select pg_pause_streaming_replication();

    If Cascaded Streaming Replication is confugured, then

    On Slave:

    select pg_start_streaming_replication(cascaded_slave_fqdn);
    select pg_stop_streaming_replication(cascaded_slave_fqdn);

    Or an OS executable [ either in the core or a contrib module] like

    pg_replication -p primary_fqdn -s slave_fqdn -a pause
    pg_replication -p primary_fqdn -s slave_fqdn -a resume
    pg_replication -p primary_fqdn -s slave_fqdn -a setup

    [ the last one would awesome; and i do not think that it is impossible, and
    would be loved by one and all ]

  • [UNIX] convertir un paquage debian en rpm et vice versa




  • bonne blague

    Toute la classe de toto fait des dessins et la maîtresse vérifie pour chacun d'eux, quand arrive le tour de Toto, elle regarde son dessin et ne voit rien sur la feuille,
    la maîtresse lui demanda alors :
    - Pourquoi tu n'as rien fais ?
    - Si j'ai dessiné, répondit toto, j'avais dessiné des vaches avec de l' herbe, mais après les vaches on tout brouté et puis elles sont parties.

    Lire la suite

  • Asking information about a concept

    hello I am wondering how english people feel the concept of boyfriend / girlfriend and sex friend.
    I understood that for you, a sex friend is person who you have sex with , and there are no feelings...necessary
    I understand that a boyfriend and a girlfriend is a person who you have feelings and sex with ...
    OK with that ?
    But with the new concept of sex friend , is it possible that a english girl say , I have a girlfriend, but I don't have sex with?? And she could say , I have sex with another person , it is my sex friend?
    Because here in France, it is not possible, when you say that you have a girlfriend, we say "petite amie", and when you say that you have a sex friend , we didn't find a good translation because we are scared to say "copain de baise" it is rough, so we still say "sex friend" and every body is happy.
    In France , when you say to someone that you have a girlfriend it means of course that you have sex with her. I m talking to adults over 21's here not teenagers.
    So now do you know what I mean? Can you explain me ? If a girl says on a chat " HI , I introduce you my girlfriend ..." on a snap chat , it means that she has sex with her or not? and if not can I have a little hope ?? lol
    Enjoy your day

  • backup

    # Backup script starts here.
    set -x
    # Location of the backup logfile.
    # Location to place backups.
    touch $logfile
    timeslot=`date +%H-%M`
    databases=`psql -h /var/run/postgresqlcluster$NAME -p 5435 postgres -q -c "l" | sed -n 4,/eof/p | grep -v lignes) | awk {'print $1'} | grep -v template| grep -v "|"`
    date > $logfile
    hostname >> $logfile
    for i in $databases; do
        echo "DATABASE $i" >> $logfile
            timeinfo=`date '+%T %x'`
            echo "Backup and Vacuum complete at $timeinfo for time slot $timeslot on database: $i " >> $logfile
        /usr/bin/vacuumdb -z -h/var/run/postgresqlcluster$NAME -p 5435 -U s-cad-postgresdec $i >/dev/null 2>&1
            /usr/bin/pg_dump $i -h /var/run/postgresqlcluster$NAME -p 5435  | gzip > "$backup_dir/postgresql-$i-$timeslot-database.gz"
        echo "taille $databases" >> $logfile
        du -hs $backup_dir/postgresql-$i-$timeslot-database.gz >> $logfile
        echo "" >> $logfile
    echo "Bonjour,nn DUMP BASE POSTGRES$NAME sur le serveur $HOSTNAME. nnL'équipe Unix & Linux" | mutt -x -s "DUMP BASE DUMP POSTGRES$NAME" -a ${logfile} -c ${TO_C}