Block some user from connecting into PostgreSQL

Lately I started to see in postgresql log brute force attacks on postgres user: 2019-03-07 08:12:57.064 UTC [24942] postgres@postgres FATAL: password authentication failed for user “postgres” 2019-03-07 08:12:57.064 UTC [24942] postgres@postgres DETAIL:...

Bash script for emergency stop of PostgreSQL

PostgreSQL has one serious weakness – it crashes when some of filesystems it uses if full. Plus PostgreSQL is unable to check if such problem is comming. It simply crashes with error like this: PANIC: could not write to file "pg_xlog/xlogtemp.1752": No...

SQL injection in PostgreSQL

There are already some very good texts about it on web and I do not want to “steal” credit from them: Detecting PostgreSQL SQL injection Postgres SQL injection cheat sheet There are just some of my experiencies: If you can use prepared statements instead...