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
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
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'
@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
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: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;
@3manuek
3manuek / gist:7233930
Last active December 26, 2015 23:58
Dump only views from a postgres database
#!/bin/bash
VIEWS="" ; for view in $(psql -U postgres -c 'select schemaname || $$.$$ ||viewname from pg_views where schemaname::text !~ $$information_schema|pg_catalog$$ ' -tA) ; do VIEWS="$VIEWS -t $view" ; done ; /opt/pg/bin/pg_dump -Upostgres -c -s $VIEWS
Optionally you can dump into a file:
VIEWS="" ; for view in $(psql -U postgres -c 'select schemaname || $$.$$ ||viewname from pg_views where schemaname::text !~ $$information_schema|pg_catalog$$ ' -tA) ; do VIEWS="$VIEWS -t $view" ; done ; /opt/pg/bin/pg_dump -Upostgres -c -s $VIEWS -f view_dump.sql
=====
#!/usr/local/bin/bash
@3manuek
3manuek / gist:7164696
Last active December 26, 2015 14:19
According an error reported by HL, we tried to reproduce the error : > Last_Error: Error executing row event: 'Cannot execute > statement: impossible to write to binary log since statement is in row > format and BINLOG_FORMAT = STATEMENT.'
Step by step
============
pre-step) Version
mysql> select version();
+--------------------+
| version() |
+--------------------+
| 5.1.71-rel14.9-log |
+--------------------+