Upgrading

2023-07-30 Thread Amn Ojee Uw

Just a quick question.

On my Debian 12, I installed PostgreSQL-12, I'd like to upgrade to the 
latest release of PostgreSQL. So, my question is, what is the best way 
to upgrade to the next release of PostgreSQL?


Thanks in advance.





Re: Upgrading

2023-07-30 Thread Ron

On 7/30/23 06:53, Amn Ojee Uw wrote:

Just a quick question.

On my Debian 12, I installed PostgreSQL-12, I'd like to upgrade to the 
latest release of PostgreSQL. So, my question is, what is the best way to 
upgrade to the next release of PostgreSQL?


To the latest release of v12 (which is 12.15), or the latest major version 
(v15, at release 15.3)?


"Upgrade" has a specific meaning in PostgreSQL: to migrate from a prior 
*major* (like 12) version to a newer major (like 15) version.


Is that what you mean?

Or did you mean to *update* from an older release of v12 (for example 12.11) 
to the latest release (12.15)?


--
Born in Arizona, moved to Babylonia.

Migrating MySQL DB to PostgreSQL DB.

2023-07-30 Thread Kaushal Shriyan
Hi,

I am running MySQL DB 8.0.34 on Red Hat Enterprise Linux release 8.7
(Ootpa). Is there a way to import MySQL DB along with data to PostgreSQL 14
database server?

Please suggest. Thanks in advance.

Best Regards,

Kaushal


Re: Migrating MySQL DB to PostgreSQL DB.

2023-07-30 Thread Ken Marshall
On Sun, Jul 30, 2023 at 07:31:02PM +0530, Kaushal Shriyan wrote:
> Hi,
> 
> I am running MySQL DB 8.0.34 on Red Hat Enterprise Linux release 8.7
> (Ootpa). Is there a way to import MySQL DB along with data to PostgreSQL 14
> database server?
> 
> Please suggest. Thanks in advance.
> 
> Best Regards,
> 
> Kaushal

Hi Kaushal,

Ora2Pg may work for you:

https://ora2pg.darold.net/

Regards,
Ken




Re: Migrating MySQL DB to PostgreSQL DB.

2023-07-30 Thread Adrian Klaver

On 7/30/23 07:11, Ken Marshall wrote:

On Sun, Jul 30, 2023 at 07:31:02PM +0530, Kaushal Shriyan wrote:

Hi,

I am running MySQL DB 8.0.34 on Red Hat Enterprise Linux release 8.7
(Ootpa). Is there a way to import MySQL DB along with data to PostgreSQL 14
database server?

Please suggest. Thanks in advance.

Best Regards,

Kaushal


Hi Kaushal,

Ora2Pg may work for you:

https://ora2pg.darold.net/


There is also pgloader:

https://pgloader.io/



Regards,
Ken




--
Adrian Klaver
adrian.kla...@aklaver.com





Re: Upgrading

2023-07-30 Thread Peter J. Holzer
On 2023-07-30 07:53:54 -0400, Amn Ojee Uw wrote:
> On my Debian 12, I installed PostgreSQL-12,

Where did you install that from?

AFAICS, Debian 12 comes with PostgreSQL 15.

> I'd like to upgrade to the latest release of PostgreSQL. So, my
> question is, what is the best way to upgrade to the next release of
> PostgreSQL?

If you stay with the same source, Just installing the new version and
then invoking pg_upgrade (or a variant - PGDG, Debian, Ubuntu have
pg_upgradecluster) should do the trick.

If you switch sources, the setup may be sufficiently different that
pg_dump/pg_restore may be the easiest way.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature


Re: Migrating MySQL DB to PostgreSQL DB.

2023-07-30 Thread Kaushal Shriyan
Thanks Ken and Adrian for the quick email response. Really appreciate it.
Thanks once again👍

Best Regards,

Kaushal

On Sun, Jul 30, 2023 at 8:23 PM Adrian Klaver 
wrote:

> On 7/30/23 07:11, Ken Marshall wrote:
> > On Sun, Jul 30, 2023 at 07:31:02PM +0530, Kaushal Shriyan wrote:
> >> Hi,
> >>
> >> I am running MySQL DB 8.0.34 on Red Hat Enterprise Linux release 8.7
> >> (Ootpa). Is there a way to import MySQL DB along with data to
> PostgreSQL 14
> >> database server?
> >>
> >> Please suggest. Thanks in advance.
> >>
> >> Best Regards,
> >>
> >> Kaushal
> >
> > Hi Kaushal,
> >
> > Ora2Pg may work for you:
> >
> > https://ora2pg.darold.net/
>
> There is also pgloader:
>
> https://pgloader.io/
>
> >
> > Regards,
> > Ken
> >
> >
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>
>


Re: Migrating MySQL DB to PostgreSQL DB.

2023-07-30 Thread Ron

On 7/30/23 09:01, Kaushal Shriyan wrote:

Hi,

I am running MySQL DB 8.0.34 on Red Hat Enterprise Linux release 8.7 
(Ootpa). Is there a way to import MySQL DB along with data to PostgreSQL 
14 database server?


Please suggest. Thanks in advance.


Depending on the size of the database, the "exoticness" of the datatypes, 
the amount of downtime available and how complicated any stored procedures 
and triggers are, simple CSV export/import might do the trick.


--
Born in Arizona, moved to Babylonia.




Re: Migrating MySQL DB to PostgreSQL DB.

2023-07-30 Thread Kaushal Shriyan
On Mon, Jul 31, 2023 at 4:15 AM Ron  wrote:

> On 7/30/23 09:01, Kaushal Shriyan wrote:
> > Hi,
> >
> > I am running MySQL DB 8.0.34 on Red Hat Enterprise Linux release 8.7
> > (Ootpa). Is there a way to import MySQL DB along with data to PostgreSQL
> > 14 database server?
> >
> > Please suggest. Thanks in advance.
>
> Depending on the size of the database, the "exoticness" of the datatypes,
> the amount of downtime available and how complicated any stored procedures
> and triggers are, simple CSV export/import might do the trick.
>
> --
> Born in Arizona, moved to Babylonia.
>
>
Thanks Ron for the suggestion. Much appreciated. Are there any PostgreSQL
GUI applications for MacOS, Windows and Linux similar to MySQL Workbench (
https://www.mysql.com/products/workbench/) ?

Please suggest. Thanks in advance.

Best Regards,

Kaushal


Re: Understanding pg_stat_io.evictions

2023-07-30 Thread Kyotaro Horiguchi
At Fri, 28 Jul 2023 10:36:46 +, "Daniel Westermann (DWE)" 
 wrote in 
> postgres=# insert into t select i,  md5(i::text), md5(i::text), md5(i::text) 
> from generate_series(1,100) i;
..
>  client backend |   207 | normal
>  client backend | 0 | vacuum
> 
> Shouldn't these evictions show up under context blkwrite? The description in 
> docs is:

No, that's not the case because INSERT doesn't execute a bulk
write. It is is only performed during COPY FROM, and the write side of
some other comands, such as CREATE AS (and some internal table-copy
operations.).

> As far as I understand this, a ring buffer is used in this case. Do I miss 
> something?

Maybe you're confusiong it with bulk-read cases?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




Re: Upgrading

2023-07-30 Thread Amn Ojee Uw

Thank you Ron and Peter for taking the time to respond to my call for help.

In summery, I'd like to use PostgreSQL-15.

However, since my Debian 12 already has already PostgreSQL-15 installed, 
did I inadvertently overwrote PostgreSQL-15 when I installed 
PostgreSQL-12? If so, how do I remove PostgreSQL-12 and continue on with 
PostgreSQL-15.


Please note that I installed using the following command

/*sudo apt-get -y install postgresql-12*/

Thanks in advance.


On 7/30/23 11:34 a.m., Peter J. Holzer wrote:

On 2023-07-30 07:53:54 -0400, Amn Ojee Uw wrote:

On my Debian 12, I installed PostgreSQL-12,

Where did you install that from?

AFAICS, Debian 12 comes with PostgreSQL 15.


I'd like to upgrade to the latest release of PostgreSQL. So, my
question is, what is the best way to upgrade to the next release of
PostgreSQL?

If you stay with the same source, Just installing the new version and
then invoking pg_upgrade (or a variant - PGDG, Debian, Ubuntu have
pg_upgradecluster) should do the trick.

If you switch sources, the setup may be sufficiently different that
pg_dump/pg_restore may be the easiest way.

 hp


Re: Migrating MySQL DB to PostgreSQL DB.

2023-07-30 Thread Tom Browder
On Sun, Jul 30, 2023 at 19:36 Kaushal Shriyan 
wrote:

Thanks Ron for the suggestion. Much appreciated. Are there any PostgreSQL
> GUI applications for MacOS, Windows and Linux similar to MySQL Workbench (
> https://www.mysql.com/products/workbench/) ?
>

Check out Dbeaver (dbeaver.com).

-Tom


Re: Upgrading

2023-07-30 Thread Adrian Klaver

On 7/30/23 19:22, Amn Ojee Uw wrote:

Thank you Ron and Peter for taking the time to respond to my call for help.

In summery, I'd like to use PostgreSQL-15.

However, since my Debian 12 already has already PostgreSQL-15 installed, 
did I inadvertently overwrote PostgreSQL-15 when I installed 
PostgreSQL-12? If so, how do I remove PostgreSQL-12 and continue on with 
PostgreSQL-15.


Short answer

1) No you just created a new cluster. See result of:

pg_lsclusters

2) This assumes you don't have any valuable data in cluster. To remove 
first confirm cluster name below(main) with above command then:


pg_dropcluster 12 main


Longer answer read:

https://wiki.debian.org/PostgreSql

and for more in depth explanation two blogs I recently posted:

https://aklaver.org/wordpress/2023/06/29/postgres-debian-ubuntu-packagingpart-1/

https://aklaver.org/wordpress/2023/07/01/postgres-debian-ubuntu-packagingpart-2/



Please note that I installed using the following command

/*sudo apt-get -y install postgresql-12*/

Thanks in advance.


On 7/30/23 11:34 a.m., Peter J. Holzer wrote:

On 2023-07-30 07:53:54 -0400, Amn Ojee Uw wrote:

On my Debian 12, I installed PostgreSQL-12,

Where did you install that from?

AFAICS, Debian 12 comes with PostgreSQL 15.


I'd like to upgrade to the latest release of PostgreSQL. So, my
question is, what is the best way to upgrade to the next release of
PostgreSQL?

If you stay with the same source, Just installing the new version and
then invoking pg_upgrade (or a variant - PGDG, Debian, Ubuntu have
pg_upgradecluster) should do the trick.

If you switch sources, the setup may be sufficiently different that
pg_dump/pg_restore may be the easiest way.

 hp



--
Adrian Klaver
adrian.kla...@aklaver.com





AW: AW: Compile static postgres.lib for postgres 15.3 on Windows

2023-07-30 Thread Priess Stefan
Sorry, I meant that I need to change the default port from 5432 to 5433.

nexus / chili

Stefan Priess
Softwareentwicklung

Tel: +49 6221 18079-10
E-Mail: stefan.pri...@nexus-chili.com


NEXUS / CHILI GmbH, Friedrich-Ebert-Str. 2, 69221 Dossenheim/Heidelberg 
www.nexus-chili.com

Eingetragene Gesellschaft beim Registergericht Mannheim, HRB 337363
Geschäftsführer: Dr. Uwe Engelmann, Dr. Heiko Münch

-Ursprüngliche Nachricht-
Von: Adrian Klaver  
Gesendet: Freitag, 28. Juli 2023 16:44
An: Priess Stefan ; Tom Lane 
Cc: pgsql-general@lists.postgresql.org
Betreff: Re: AW: Compile static postgres.lib for postgres 15.3 on Windows

On 7/28/23 07:26, Priess Stefan wrote:
> Thanks Tom!
> 
> I also need to change the default port from 5433 to 5432 
> (--with-pgport=5433). How can I do this using the build.bat toolchain? I 
> don't see the pgport parameter in the config_default.pl file.

1) The default port is 5432.

2) Why do you want to change it?

> 
> Best,
> 
> Stefan
> 
> nexus / chili
> 
> Stefan Priess
> Softwareentwicklung
> 
> Tel: +49 6221 18079-10
> E-Mail: stefan.pri...@nexus-chili.com
> 

-- 
Adrian Klaver
adrian.kla...@aklaver.com