What is purpose of `ALLOW_CONNECTIONS` being set so no one can connect to the new Postgres database?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












In Postgres 11, the CREATE DATABASE command that makes a new catalog has an option ALLOW_CONNECTIONS. The documentation says this option can be used to block all connections to the database:




[ ALLOW_CONNECTIONS [=] allowconn ]



allowconn



If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT/REVOKE CONNECT).




➥ Why would anyone want to create a database that nobody can connect to?



➥ If you cannot connect, how can you ever change this setting to true to allow connections?










share|improve this question



























    up vote
    1
    down vote

    favorite












    In Postgres 11, the CREATE DATABASE command that makes a new catalog has an option ALLOW_CONNECTIONS. The documentation says this option can be used to block all connections to the database:




    [ ALLOW_CONNECTIONS [=] allowconn ]



    allowconn



    If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT/REVOKE CONNECT).




    ➥ Why would anyone want to create a database that nobody can connect to?



    ➥ If you cannot connect, how can you ever change this setting to true to allow connections?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      In Postgres 11, the CREATE DATABASE command that makes a new catalog has an option ALLOW_CONNECTIONS. The documentation says this option can be used to block all connections to the database:




      [ ALLOW_CONNECTIONS [=] allowconn ]



      allowconn



      If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT/REVOKE CONNECT).




      ➥ Why would anyone want to create a database that nobody can connect to?



      ➥ If you cannot connect, how can you ever change this setting to true to allow connections?










      share|improve this question













      In Postgres 11, the CREATE DATABASE command that makes a new catalog has an option ALLOW_CONNECTIONS. The documentation says this option can be used to block all connections to the database:




      [ ALLOW_CONNECTIONS [=] allowconn ]



      allowconn



      If false then no one can connect to this database. The default is true, allowing connections (except as restricted by other mechanisms, such as GRANT/REVOKE CONNECT).




      ➥ Why would anyone want to create a database that nobody can connect to?



      ➥ If you cannot connect, how can you ever change this setting to true to allow connections?







      postgresql configuration connections






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      Basil Bourque

      2,87522036




      2,87522036




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          It gives you a chance to revoke connect from unwanted users before doing alter database ... allow connections






          share|improve this answer
















          • 1




            You might want to add to your answer that a superuser can always connect.
            – Colin 't Hart
            1 hour ago










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f221172%2fwhat-is-purpose-of-allow-connections-being-set-so-no-one-can-connect-to-the-ne%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          It gives you a chance to revoke connect from unwanted users before doing alter database ... allow connections






          share|improve this answer
















          • 1




            You might want to add to your answer that a superuser can always connect.
            – Colin 't Hart
            1 hour ago














          up vote
          2
          down vote













          It gives you a chance to revoke connect from unwanted users before doing alter database ... allow connections






          share|improve this answer
















          • 1




            You might want to add to your answer that a superuser can always connect.
            – Colin 't Hart
            1 hour ago












          up vote
          2
          down vote










          up vote
          2
          down vote









          It gives you a chance to revoke connect from unwanted users before doing alter database ... allow connections






          share|improve this answer












          It gives you a chance to revoke connect from unwanted users before doing alter database ... allow connections







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 1 hour ago









          Jasen

          964310




          964310







          • 1




            You might want to add to your answer that a superuser can always connect.
            – Colin 't Hart
            1 hour ago












          • 1




            You might want to add to your answer that a superuser can always connect.
            – Colin 't Hart
            1 hour ago







          1




          1




          You might want to add to your answer that a superuser can always connect.
          – Colin 't Hart
          1 hour ago




          You might want to add to your answer that a superuser can always connect.
          – Colin 't Hart
          1 hour ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f221172%2fwhat-is-purpose-of-allow-connections-being-set-so-no-one-can-connect-to-the-ne%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          Confectionery