Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vL1dE-000vCc-2m for pgsql-general@arkaria.postgresql.org; Mon, 17 Nov 2025 15:59:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vL1dD-000rTf-1R for pgsql-general@arkaria.postgresql.org; Mon, 17 Nov 2025 15:59:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vL1dC-000rTV-34 for pgsql-general@lists.postgresql.org; Mon, 17 Nov 2025 15:59:07 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vL1dA-0000zS-1c for pgsql-general@postgresql.org; Mon, 17 Nov 2025 15:59:06 +0000 Received: by mail-ej1-x642.google.com with SMTP id a640c23a62f3a-b7291af7190so639438566b.3 for ; Mon, 17 Nov 2025 07:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1763395142; x=1763999942; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=wZ0EyGLD/ksrr8VtaAccUVgZ+w8QwtHQ8gmku2MQMy8=; b=PTYxBb/8ygOa3mbCBwVk4sDWNYI5LcAuOw2vhLuOutUrxP60uCgRG+tjCUCWO0x2T2 O6MbKzqS9FAnI1PfPDykE834vIsw5NNeOyiCJM7he3JjwWyj55P760I7vToehChxBbJR GRVXnMkb8Ih0akg9cu4/F9nneCB+VKtdPeXWGSZSnJefS7XXQg81Gv3ro17QujX/Hs+w RUAfRu/L94WRSrXVr6vzS6g3+nxsSB+yGvNhNK9kTdh7jYtf6GoGhUh3ioq9YjtWsGY5 sofMekTh9HvK8dFL/QS7f6bX3/IowebzBT4YgTCM4cpajBQ8/stqz7xG5M6pZIMLWwZv Ot7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763395142; x=1763999942; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wZ0EyGLD/ksrr8VtaAccUVgZ+w8QwtHQ8gmku2MQMy8=; b=YDQtxST+Wk3NhwTg3Pt1/Ny1Y/dfUNzRLNQrB2fhyA6MMyy8aPgwncf1lTLPMsnvHo ylmVlwBzUNj75YuIC3yyAnPTgHRaoL/1qPIrc9Ahcai0Lv41vX0bTnxL4Xru2odiBNSS v0KK06rKF5mfAAwQWfGRLdTDOR+/LZJ7r7Xz0FJbksh2vUoOXUMVZYmD90CBP7MJ0h4t EEfm+mKlsYZ6P37uwZPIm46eDnTnq8GAL5ZyIfvmR9zBdTHkq4aOl2YeyBZQIpHBct8R O4g9P5rurw/GZXjGD7ncCkoSAHWqNlN/tlAhYRlT7qZ2FyCSuXOD80UYO4Z/95zyMhm8 dKuQ== X-Forwarded-Encrypted: i=1; AJvYcCV6+zR6VnuRznldVxExicxxZjoQIkz7vPIkgWZQH2AQdEeg40fclx7KW0HoXAuk4f90oFKz9IpJEN3LfA5C@postgresql.org X-Gm-Message-State: AOJu0YwggW5sZslHEzwoIoo4yZqhchy36+G9tCcVNE17C3kgtCJP3JBZ 4Ph2q/+w8OIdeacDx2ffgJs0CdRnxZt+NsoKbtrBwY94VCh7MkS3zSh1hsIIGNd4IaTt2Yyl1L6 ovHH858uKJbX6 X-Gm-Gg: ASbGncszTf2pvupTz94xzL4GOP5G2y7NSADbHWb1E9of+YOrEO7GCz4xgsUB1C5ovwM Nh2JT4/KQxMV4v81DwbXXXVSxLumes/+bA0xbC+fp4cfcyFAQnXjq4+VsQKhSEjoBQusKpqATxL MfZPXDMEJEkepWoYHoxJnnDmcWbA1xvGwWLIJIHWh2niYGP751Jssitlq+7TpdjlnWkkZSAzfmX xEXkEyH3hb9iBYqx+LH2phANsNefADHsG6Mm7aNQieLLxsdx81m0p+QH+T4JRXHNgBFLXA8BPLM wZg/4dvdxPAsub/cbkxpYNOncgeBVfO9iYs29qGxHHxDfVdw7yuLWBvfh8kMSrp07LGj4ggwlUG NG7LqFRJtkBOX/Bc2HwDtZJ2ZlWBSMgQoovsTWw/uVtsIyinVKtOBxfTuZ58MIIH5ndRBzOjiJz n0UxgvAC8jh755Ttyqv/8CwzxLn6vifDAmnj39LBAIlaFjBtuRVuM= X-Google-Smtp-Source: AGHT+IFukUDKeHyn4BOrf9QKEoeB8YzbSuZx5yRxh+dBLrwZDH05xdrOmE1L7pNSEVUYwrG1GyqqOw== X-Received: by 2002:a17:906:f589:b0:b72:70ad:b8f0 with SMTP id a640c23a62f3a-b73678f4b98mr1364550866b.36.1763395142431; Mon, 17 Nov 2025 07:59:02 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([213.83.186.126]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b734fda8bc8sm1116351266b.49.2025.11.17.07.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Nov 2025 07:59:02 -0800 (PST) Message-ID: <16611bea8a93082783eff714b9eb43e34d1ea68f.camel@cybertec.at> Subject: Re: Redo CREATE DATABASE From: Laurenz Albe To: COURTAULT Francois , "pgsql-general@postgresql.org" Date: Mon, 17 Nov 2025 16:59:01 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2025-11-17 at 09:59 +0000, COURTAULT Francois wrote: > I am looking to an old document where we (I was not there at that time) s= etup a database. > Unfortunately, I was not able to find the CREATE DATABASE instruction use= d. It is not in any of our docs=E2=98=B9 > At https://www.postgresql.org/docs/17/sql-createdatabase.html we can see = that a lot of options are available. > =C2=A0 > Do you know=C2=A0 if it is possible to retrieve the options we have set w= hen we created the database ? What I recommend is a schema-only dump with the --create option: pg_dump --schema-only --create dbname You will find CREATE DATABASE and perhaps ALTER DATABASE statements near th= e top that you can use to create a copy of the database. There will also be GRANT stateme= nts for the database. Yours, Laurenz Albe