Slot replication not working in Postgres 9.4What's the default superuser username/password for postgres after a new install?Load balancing issue with pgpool2 and postgresql-8.3What units used to measure xlog location?Postgres 9.1 replication - force select operations to specific slaveUDP Overflow / UDP Drops on Standby Postgres ServiceMultiple Postgres Servers (one writer, multiple reader) with Shared DiskPostgresql 9.3 Log Shipping on a Hot StandbyPostgres 9.5 server not starting due to already active replication slotpostgresql track counts and autovacuum is not workingPostgres initial replication taking long time

Write to EXCEL from SQL DB using VBA script

Who died in the Game of Thrones episode, "The Long Night"?

If 1. e4 c6 is considered as a sound defense for black, why is 1. c3 so rare?

Hang 20lb projector screen on Hardieplank

Is there a QGIS plugin that reclassify raster symbology based on current extent?

Was Unix ever a single-user OS?

What is the word which sounds like "shtrass"?

Transfer over $10k

Is it cheaper to drop cargo than to land it?

Feels like I am getting dragged into office politics

Is lying to get "gardening leave" fraud?

How long can a 35mm film be used/stored before it starts to lose its quality after expiry?

Map one pandas column using two dictionaries

If Earth is tilted, why is Polaris always above the same spot?

Is Cola "probably the best-known" Latin word in the world? If not, which might it be?

Short story about people living in a different time streams

Can I use 1000v rectifier diodes instead of 600v rectifier diodes?

Unexpected email from Yorkshire Bank

What word means "to make something obsolete"?

Survey Confirmation - Emphasize the question or the answer?

Why is the SNP putting so much emphasis on currency plans?

What happens if I start too many background jobs?

Pigeonhole Principle Problem

Unidentified items in bicycle tube repair kit



Slot replication not working in Postgres 9.4


What's the default superuser username/password for postgres after a new install?Load balancing issue with pgpool2 and postgresql-8.3What units used to measure xlog location?Postgres 9.1 replication - force select operations to specific slaveUDP Overflow / UDP Drops on Standby Postgres ServiceMultiple Postgres Servers (one writer, multiple reader) with Shared DiskPostgresql 9.3 Log Shipping on a Hot StandbyPostgres 9.5 server not starting due to already active replication slotpostgresql track counts and autovacuum is not workingPostgres initial replication taking long time






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I am using Postgres 9.4 on Windows 2008 server. There are three such instances that I am using. One as master and the rest of the two are slave/standby. The version of Postgres is 9.4 in all the three instances. I have set up replication using physical slot. But the replication is not working. On querying SELECT * from pg_stat_replication; 0 rows are returned and on SELECT * from pg_replication_slots; the slot shows it is not active ('f' in the 'active' column).



I have the following configuration :



On Primary/Master:



  1. wal_level = hot_standby

  2. max_wal_senders = 2

  3. max_replication_slots = 2

  4. hot_standby = on

On Secondary/Standby:



  1. wal_level = hot_standby

  2. hot_standby = on

recovery.conf file on secondary/standby:



  1. standby_mode = on

  2. primary_conninfo = 'host=192.168.8.192 port=5432
    user=postgres password=123456'

  3. primary_slot_name = 'testing'

  4. recovery_min_apply_delay = 1min

What could be missing? I have bootstrapped Standby servers with Master's data backup. Thanks.










share|improve this question
























  • When I create slot by query "SELECT * FROM pg_create_physical_replication_slot('testing');", the slot created is inactive. Why would this query create an inactive slot?

    – raghav
    Dec 8 '15 at 9:20

















1















I am using Postgres 9.4 on Windows 2008 server. There are three such instances that I am using. One as master and the rest of the two are slave/standby. The version of Postgres is 9.4 in all the three instances. I have set up replication using physical slot. But the replication is not working. On querying SELECT * from pg_stat_replication; 0 rows are returned and on SELECT * from pg_replication_slots; the slot shows it is not active ('f' in the 'active' column).



I have the following configuration :



On Primary/Master:



  1. wal_level = hot_standby

  2. max_wal_senders = 2

  3. max_replication_slots = 2

  4. hot_standby = on

On Secondary/Standby:



  1. wal_level = hot_standby

  2. hot_standby = on

recovery.conf file on secondary/standby:



  1. standby_mode = on

  2. primary_conninfo = 'host=192.168.8.192 port=5432
    user=postgres password=123456'

  3. primary_slot_name = 'testing'

  4. recovery_min_apply_delay = 1min

What could be missing? I have bootstrapped Standby servers with Master's data backup. Thanks.










share|improve this question
























  • When I create slot by query "SELECT * FROM pg_create_physical_replication_slot('testing');", the slot created is inactive. Why would this query create an inactive slot?

    – raghav
    Dec 8 '15 at 9:20













1












1








1








I am using Postgres 9.4 on Windows 2008 server. There are three such instances that I am using. One as master and the rest of the two are slave/standby. The version of Postgres is 9.4 in all the three instances. I have set up replication using physical slot. But the replication is not working. On querying SELECT * from pg_stat_replication; 0 rows are returned and on SELECT * from pg_replication_slots; the slot shows it is not active ('f' in the 'active' column).



I have the following configuration :



On Primary/Master:



  1. wal_level = hot_standby

  2. max_wal_senders = 2

  3. max_replication_slots = 2

  4. hot_standby = on

On Secondary/Standby:



  1. wal_level = hot_standby

  2. hot_standby = on

recovery.conf file on secondary/standby:



  1. standby_mode = on

  2. primary_conninfo = 'host=192.168.8.192 port=5432
    user=postgres password=123456'

  3. primary_slot_name = 'testing'

  4. recovery_min_apply_delay = 1min

What could be missing? I have bootstrapped Standby servers with Master's data backup. Thanks.










share|improve this question
















I am using Postgres 9.4 on Windows 2008 server. There are three such instances that I am using. One as master and the rest of the two are slave/standby. The version of Postgres is 9.4 in all the three instances. I have set up replication using physical slot. But the replication is not working. On querying SELECT * from pg_stat_replication; 0 rows are returned and on SELECT * from pg_replication_slots; the slot shows it is not active ('f' in the 'active' column).



I have the following configuration :



On Primary/Master:



  1. wal_level = hot_standby

  2. max_wal_senders = 2

  3. max_replication_slots = 2

  4. hot_standby = on

On Secondary/Standby:



  1. wal_level = hot_standby

  2. hot_standby = on

recovery.conf file on secondary/standby:



  1. standby_mode = on

  2. primary_conninfo = 'host=192.168.8.192 port=5432
    user=postgres password=123456'

  3. primary_slot_name = 'testing'

  4. recovery_min_apply_delay = 1min

What could be missing? I have bootstrapped Standby servers with Master's data backup. Thanks.







postgresql database-replication postgresql-replication






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '15 at 13:11







raghav

















asked Nov 27 '15 at 10:15









raghavraghav

287




287












  • When I create slot by query "SELECT * FROM pg_create_physical_replication_slot('testing');", the slot created is inactive. Why would this query create an inactive slot?

    – raghav
    Dec 8 '15 at 9:20

















  • When I create slot by query "SELECT * FROM pg_create_physical_replication_slot('testing');", the slot created is inactive. Why would this query create an inactive slot?

    – raghav
    Dec 8 '15 at 9:20
















When I create slot by query "SELECT * FROM pg_create_physical_replication_slot('testing');", the slot created is inactive. Why would this query create an inactive slot?

– raghav
Dec 8 '15 at 9:20





When I create slot by query "SELECT * FROM pg_create_physical_replication_slot('testing');", the slot created is inactive. Why would this query create an inactive slot?

– raghav
Dec 8 '15 at 9:20










1 Answer
1






active

oldest

votes


















0














I had a similar issue on Ubuntu. For me in turned out that replication.conf was not in the right location.



According to the Postgres Wiki on Streaming Replication in the section that describes recovery.conf:




$EDITOR recovery.conf



Note that recovery.conf must be in $PGDATA directory.



It should NOT be located in the same directory as postgresql.conf




Once I moved recovery.conf to the right location and restarted Postgres, SELECT * from pg_stat_replication returned active = true.



Hope that helps.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "2"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f739307%2fslot-replication-not-working-in-postgres-9-4%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I had a similar issue on Ubuntu. For me in turned out that replication.conf was not in the right location.



    According to the Postgres Wiki on Streaming Replication in the section that describes recovery.conf:




    $EDITOR recovery.conf



    Note that recovery.conf must be in $PGDATA directory.



    It should NOT be located in the same directory as postgresql.conf




    Once I moved recovery.conf to the right location and restarted Postgres, SELECT * from pg_stat_replication returned active = true.



    Hope that helps.






    share|improve this answer



























      0














      I had a similar issue on Ubuntu. For me in turned out that replication.conf was not in the right location.



      According to the Postgres Wiki on Streaming Replication in the section that describes recovery.conf:




      $EDITOR recovery.conf



      Note that recovery.conf must be in $PGDATA directory.



      It should NOT be located in the same directory as postgresql.conf




      Once I moved recovery.conf to the right location and restarted Postgres, SELECT * from pg_stat_replication returned active = true.



      Hope that helps.






      share|improve this answer

























        0












        0








        0







        I had a similar issue on Ubuntu. For me in turned out that replication.conf was not in the right location.



        According to the Postgres Wiki on Streaming Replication in the section that describes recovery.conf:




        $EDITOR recovery.conf



        Note that recovery.conf must be in $PGDATA directory.



        It should NOT be located in the same directory as postgresql.conf




        Once I moved recovery.conf to the right location and restarted Postgres, SELECT * from pg_stat_replication returned active = true.



        Hope that helps.






        share|improve this answer













        I had a similar issue on Ubuntu. For me in turned out that replication.conf was not in the right location.



        According to the Postgres Wiki on Streaming Replication in the section that describes recovery.conf:




        $EDITOR recovery.conf



        Note that recovery.conf must be in $PGDATA directory.



        It should NOT be located in the same directory as postgresql.conf




        Once I moved recovery.conf to the right location and restarted Postgres, SELECT * from pg_stat_replication returned active = true.



        Hope that helps.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 11 '16 at 23:30









        Mike SiconolfiMike Siconolfi

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f739307%2fslot-replication-not-working-in-postgres-9-4%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company