Re: Automatic upgrade of passwords from md5 to scram-sha256

2025-01-12 Thread Peter J. Holzer
On 2025-01-12 17:59:20 -0500, Tom Lane wrote: > "Peter J. Holzer" writes: > > The web framework Django will automatically and transparently rehash any > > password with the currently preferred algorithm if it isn't stored that > > way already. > > Really? That implies that the framework has acce

Re: Automatic upgrade of passwords from md5 to scram-sha256

2025-01-12 Thread Isaac Morland
On Sun, 12 Jan 2025 at 17:59, Tom Lane wrote: > "Peter J. Holzer" writes: > > The web framework Django will automatically and transparently rehash any > > password with the currently preferred algorithm if it isn't stored that > > way already. > > Really? That implies that the framework has acc

Re: Automatic upgrade of passwords from md5 to scram-sha256

2025-01-12 Thread Bruce Momjian
On Sun, Jan 12, 2025 at 05:59:20PM -0500, Tom Lane wrote: > > If the password for the user is stored as an MD5 hash, the server > > replies to the startup message with an AuthenticationCleartextPassword > > respnse to force the client to send the password in the clear > > (obviously you only want t

Re: Automatic upgrade of passwords from md5 to scram-sha256

2025-01-12 Thread Tom Lane
"Peter J. Holzer" writes: > The web framework Django will automatically and transparently rehash any > password with the currently preferred algorithm if it isn't stored that > way already. Really? That implies that the framework has access to the original cleartext password, which is a security

Automatic upgrade of passwords from md5 to scram-sha256

2025-01-12 Thread Peter J. Holzer
I have a PostgreSQL instance where the majority of the passwords is still stored as MD5 hashes. I'm not particularly worried because they are all randomly generated and should be reasonably secure against brute force attacks even with a weak hash, and they're not that valuable anyway, but it would

Re: Alter table fast

2025-01-12 Thread Marco Torres
This is the right approach, Peter J. Holzer, from a well season DBA perspective "ALTER TABLE working_table ADD COLUMN B INTEGER ; UPDATE working_table SET B = A;" Bare in mind the indexes or existing references to an from other tables and act accordingly-- define the new and drop the old. Good lu

Re: Alter table fast

2025-01-12 Thread Peter J. Holzer
On 2025-01-09 20:52:27 +0100, sham...@gmx.net wrote: > Am 09.01.25 um 20:17 schrieb veem v: > > > Out of curiosity, why NUMERIC(15,0) instead of BIGINT? > > > > It's for aligning the database column types to the data model and > > it's happening across all the upstream downstream systems. I was >