Downgrading PostgreSQL 10 to 9.4












1















Are there any particular precautions I should take when downgrading PG 10 to 9.4?



I have a database on Heroku (PG 9.4) which I'm going to upgrade to PG 10.6. In case something goes wrong, I want to be able to go back to 9.4.



Things I already tested:




  1. create a backup of the already upgraded PG 10.6 DB (Heroku creates binary compressed dumps)

  2. create a new PG 9.4 DB

  3. upload the backup from step 1. to DB from step 2


The backup seems to be restored properly. What should focus on in particular to be sure this procedure is all right? Are there any other ways to downgrad PostgreSQL?










share|improve this question














bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Can’t you create a new db and import the data and keep the old one around to make your first tests before you do the switchover? (I always think this is a great advantage of cloud services to have that kind of short term capacity)

    – eckes
    Dec 19 '18 at 0:43
















1















Are there any particular precautions I should take when downgrading PG 10 to 9.4?



I have a database on Heroku (PG 9.4) which I'm going to upgrade to PG 10.6. In case something goes wrong, I want to be able to go back to 9.4.



Things I already tested:




  1. create a backup of the already upgraded PG 10.6 DB (Heroku creates binary compressed dumps)

  2. create a new PG 9.4 DB

  3. upload the backup from step 1. to DB from step 2


The backup seems to be restored properly. What should focus on in particular to be sure this procedure is all right? Are there any other ways to downgrad PostgreSQL?










share|improve this question














bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Can’t you create a new db and import the data and keep the old one around to make your first tests before you do the switchover? (I always think this is a great advantage of cloud services to have that kind of short term capacity)

    – eckes
    Dec 19 '18 at 0:43














1












1








1








Are there any particular precautions I should take when downgrading PG 10 to 9.4?



I have a database on Heroku (PG 9.4) which I'm going to upgrade to PG 10.6. In case something goes wrong, I want to be able to go back to 9.4.



Things I already tested:




  1. create a backup of the already upgraded PG 10.6 DB (Heroku creates binary compressed dumps)

  2. create a new PG 9.4 DB

  3. upload the backup from step 1. to DB from step 2


The backup seems to be restored properly. What should focus on in particular to be sure this procedure is all right? Are there any other ways to downgrad PostgreSQL?










share|improve this question














Are there any particular precautions I should take when downgrading PG 10 to 9.4?



I have a database on Heroku (PG 9.4) which I'm going to upgrade to PG 10.6. In case something goes wrong, I want to be able to go back to 9.4.



Things I already tested:




  1. create a backup of the already upgraded PG 10.6 DB (Heroku creates binary compressed dumps)

  2. create a new PG 9.4 DB

  3. upload the backup from step 1. to DB from step 2


The backup seems to be restored properly. What should focus on in particular to be sure this procedure is all right? Are there any other ways to downgrad PostgreSQL?







postgresql postgresql-9.4 upgrade postgresql-10 downgrade






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 14 '18 at 11:46









pmichnapmichna

1305




1305





bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Can’t you create a new db and import the data and keep the old one around to make your first tests before you do the switchover? (I always think this is a great advantage of cloud services to have that kind of short term capacity)

    – eckes
    Dec 19 '18 at 0:43



















  • Can’t you create a new db and import the data and keep the old one around to make your first tests before you do the switchover? (I always think this is a great advantage of cloud services to have that kind of short term capacity)

    – eckes
    Dec 19 '18 at 0:43

















Can’t you create a new db and import the data and keep the old one around to make your first tests before you do the switchover? (I always think this is a great advantage of cloud services to have that kind of short term capacity)

– eckes
Dec 19 '18 at 0:43





Can’t you create a new db and import the data and keep the old one around to make your first tests before you do the switchover? (I always think this is a great advantage of cloud services to have that kind of short term capacity)

– eckes
Dec 19 '18 at 0:43










1 Answer
1






active

oldest

votes


















0














First, keep in mind Heroku may be based on Postgres, it's not Postgres. It's a closed source database and you have no idea what they changed.



The only way to do so would be to export all your data in SQL and to import it back to Postgres (using psql). If you only have access to binary compressed dump from Heroku, you may suppose they're using custom format from pg_dump (I haven't find any documentation about it) and so you'll need pg_restore to either transform it to SQL or to import it to your Postgres database.



Cheers,



Arkhena



PS : I'm curious, why downgrading it to 9.4 instead of importing it to a postgres 10 or 11 database ?






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2fdba.stackexchange.com%2fquestions%2f224991%2fdowngrading-postgresql-10-to-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














    First, keep in mind Heroku may be based on Postgres, it's not Postgres. It's a closed source database and you have no idea what they changed.



    The only way to do so would be to export all your data in SQL and to import it back to Postgres (using psql). If you only have access to binary compressed dump from Heroku, you may suppose they're using custom format from pg_dump (I haven't find any documentation about it) and so you'll need pg_restore to either transform it to SQL or to import it to your Postgres database.



    Cheers,



    Arkhena



    PS : I'm curious, why downgrading it to 9.4 instead of importing it to a postgres 10 or 11 database ?






    share|improve this answer




























      0














      First, keep in mind Heroku may be based on Postgres, it's not Postgres. It's a closed source database and you have no idea what they changed.



      The only way to do so would be to export all your data in SQL and to import it back to Postgres (using psql). If you only have access to binary compressed dump from Heroku, you may suppose they're using custom format from pg_dump (I haven't find any documentation about it) and so you'll need pg_restore to either transform it to SQL or to import it to your Postgres database.



      Cheers,



      Arkhena



      PS : I'm curious, why downgrading it to 9.4 instead of importing it to a postgres 10 or 11 database ?






      share|improve this answer


























        0












        0








        0







        First, keep in mind Heroku may be based on Postgres, it's not Postgres. It's a closed source database and you have no idea what they changed.



        The only way to do so would be to export all your data in SQL and to import it back to Postgres (using psql). If you only have access to binary compressed dump from Heroku, you may suppose they're using custom format from pg_dump (I haven't find any documentation about it) and so you'll need pg_restore to either transform it to SQL or to import it to your Postgres database.



        Cheers,



        Arkhena



        PS : I'm curious, why downgrading it to 9.4 instead of importing it to a postgres 10 or 11 database ?






        share|improve this answer













        First, keep in mind Heroku may be based on Postgres, it's not Postgres. It's a closed source database and you have no idea what they changed.



        The only way to do so would be to export all your data in SQL and to import it back to Postgres (using psql). If you only have access to binary compressed dump from Heroku, you may suppose they're using custom format from pg_dump (I haven't find any documentation about it) and so you'll need pg_restore to either transform it to SQL or to import it to your Postgres database.



        Cheers,



        Arkhena



        PS : I'm curious, why downgrading it to 9.4 instead of importing it to a postgres 10 or 11 database ?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 18 '18 at 9:46









        ArkhenaArkhena

        85918




        85918






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • 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%2fdba.stackexchange.com%2fquestions%2f224991%2fdowngrading-postgresql-10-to-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

            SQL Server 17 - Attemping to backup to remote NAS but Access is denied

            Always On Availability groups resolving state after failover - Remote harden of transaction...

            Restoring from pg_dump with foreign key constraints