Обсуждение: Re: Test mail for pgsql-admin
Hello!
This is a test mail for the list
pgsql-admin@lists.postgresql.org
as requested. The mail has the same list-id header
as email delivered to the list, and can be used to
for example test local mail filters.
--
Andrew Wang
Dear staff at pqsql,I try to restore all data from /var/lib/pgsql/15/main, but do not know how and have not found hits from your web as detailed below. Could you provide a tip for that?Thanks. RegardsYour search for restore data from /var/lib/pgsql/ returned no hits.AndrewOn Thu, Jan 11, 2024 at 11:35 AM pgsql-admin Owner <pgsql-admin-owner@lists.postgresql.org> wrote:Hello!
This is a test mail for the list
pgsql-admin@lists.postgresql.org
as requested. The mail has the same list-id header
as email delivered to the list, and can be used to
for example test local mail filters.
--Best,
Andrew Wang
1. What is the source of the data that you copied to /var/lib/pgsql/15/main?2. What errors or problems are you having?On Thu, Jan 11, 2024 at 12:43 PM Andrew Wang <andrew.wang.2009@gmail.com> wrote:Dear staff at pqsql,I try to restore all data from /var/lib/pgsql/15/main, but do not know how and have not found hits from your web as detailed below. Could you provide a tip for that?Thanks. RegardsYour search for restore data from /var/lib/pgsql/ returned no hits.AndrewOn Thu, Jan 11, 2024 at 11:35 AM pgsql-admin Owner <pgsql-admin-owner@lists.postgresql.org> wrote:Hello!
This is a test mail for the list
pgsql-admin@lists.postgresql.org
as requested. The mail has the same list-id header
as email delivered to the list, and can be used to
for example test local mail filters.
--Best,
Andrew Wang
I used “rsync” in Linux to backup the the entire directory that contained data for 12,13 and 15. The last 15 was gone after upgrading to 16 with Ubuntu 22.04. I assumed they can merged into 16 but they were not after upgrading my system.Best,On Jan 11, 2024, at 1:46 PM, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:Did you take basebackup?On Fri, 12 Jan 2024, 00:55 Ron Johnson, <ronljohnsonjr@gmail.com> wrote:1. What is the source of the data that you copied to /var/lib/pgsql/15/main?2. What errors or problems are you having?On Thu, Jan 11, 2024 at 12:43 PM Andrew Wang <andrew.wang.2009@gmail.com> wrote:Dear staff at pqsql,I try to restore all data from /var/lib/pgsql/15/main, but do not know how and have not found hits from your web as detailed below. Could you provide a tip for that?Thanks. RegardsYour search for restore data from /var/lib/pgsql/ returned no hits.AndrewOn Thu, Jan 11, 2024 at 11:35 AM pgsql-admin Owner <pgsql-admin-owner@lists.postgresql.org> wrote:Hello!
This is a test mail for the list
pgsql-admin@lists.postgresql.org
as requested. The mail has the same list-id header
as email delivered to the list, and can be used to
for example test local mail filters.
--Best,
Andrew Wang
You can always dump the contents of a running instance (called cluster) using pg_dumpall creating a text file with SQL commands, which can be fed subsequently into any empty, but running installation of the same or more recent version of the server using psql.
What isn't possible is getting a corrupted copy of the data directory back to life.
Unless you took the copy while the database server was completely down, regard it unusable.
If the copy isn't corrupt, you can start it on the same architecture with the same major version of the software again using pg_ctl. Look at the help of the program for details.
When the database system is running again, take a dump with pg_dumpall.
They were separated. The source list in Ubuntu 18 was moved because the 16 is different from former versions, which caused the problem, as I upgraded the Linux system before, it worked very well.I tried to install the 15 and 16, but the configuration complained ports and other things. Any way to dump all into a format from another computer and then read them into the new 16?Best,On Jan 11, 2024, at 2:28 PM, Ron Johnson <ronljohnsonjr@gmail.com> wrote:"I assumed they can merged into 16 but they were not after upgrading my system."Yeah... that's a pretty unfounded assumption.Fortunately, your data might be salvageable, if the new system has separate -- and populated -- directories for 12, 13 and 14. Were any of the source system Postgresql instances running when you ran rsync?If not, then you can install the old versions of Postgresql in parallel with 16, and then run pg_upgrade.On Thu, Jan 11, 2024 at 3:11 PM Andrew Wang <andrew.wang.2009@gmail.com> wrote:I used “rsync” in Linux to backup the the entire directory that contained data for 12,13 and 15. The last 15 was gone after upgrading to 16 with Ubuntu 22.04. I assumed they can merged into 16 but they were not after upgrading my system.Best,On Jan 11, 2024, at 1:46 PM, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:Did you take basebackup?On Fri, 12 Jan 2024, 00:55 Ron Johnson, <ronljohnsonjr@gmail.com> wrote:1. What is the source of the data that you copied to /var/lib/pgsql/15/main?2. What errors or problems are you having?On Thu, Jan 11, 2024 at 12:43 PM Andrew Wang <andrew.wang.2009@gmail.com> wrote:Dear staff at pqsql,I try to restore all data from /var/lib/pgsql/15/main, but do not know how and have not found hits from your web as detailed below. Could you provide a tip for that?Thanks. RegardsYour search for restore data from /var/lib/pgsql/ returned no hits.AndrewOn Thu, Jan 11, 2024 at 11:35 AM pgsql-admin Owner <pgsql-admin-owner@lists.postgresql.org> wrote:Hello!
This is a test mail for the list
pgsql-admin@lists.postgresql.org
as requested. The mail has the same list-id header
as email delivered to the list, and can be used to
for example test local mail filters.
--Best,
Andrew Wang
-- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Вложения
Unless you read all of the PostgreSQL source code and mimic its behaviour, I regard this impossible. Those files from the DATA directory aren't simple CSV files or similar.
These files were backed up to another Linux system. Is it possible to convert it into a program readable format? I can write a script in most languages to read them.Best,On Jan 11, 2024, at 3:18 PM, Holger Jakobs <holger@jakobs.com> wrote:You can always dump the contents of a running instance (called cluster) using pg_dumpall creating a text file with SQL commands, which can be fed subsequently into any empty, but running installation of the same or more recent version of the server using psql.
What isn't possible is getting a corrupted copy of the data directory back to life.
Unless you took the copy while the database server was completely down, regard it unusable.
If the copy isn't corrupt, you can start it on the same architecture with the same major version of the software again using pg_ctl. Look at the help of the program for details.
When the database system is running again, take a dump with pg_dumpall.
Am 11.01.24 um 22:12 schrieb Andrew Wang:They were separated. The source list in Ubuntu 18 was moved because the 16 is different from former versions, which caused the problem, as I upgraded the Linux system before, it worked very well.I tried to install the 15 and 16, but the configuration complained ports and other things. Any way to dump all into a format from another computer and then read them into the new 16?Best,On Jan 11, 2024, at 2:28 PM, Ron Johnson <ronljohnsonjr@gmail.com> wrote:"I assumed they can merged into 16 but they were not after upgrading my system."Yeah... that's a pretty unfounded assumption.Fortunately, your data might be salvageable, if the new system has separate -- and populated -- directories for 12, 13 and 14. Were any of the source system Postgresql instances running when you ran rsync?If not, then you can install the old versions of Postgresql in parallel with 16, and then run pg_upgrade.On Thu, Jan 11, 2024 at 3:11 PM Andrew Wang <andrew.wang.2009@gmail.com> wrote:I used “rsync” in Linux to backup the the entire directory that contained data for 12,13 and 15. The last 15 was gone after upgrading to 16 with Ubuntu 22.04. I assumed they can merged into 16 but they were not after upgrading my system.Best,On Jan 11, 2024, at 1:46 PM, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:Did you take basebackup?On Fri, 12 Jan 2024, 00:55 Ron Johnson, <ronljohnsonjr@gmail.com> wrote:1. What is the source of the data that you copied to /var/lib/pgsql/15/main?2. What errors or problems are you having?On Thu, Jan 11, 2024 at 12:43 PM Andrew Wang <andrew.wang.2009@gmail.com> wrote:Dear staff at pqsql,I try to restore all data from /var/lib/pgsql/15/main, but do not know how and have not found hits from your web as detailed below. Could you provide a tip for that?Thanks. RegardsYour search for restore data from /var/lib/pgsql/ returned no hits.AndrewOn Thu, Jan 11, 2024 at 11:35 AM pgsql-admin Owner <pgsql-admin-owner@lists.postgresql.org> wrote:Hello!
This is a test mail for the list
pgsql-admin@lists.postgresql.org
as requested. The mail has the same list-id header
as email delivered to the list, and can be used to
for example test local mail filters.
--Best,
Andrew Wang-- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
-- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Вложения
I tried to install the 15 and 16, but the configuration complained ports and other things.
14 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
15 main 5434 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log
16 main 5433 online postgres /var/lib/postgresql/16/main /var/log/postgresql/postgresql-16-main.log
Please shutdown that postmaster and try again.
Failure, exiting
On Thu, Jan 11, 2024 at 4:12 PM Andrew Wang <andrew.wang.2009@gmail.com> wrote:I tried to install the 15 and 16, but the configuration complained ports and other things.All of which are issues that simple Postgresql configuration changes can solve.
--
Andrew Wang
> On Jan 11, 2024, at 8:29 PM, Andrew Wang <andrew.wang.2009@gmail.com> wrote: > > Thanks, now 3 versions, 14, 15, and 16 are running as shown below. I did pg_upgrade as detailed below, but it asked meto shutdown postmaster, should which postmaster be down and how? Both old and new, pg_upgrade will start the ones it needs when it needs them. Strongly suggest you review the documentation,where this is clearly stated: https://www.postgresql.org/docs/current/pgupgrade.html