Re: Column type modification in big tables

2024-08-13 Thread Peter J. Holzer
On 2024-08-14 01:26:36 +0530, Lok P wrote: > Is there any possible method(maybe by looking into the data dictionary tables/ > views etc) to see the progress of the Alter statement by which we can estimate > the expected completion time of the "Alter" command? I understand > pg_stat_activity doesn't

Re: Column type modification in big tables

2024-08-13 Thread veem v
On Tue, 13 Aug 2024 at 19:39, Greg Sabino Mullane wrote: > On Sat, Aug 10, 2024 at 5:06 PM Lok P wrote: > > >> Can someone through some light , in case we get 5-6hrs downtime for this >> change , then what method should we choose for this Alter operation? >> > > We can't really answer that. Only

Re: Column type modification in big tables

2024-08-13 Thread Lok P
On Tue, Aug 13, 2024 at 7:39 PM Greg Sabino Mullane wrote: > On Sat, Aug 10, 2024 at 5:06 PM Lok P wrote: > > >> Can someone through some light , in case we get 5-6hrs downtime for this >> change , then what method should we choose for this Alter operation? >> > > We can't really answer that. On

Re: autovacuum freeze recommendations at table level

2024-08-13 Thread Durgamahesh Manne
Hi Semab ALTER TABLE table SET ( autovacuum_freeze_max_age = 6000,(6 crores) autovacuum_multixact_freeze_max_age = 6000,(6 crores) autovacuum_freeze_min_age = 0 ); I set this but autovacuum to prevent wraparound runs for every 10 minutes on the table being modified in this case Ho

Re: PG Dump on 11 - Restore on 16 - is possible?

2024-08-13 Thread Ron Johnson
On Tue, Aug 13, 2024 at 2:21 PM Tomas Vondra wrote: > On 8/13/24 11:47, Durumdara wrote: > > Hello! > > > > We have to upgrade our server. The PG upgrade is impossible because of > > too much data. > > I'm not sure I understand. What exactly is the problem with the amount > of data? > OP has a p

Re: PG Dump on 11 - Restore on 16 - is possible?

2024-08-13 Thread Tomas Vondra
On 8/13/24 11:47, Durumdara wrote: > Hello! > > We have to upgrade our server. The PG upgrade is impossible because of > too much data. I'm not sure I understand. What exactly is the problem with the amount of data? How much data are you dealing with, and is the problem in the amount it takes to

RE: Novice with Postgresql - trying simple Stored Procedure

2024-08-13 Thread jim.kosloskey
Ron, Thank you – that got me past that. I thought I had used a variable before with no joy but I probably had other issues. Hopefully, I am on my way now. Thanks again, Jim From: Ron Johnson Sent: Tuesday, August 13, 2024 12:06 PM To: pgsql-generallists.postgresql.org Subjec

Re: Novice with Postgresql - trying simple Stored Procedure

2024-08-13 Thread Ron Johnson
On Tue, Aug 13, 2024 at 11:32 AM wrote: > I have a simple 3 column table. The Table is a Month Name to number table > which also includes an effective date column. So 12 rows, 3 columns each. > > > > Here is the Stored Procedure I constructed to get the number if given the > name (3 parameters fo

Novice with Postgresql - trying simple Stored Procedure

2024-08-13 Thread jim.kosloskey
I have a simple 3 column table. The Table is a Month Name to number table which also includes an effective date column. So 12 rows, 3 columns each. Here is the Stored Procedure I constructed to get the number if given the name (3 parameters for the SP): --/ DROP PROCEDURE month_lookup

Re: Column type modification in big tables

2024-08-13 Thread Greg Sabino Mullane
On Sat, Aug 10, 2024 at 5:06 PM Lok P wrote: > Can someone through some light , in case we get 5-6hrs downtime for this > change , then what method should we choose for this Alter operation? > We can't really answer that. Only you know what resources you have, what risk/reward you are willing t

Re: Insert works but fails for merge

2024-08-13 Thread Greg Sabino Mullane
I just remembered that one of the complaints was not wanting to worry about looking up the data types. In my previous example, you can also leave out the types and Postgres will do the right thing. I prefer the explicit data type version for clarity, but though I would provide this one for complete

Re: PG Dump on 11 - Restore on 16 - is possible?

2024-08-13 Thread Ron Johnson
On Tue, Aug 13, 2024 at 5:47 AM Durumdara wrote: > Hello! > > We have to upgrade our server. The PG upgrade is impossible because of too > much data. > So we will create a new server with PG 16, and we have to migrate the > databases one by one (from a PG 11 server). > I'd also recommend that yo

Re: PG Dump on 11 - Restore on 16 - is possible?

2024-08-13 Thread Ron Johnson
On Tue, Aug 13, 2024 at 5:47 AM Durumdara wrote: > Hello! > > We have to upgrade our server. The PG upgrade is impossible because of too > much data. > So we will create a new server with PG 16, and we have to migrate the > databases one by one (from a PG 11 server). > > Is it possible? > > Does

Re: PG Dump on 11 - Restore on 16 - is possible?

2024-08-13 Thread Kashif Zeeshan
Hi On Tue, Aug 13, 2024 at 2:47 PM Durumdara wrote: > Hello! > > We have to upgrade our server. The PG upgrade is impossible because of too > much data. > So we will create a new server with PG 16, and we have to migrate the > databases one by one (from a PG 11 server). > > Is it possible? > > D