2020-01-12 21:28:28 -05:00
|
|
|
setup for single sign on with [SSPI](https://wiki.postgresql.org/wiki/Configuring_for_single_sign-on_using_SSPI_on_Windows)
|
|
|
|
|
|
|
|
md5 hash is salted with username in front
|
|
|
|
|
|
|
|
|
|
|
|
Memory
|
|
|
|
=========================================================
|
|
|
|
see whats in the buffer cache with pg_buffercache
|
|
|
|
|
|
|
|
`CREATE EXTENSION pg_buffercache`
|
|
|
|
|
|
|
|
```
|
|
|
|
SELECT
|
|
|
|
c.relname,
|
|
|
|
COUNT(*) AS buffers
|
|
|
|
FROM
|
|
|
|
pg_class c
|
|
|
|
INNER JOIN pg_buffercache b ON
|
|
|
|
b.relfilenode = c.relfilenode
|
|
|
|
INNER JOIN pg_database d ON
|
|
|
|
( b.reldatabase = d.oid
|
|
|
|
AND d.datname = CURRENT_DATABASE())
|
|
|
|
GROUP BY
|
|
|
|
c.relname
|
|
|
|
ORDER BY
|
|
|
|
2 DESC
|
|
|
|
LIMIT 100;
|
|
|
|
```
|
|
|
|
|
2021-01-11 23:31:52 -05:00
|
|
|
Alter Column
|
|
|
|
==========================================================
|
|
|
|
ALTER TABLE rlarp.pcore ALTER COLUMN pack SET DATA TYPE numeric USING pack::numeric
|
2021-11-17 23:09:29 -05:00
|
|
|
|
|
|
|
psql binary for latest version is always used but pg_dump is not, you have to set the default version in ~/.postgresqlrc
|