Skip to content

Instantly share code, notes, and snippets.

View 3manuek's full-sized avatar
🤖
tr3s.ma

Emanuel Calvo 3manuek

🤖
tr3s.ma
View GitHub Profile
@3manuek
3manuek / gist:9765751
Last active August 29, 2015 13:57
deparse_util debug and analysis
-- COMMANDS
CREATE VIEW barf (a) AS SELECT * from foo;
CREATE RECURSIVE VIEW barf_recursive (a) AS SELECT a from foo;
CREATE VIEW rebarf_baz (d) AS (SELECT d from baz) WITH CASCADED CHECK OPTION;
CREATE VIEW rebarf_sb (d) WITH (security_barrier=0) AS SELECT d from baz;
CREATE VIEW rebarf (a) WITH (security_barrier) AS SELECT a from foo ;
CREATE VIEW rebarf_2 (a) AS SELECT a from foo WITH LOCAL CHECK OPTION;
CREATE VIEW barf_check AS SELECT * FROM nyan WITH CHECK OPTION;
LOG: server process (PID 19793) was terminated by signal 9: Killed
DETAIL: Failed process was running: CREATE INDEX i_l_orderkey_quantity ON lineitem (l_orderkey, l_quantity);
LOG: terminating any other active server processes
connection to server was lost
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
@3manuek
3manuek / gist:10608417
Last active August 29, 2015 13:59
Errors from TPCh test
server signaled
LOG: received SIGHUP, reloading configuration files
LOG: parameter "checkpoint_segments" changed to "300"
LOG: parameter "checkpoint_timeout" changed to "3600s"
LOG: parameter "checkpoint_completion_target" changed to "0.9"
LOG: parameter "shared_buffers" cannot be changed without restarting the server
LOG: parameter "maintenance_work_mem" changed to "1GB"
LOG: configuration file "/AXLE/postgres/pgdata1GB/postgresql.conf" contains errors; unaffected changes were applied
TRUNCATE TABLE
TRUNCATE TABLE
make[3]: Entering directory `/root/event_trigger/2ndquadrant_bdr/src/backend/catalog'
cd ../../../src/include/catalog && '/usr/bin/perl' ./duplicate_oids
3567
3568
make[3]: *** [postgres.bki] Error 1
make[3]: Leaving directory `/root/event_trigger/2ndquadrant_bdr/src/backend/catalog'
make[2]: *** [submake-schemapg] Error 2
make[2]: Leaving directory `/root/event_trigger/2ndquadrant_bdr/src/backend'
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory `/root/event_trigger/2ndquadrant_bdr/src'
root@precise64:~/event_trigger/2ndquadrant_bdr/src/test/regress# git diff serial_schedule
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 16a1905..ad99e1b 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -1,5 +1,6 @@
# src/test/regress/serial_schedule
# This should probably be in an order similar to parallel_schedule.
+test: deparse_util
test: tablespace
insert OID = 3564 ( pg_event_trigger_get_creation_commands 11 10 12 10 100 0 0 f f f f t t s 0 0 2249 "" "{26,26,23,25,25,25,25,16,114}" "{o,o,o,o,o,o,o,o,o}" "{classid,objid,objsubid,command_tag,object_type,schema,identity,in_extension,command}" _null_ pg_event_trigger_get_creation_commands _null_ _null_ _null_ )
@3manuek
3manuek / gist:148dfb59a2043176439b
Created August 19, 2014 19:21
issue on initdb
sekondquad@axle:~/minmax15$ bin/initdb -D /data/sekondquad/AXLE/sekondquad/minmax15/
The files belonging to this database system will be owned by user "sekondquad".
This user must also own the server process.
initdb: invalid locale settings; check LANG and LC_* environment variables
sekondquad@axle:~/minmax15$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@3manuek
3manuek / gist:32e4fc62c6ebad998b8f
Last active November 17, 2015 04:26
Installing PLR
70 wget https://ftp.postgresql.org/pub/source/v9.4.5/postgresql-9.4.5.tar.gz
71 tar xzf postgresql-9.4.5.tar.gz
73 cd postgresql-9.4.5/
75 ./configure --help
76 apt-cache search libzip
77 apt-get install libzip-dev libzip2
79 apt-cache search libxmls
80 apt-get install libxmlsec1-dev
./configure --enable-profiling --enable-cassert --enable-depend CFLAGS="-fno-omit-frame-pointer" --enable-R-shlib --prefix=/opt/postgres_plr
84 make && make install
@3manuek
3manuek / gist:de0b5997d39814ef7532
Last active November 17, 2015 21:21
MySQL sandbox tutorial
emanuel@3laptop ~/Downloads $ make_replication_sandbox --master_master mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz
installing node 1
installing node 2
# server: 1:
# server: 2:
# server: 1:
# server: 2:
# server: 1:
# server: 2:
Circular replication activated