Search Postgresql Archives

Re: Windows installation problem at post-install step

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We


On Mon, Jul 22, 2024, 1:51 PM Ertan Küçükoglu <ertan.kucukoglu@xxxxxxxxx> wrote:
Adrian Klaver <adrian.klaver@xxxxxxxxxxx>, 22 Tem 2024 Pzt, 20:37 tarihinde şunu yazdı:
What is the command you use to restore the pg_dumpall file?

within psql I run \i <dump_file_name> 

template1 should not be dropped in the pg_dumpall file.

Is there output that shows that happening?

--
-- Databases
--

--
-- Database "template1" dump
--

--
-- PostgreSQL database dump
--

-- Dumped from database version 16.3
-- Dumped by pg_dump version 16.3

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

UPDATE pg_catalog.pg_database SET datistemplate = false WHERE datname = 'template1';
DROP DATABASE template1;
--
-- Name: template1; Type: DATABASE; Schema: -; Owner: postgres
--

CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'Turkish_Turkey.1254';

Above lines are taken from the dump file itself and it does indeed drop the template1. I think this is because this is a cluster dump.
Later it tries to create a new template1 and that command causes an error because of Windows locale name.


Was template1 dropped in the Windows Postgres instance?

No. It still is there.

BTW dump is taken using the below command line on Windows system.
"C:\Program Files\PostgreSQL\16\bin\pg_dumpall.exe" -U postgres -h 127.0.0.1 -p 5432 -c -f "c:\yedek\cluster.dump.sql"

Thanks & Regards,
Ertan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux