From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Loles <lolesft@gmail.com>
Cc: Matthias Apitz <guru@unixarea.de>
Cc: PostgreSQL <pgsql-general@postgresql.org>
Subject: Re: Two started cluster on the same data directory and port
Date: Fri, 1 Dec 2023 08:17:15 -0800
Message-ID: <47915892-87c0-44d8-be07-11548ef915bf@aklaver.com> (raw)
In-Reply-To: <CA+FWGK6ikRGyrNR3YB-nX8vPBwEXYuHsj_=tTC9VDL+gPcLi0g@mail.gmail.com>
References: <cf37b994-64af-4c70-8e30-ef9a0e2229bf@aklaver.com>
<CA+FWGK4ckVnEEDnExYEaiyn2X+Q2YqO8qhUsdwGTX9qCDJV7ZQ@mail.gmail.com>
<CA+FWGK5BCtYdA5X1bZNFixsxqXU9vXVeS1=ue6h1UHoGs-e9-g@mail.gmail.com>
<b9b2c6fe-6ca7-4d70-b3cb-3d343a0f47e1@aklaver.com>
<CA+FWGK4xFPK3HV7p_087oXMH-ewCyTivcXihHEDKTTgt8wQ5VA@mail.gmail.com>
<10c26017-62f2-457e-b71c-c53eada6ae5b@aklaver.com>
<CA+FWGK5t6nE3e1fAWc5j1yXEKkDFhP3ZTNUyHRGbxysDN7k7kA@mail.gmail.com>
<7280c019-2c61-452c-be52-bf38604df356@aklaver.com>
<1b893a10-1dfd-4abf-b066-9b544c2fa985@aklaver.com>
<5c45cffc-b6bf-42ed-a70f-92c9235890db@aklaver.com>
<ZWlke-djucaf6geZ@c720-1400094.fritz.box>
<5ee128af-a936-418d-baf4-f7f06a362f26@aklaver.com>
<CA+FWGK6ikRGyrNR3YB-nX8vPBwEXYuHsj_=tTC9VDL+gPcLi0g@mail.gmail.com>
On 12/1/23 01:17, Loles wrote:
> Yes, it seems to be caused by systemd.
To be more accurate it is caused by the the file postgresql-generator
located here:
/lib/systemd/system-generators/
That file is installed by the Postgres Debian/Ubuntu package, so it is
the Postgres install that is using systemd in this manner.
>
> I'll investigate there. If not, I can upgrade PostgreSQL and get rid of
> server 14.
If your directory structure resembles:
/etc/postgresql/14
├── main
│ ├── conf.d
│ ├── environment
│ ├── pg_ctl.conf
│ ├── pg_hba.conf
│ ├── pg_ident.conf
│ ├── postgresql.conf
│ └── start.conf
└── main_old
├── conf.d
├── environment
├── pg_ctl.conf
├── pg_hba.conf
├── pg_ident.conf
├── postgresql.conf
└── start.conf
Then you just need to:
1) Stop the server
2) mv or rm the main_old/ directory
3) Restart the server
>
> Thank you very much Adrian... I'm going to get a cup of coffee because
> the topic requires it :D
>
>
> El vie, 1 dic 2023 a las 6:19, Adrian Klaver (<adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>>) escribió:
>
> On 11/30/23 20:43, Matthias Apitz wrote:
> > El día jueves, noviembre 30, 2023 a las 02:10:25p. m. -0800,
> Adrian Klaver escribió:
> >
> >> On 11/30/23 12:35, Adrian Klaver wrote:
> >>> On 11/30/23 10:35, Adrian Klaver wrote:
> >>>> On 11/30/23 09:27, Loles wrote:
> >>>>
> >>
> >>> cd /etc/postgresql/14/
> >>> sudo rm -r main_old/
> >>> or
> >>> sudo cp -r main_old <some_new_path>
> >>
> >> Arrgh.
> >>
> >> sudo mv -r main_old <some_new_path>
> >>
> >> Memo to self don't eat lunch and copy/paste at same time.
> >
> > Hmmm
> >
> > purism@pureos:~$ uname -s
> > Linux
> > purism@pureos:~$ mv -r foo bar
> > mv: invalid option -- 'r'
>
> The gift that keeps on giving. Third time's a charm?:
>
> sudo mv main_old/ <some_new_path>
>
> > Try 'mv --help' for more information.
> >
> > matthias
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, lolesft@gmail.com, guru@unixarea.de
Subject: Re: Two started cluster on the same data directory and port
In-Reply-To: <47915892-87c0-44d8-be07-11548ef915bf@aklaver.com>
References: <cf37b994-64af-4c70-8e30-ef9a0e2229bf@aklaver.com> <CA+FWGK4ckVnEEDnExYEaiyn2X+Q2YqO8qhUsdwGTX9qCDJV7ZQ@mail.gmail.com> <CA+FWGK5BCtYdA5X1bZNFixsxqXU9vXVeS1=ue6h1UHoGs-e9-g@mail.gmail.com> <b9b2c6fe-6ca7-4d70-b3cb-3d343a0f47e1@aklaver.com> <CA+FWGK4xFPK3HV7p_087oXMH-ewCyTivcXihHEDKTTgt8wQ5VA@mail.gmail.com> <10c26017-62f2-457e-b71c-c53eada6ae5b@aklaver.com> <CA+FWGK5t6nE3e1fAWc5j1yXEKkDFhP3ZTNUyHRGbxysDN7k7kA@mail.gmail.com> <7280c019-2c61-452c-be52-bf38604df356@aklaver.com> <1b893a10-1dfd-4abf-b066-9b544c2fa985@aklaver.com> <5c45cffc-b6bf-42ed-a70f-92c9235890db@aklaver.com> <ZWlke-djucaf6geZ@c720-1400094.fritz.box> <5ee128af-a936-418d-baf4-f7f06a362f26@aklaver.com> <CA+FWGK6ikRGyrNR3YB-nX8vPBwEXYuHsj_=tTC9VDL+gPcLi0g@mail.gmail.com> <47915892-87c0-44d8-be07-11548ef915bf@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox