TeamNeed your additional input.VM is based on EC2 OS Version = Amazon Linux 2
Existing DB version = 13.X - Pg Community under EC2 - VM (Same VM)Target DB
version = 15.x - Pg Community under EC2 - VM (Same VM)
i will narrate the latest error
executing: SELECT pg_catalog.set_config('search_path', '', false);Checking for
presence of required libraries fatal
Your installation references loadable libraries that are missing from thenew
installation. You can add these libraries to the new installation,or remove
the functions using them from the old installation. A list ofproblem libraries
is in the file:
/var/lib/pgsql/15/data/pg_upgrade_output.d/20250122T161405.335/loadable_libraries.txt
output of "
/var/lib/pgsql/15/data/pg_upgrade_output.d/20250122T161405.335/loadable_libraries.txt"
is"could not load library "$libdir/dblink": ERROR: could not access file
"$libdir/dblink": No such file or directoryIn database: main"
I cross checked on the existing (old db _version package list along with new
db version package listand found one of the package is
missingpostgresql15-contrib.x86_64
Any guidance how to come the error.
my unix system admin is quoting that he is facing built issue with postgres15
version w.r.to " postgresql15-contrib.x86_64 " under AWS based OS " Amazon
Linux 2 ". His version is "It needs libpython3.6m.so.1.0()(64bit) to install
package: postgresql15-contrib-15.10-1PGDG.rhel7.x86_64. in our environment. I
can't install python3.6 libraries because we already have a different python
version installed and clashing"
Any quidance to overcome the error, as the existing python version being used
by us is clashing with the pre.req version python ver 3.6
My unix admin, too quoted me to have it installed under OS RHEL7 w.r.to
postgresql - EC2 version Best Viable option. I have tried with previous
suggestion steps and found "pg_upgrade" as the most viable and faster
Regards
On Tuesday, December 31, 2024 at 11:15:26 AM EST, Bharani SV-forum
<[email protected]> wrote:
Team
I followed Greg suggested steps .One of big had only one table and around four
million recordsi am doing dev env restoration into new vmthe target VM env is
an POC server and took 3 hrs to restore four million records.Now it is doing
process of lo_open / lo_close / lowrite etci.e
pg-dump-creates-a-lot-of-pg-catalog-statements
is there any alternate way , to speedup this process.
i can see in the select count(*) record count is matching (target and source)
Regards
On Wednesday, December 4, 2024 at 10:47:26 AM EST, Greg Sabino Mullane
<[email protected]> wrote:
On Wed, Dec 4, 2024 at 7:42 AM Bharani SV-forum <[email protected]>
wrote:
a) is the above said steps is correct with the given existing and proposed
setup
No. Here are some steps:
* Install Postgres on the new VMHowever you get it, use the newest version you
can. As of this writing, it is Postgres 17.2. Version 15 is okay, but going to
17 now means a better Postgres today, and no worrying about replacing v15 in
three years.
* Create a new Postgres clusterOn the new VM, use the initdb command to create
a new data directory.Use the --data-checksums option
* Start it upAdjust your postgresql.conf as neededAdjust your pg_hba.conf as
neededInstall any extensions used on the old VMStart the cluster using the
pg_ctl command (or systemctl)
* Test connection to the old vm from the new vmOn the new vm, see if you can
connect to the old one:psql -h oldvm -p 5432 --listYou may need to adjust
firewalls and pg_hba.conf on the old vm.
* Copy the dataRun this on the new VM, adjusting ports as needed:time
pg_dumpall -h oldvm -p 5432 | psql -p 5432
Bonus points for doing this via screen/tmux to prevent interruptions
* Generate new statistics and vacuumOn the new vm, run:psql -c 'vacuum
freeze'psql -c 'analyze'
* Test your application
* Setup all the other stuff (systemd integration, logrotate, cronjobs, etc.) as
needed
As Peter mentioned earlier, this can be done without disrupting anything, and
is easy to test and debug. The exact steps may vary a little, as I'm not
familiar with how Amazon Linux packages Postgres, but the basics are the same.
Take it slow. Go through each of these steps one by one. If you get stuck or
run into an issue, stop and solve it, reaching out to this list as necessary.
Cheers,Greg