Re: Stack Smashing Detected When Executing initdb

2024-06-23 Thread Kashif Zeeshan
Thats great, it also gave us a learning opportunity as well. On Mon, Jun 24, 2024 at 10:18 AM Xu Haorong wrote: > Hi Lane, > > Thank you for your advice. The problem did disappear after running git > clean, and I'm sorry for not providing enough context at first. > > Regards, > Haorong Xu >

Re: Stack Smashing Detected When Executing initdb

2024-06-23 Thread Xu Haorong
Hi Lane, Thank you for your advice. The problem did disappear after running git clean, and I'm sorry for not providing enough context at first. Regards, Haorong Xu

Re: How to use createdb command with newly created user?

2024-06-23 Thread Adrian Klaver
On 6/23/24 20:36, 毛毛 wrote: Thank you for your advice. .pgpass file would help a lot. I recently started to writing SQL on PostgreSQL. I think I should use capitial letters as sparingly as possible for identifiers. Take a look at: https://www.postgresql.org/docs/current/sql-syntax-lexic

Re: Re: Re: How to use createdb command with newly created user?

2024-06-23 Thread Muhammad Ikram
Hi Krave, It does not matter whether you use capital letters, mixed case or lower case. Things only matter when you use double quotes. E.g. "Baba" and "BABA" are different but Baba and BABA or baba are all the same. Double quotes make the things case sensitive. Double quoting lower case won't caus

Re:Re: Re: How to use createdb command with newly created user?

2024-06-23 Thread 毛毛
Thank you for your advice. .pgpass file would help a lot. I recently started to writing SQL on PostgreSQL. I think I should use capitial letters as sparingly as possible for identifiers. At 2024-06-24 03:38:21, "Ron Johnson" wrote: Better to run now, and save yourself hassle in

Re: Re: How to use createdb command with newly created user?

2024-06-23 Thread Ron Johnson
Better to run now, and save yourself hassle in the future: ALTER ROLE "Baba" RENAME TO baba; Also, use a .pgpass file: https://www.postgresql.org/docs/14/libpq-pgpass.html On Sun, Jun 23, 2024 at 3:22 PM 毛毛 wrote: > > > Thank you! You are right! > > After putting quotes around the username, it

Re:Re: How to use createdb command with newly created user?

2024-06-23 Thread 毛毛
Thank you! You are right! After putting quotes around the username, it works! 在 2024-06-24 02:47:44,"David G. Johnston" 写道: On Sun, Jun 23, 2024, 11:43 毛毛 wrote: Hi, I tried to create a user with CREATEDB permission. Then I wanted to run command line tool `createdb` with th

Re: How to use createdb command with newly created user?

2024-06-23 Thread Tom Lane
"David G. Johnston" writes: > On Sun, Jun 23, 2024, 11:43 毛毛 wrote: >> Then I run the following command on PowerShell on Windows 10: >> createdb -U Baba -W test_db >> But no mater how I tried, the password always failed. > You named the user "baba" all lower-case but your createdb command uses >

Re: How to use createdb command with newly created user?

2024-06-23 Thread David G. Johnston
On Sun, Jun 23, 2024, 11:43 毛毛 wrote: > Hi, > > I tried to create a user with CREATEDB permission. > Then I wanted to run command line tool `createdb` with this newly created > user. > > So I ran SQL first to create a user: > > ``` > CREATE USER Baba WITH PASSWORD 'xxx' CREATEDB; > ``` > > Then I

How to use createdb command with newly created user?

2024-06-23 Thread 毛毛
Hi, I tried to create a user with CREATEDB permission. Then I wanted to run command line tool `createdb` with this newly created user. So I ran SQL first to create a user: ``` CREATE USER Baba WITH PASSWORD 'xxx' CREATEDB; ``` Then I run the following command on PowerShell on Windows 10:

Re: Stack Smashing Detected When Executing initdb

2024-06-23 Thread Tom Lane
I wrote: > Xu Haorong writes: >> performing post-bootstrap initialization ... *** stack smashing detected >> ***: terminated >> Aborted (core dumped) >> child process exited with exit code 134 > No such problem is visible in our build farm [1], so what we have to > figure out is how your machine

Re: Stack Smashing Detected When Executing initdb

2024-06-23 Thread Tom Lane
Xu Haorong writes: > Today I tried to build the latest devel version of PostgreSQL(commit > 70a845c04a47645b58f8276a6b3ab201ea8ec426). The compilation was successful, > but when I ran initdb an error occured: > performing post-bootstrap initialization ... *** stack smashing detected ***: > ter

Re: Password complexity/history - credcheck?

2024-06-23 Thread Greg Sabino Mullane
On Sun, Jun 23, 2024 at 5:30 AM Martin Goodson wrote: > I believe that our security team is getting most of this from our > auditors, who seem convinced that minimal complexity, password history > etc are the way to go despite the fact that, as you say, server-side > password checks can't really

回复: Stack Smashing Detected When Executing initdb

2024-06-23 Thread Xu Haorong
Hi Zeeshan, Thank you for replying me. I'm aware that core dump files are not generated by default, so I did change my settings to allow them to be generated. But initdb still doesn't generate any core dump file, that's what makes this issue especially unusual. Regards, Haorong Xu

Re: Stack Smashing Detected When Executing initdb

2024-06-23 Thread Kashif Zeeshan
Hi Xu You need to enable some settings for the code dump to generated. For the settings you can use following link. https://access.redhat.com/solutions/4896 Regards Kashif Zeeshan On Sun, Jun 23, 2024 at 7:07 PM Xu Haorong wrote: > Hi Zeeshan, > > Thank you for helping me. I tried to analyze

Re: Password complexity/history - credcheck?

2024-06-23 Thread Martin Goodson
On 23/06/2024 11:49, Christoph Moench-Tegeder wrote: My advice would be to not use secrets stored in the database - that is, do not use scram-sha-256 - but use an external authentication system, like Kerberos (might be AD) or LDAP (might also be AD) and have that managed by the security team: th

Re: Password complexity/history - credcheck?

2024-06-23 Thread Christoph Moench-Tegeder
## Martin Goodson (kaema...@googlemail.com): > I believe that our security team is getting most of this from our > auditors, who seem convinced that minimal complexity, password history > etc are the way to go despite the fact that, as you say, server-side > password checks can't really be impleme

Re: Password complexity/history - credcheck?

2024-06-23 Thread Martin Goodson
On 23/06/2024 01:23, Tom Lane wrote: Don't suppose it would help to push back on whether your security team knows what they're doing. ... Anyway, considerations like these are why there's not features of this sort in community PG. You can use an extension that applies some checks, but there's n

Re: Stack Smashing Detected When Executing initdb

2024-06-23 Thread Kashif Zeeshan
Hi Xu To pinpoint the issue, please use gdb debugger to get the backtrace to exactly find out where the error is occurring and you can then do the required setups. For Reference : https://stackoverflow.com/questions/50093327/how-do-i-solve-postgresql-aborted-core-dumped-error Thanks Kashif Zee

Re: pg_dump restores as expected on some machines and reports duplicate keys on others

2024-06-23 Thread Shaheed Haque
First, thanks for all the kind replies. To my eternal shame, after spending hours trying to debug this, I found, buried deep in one of my own initialisation scripts, the creation of a handful of "seed" database objects which, of course, caused all my woes. Thanks again, Shaheed

Re: Upgrade PG from 12 to latest

2024-06-23 Thread Muhammad Ikram
Hi Doron Tsur, Could you please look into https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html https://aws.amazon.com/blogs/database/best-practices-for-upgrading-amazon-rds-to-major-and-minor-versions-of-postgresql/ Best of luck :) Regards, Muhammad Ik

Stack Smashing Detected When Executing initdb

2024-06-23 Thread Xu Haorong
Hi everyone, Today I tried to build the latest devel version of PostgreSQL(commit 70a845c04a47645b58f8276a6b3ab201ea8ec426). The compilation was successful, but when I ran initdb an error occured: /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data The files belonging to this database system w

Upgrade PG from 12 to latest

2024-06-23 Thread Doron Tsur
Hello Folks, We are running PG 12 on AWS RDS. I want to run an upgrade process for the DB. The org I work for attempted to upgrade before but failed (12->15). The upgrade resulted in unexplained slowness, and performance issues were only resolved via a downgrade. Do you have any upgrade docs or re