This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION array_remove (anyarray, anyarray) RETURNS anyarray | |
AS $$ | |
SELECT array( | |
SELECT e | |
FROM unnest($1) AS s(e) | |
WHERE NOT e = ANY($2) | |
); | |
$$ | |
LANGUAGE sql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabrizio=# \db+ | |
List of tablespaces | |
Name | Owner | Location | Access privileges | Options | Size | Description | |
------------+----------+----------+-------------------+---------+--------+------------- | |
pg_default | fabrizio | | | | 27 MB | | |
pg_global | fabrizio | | | | 496 kB | | |
(2 rows) | |
fabrizio=# create tablespace tb1 location '/tmp/tablespace'; | |
CREATE TABLESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# O pgbadger no modo incremental gera um indice (arquivos .bin) | |
# para fazer o parser do log, e não possui um mecanismo interno | |
# de limpeza de arquivos que não estão mais em uso. | |
# | |
# Este script efetua a limpeza dos .bin obsoletos, ou seja, | |
# aqueles que são de dias anteriores aos correspondentes a | |
# semana corrente. |
NewerOlder