RE: Purging few months old data and vacuuming in production

2023-01-06 Thread Ranjith Paliyath
Thank you very much again. > So, with this approach, is the advantage like, manual vacuuming worry may be set aside, because auto-vacuuming would deal with the dead rows? > Theoretically, manual vacuuming is never necessary.  I'd occasionally do manual vacuums (after

Re: Updating column default values in code

2023-01-06 Thread Tom Lane
Brad White writes: > On Wednesday, December 28, 2022, Brad White wrote: >> On timestamp fields, I need to update the column default from the current >> "Now()" to "LOCALTIMESTAMP(0)" > I'm still suffering here. I don't understand why a script to generate ALTER VIEW v ALTER COLUMN c SET

Re: Updating column default values in code

2023-01-06 Thread Brad White
On 1/6/2023 7:44 PM, Ken Tanzer wrote: On Fri, Jan 6, 2023 at 3:32 PM Brad White wrote: I can generate ALTER statements, per David's sensible suggestion, but they fail because you have to drop all the views. Altering the defaults seems safe because the default value

Re: Regd. the Implementation of Wallet (in Oracle) config equivalent in postgreSQL whilst the database migration

2023-01-06 Thread Bruce Momjian
On Thu, Dec 22, 2022 at 11:15:57AM +0100, Rainer Duffner wrote: > I wasn’t involved in setting it up here, but AFAIK you need to „enroll“ the > client to the HSM. > > That is a one-time process that requires HSM credentials (via certificates and > pass-phrases). > > Then, that client can talk to

Re: Updating column default values in code

2023-01-06 Thread Ken Tanzer
On Fri, Jan 6, 2023 at 3:32 PM Brad White wrote: > I can generate ALTER statements, per David's sensible suggestion, but they > fail because you have to drop all the views. > > Altering the defaults seems safe because the default value > shouldn't affect the view at all. > Are you sure those

Re: Updating column default values in code

2023-01-06 Thread Brad White
On Wednesday, December 28, 2022, Brad White wrote: > On timestamp fields, I need to update the column default from the current > "Now()" to "LOCALTIMESTAMP(0)" > > I could just manually make the change on every table, but they want the > existing backups to still work. So I need something that I

Re: Purging few months old data and vacuuming in production

2023-01-06 Thread Ron
On 1/6/23 08:27, Ranjith Paliyath wrote: Thank you very much for the response. > Can you do online purging? > For example, get a list of the main table's primary keys to be deleted, and > then nibble away at them all day: in one transaction delete all the records > for

Re: Purging few months old data and vacuuming in production

2023-01-06 Thread Ranjith Paliyath
Thank you very much for the response. > Can you do online purging? > For example, get a list of the main table's primary keys to be deleted, and > then nibble away at them all day: in one transaction delete all the records > for one logically related set of records.  Do that N

Re: Purging few months old data and vacuuming in production

2023-01-06 Thread Ron
On 1/6/23 02:44, Ranjith Paliyath wrote: Thank you for the details, experience shared and the suggestions. Apologies for the delay in collecting the response for the queries. (1)Are the tables tied together by FK? - Overall there are 9 tables (sorry not 6 as mentioned originally) that are

Re: best practice to patch a postgresql version?

2023-01-06 Thread Ron
On 1/5/23 23:43, Laurenz Albe wrote: On Tue, 2022-12-27 at 00:48 -0600, Ron wrote: If it really is a critical production database, you will have a CAT/UAT (customer/user acceptance testing) server on which you rigorously run regression tests on a point release for a month before updating the

Re: Purging few months old data and vacuuming in production

2023-01-06 Thread Ranjith Paliyath
Thank you for the details, experience shared and the suggestions. Apologies for the delay in collecting the response for the queries. (1)Are the tables tied together by FK? - Overall there are 9 tables (sorry not 6 as mentioned originally) that are being purged. Only 4 tables would be having