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
└──╼ docker run --rm -t -i oraclelinux:7 bash | |
Unable to find image 'oraclelinux:7' locally | |
Trying to pull repository docker.io/library/oraclelinux ... | |
7: Pulling from docker.io/library/oraclelinux | |
10ec637c060c: Pull complete | |
Digest: sha256:583f9e880f9228894555775c720d32eb22bf09cd13009c036d8f19b3257ccb41 | |
Status: Downloaded newer image for docker.io/oraclelinux:7 | |
[root@834d19f7c754 /]# rpm -ivh http://1c.postgrespro.ru/keys/postgrespro-1c-oraclelinux94.noarch.rpm | |
Retrieving http://1c.postgrespro.ru/keys/postgrespro-1c-oraclelinux94.noarch.rpm |
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
#include <stdio.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <string.h> | |
int main (void) | |
{ | |
char fn[100]; |
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
postgres=# insert into test1 values (42); | |
INSERT 0 1 | |
postgres=# select * from test1 ; | |
i | |
---- | |
42 | |
(1 строка) | |
postgres=# \q | |
(reverse-i-search)`dd': ^C if=/dev/zero of=base/13090/24576 bs=8k count=1 |
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
Dmitry Vasilyev@WIN-N79ERR9IL9S MSYS /c/agent | |
$ ./mamonsu.exe -e template.xml -c agent.conf | |
[INFO] 2016-05-04 12:37:31,143 - root - Import module 'ExtPlugins' from directory C:\agent\ExtPlugins | |
[INFO] 2016-05-04 12:37:31,144 - root - Import plugin 'ExamplePlugin' from module 'ExtPlugins' | |
[INFO] 2016-05-04 12:37:31,145 - root - Import plugin 'StatementStats' from module 'ExtPlugins' | |
Dmitry Vasilyev@WIN-N79ERR9IL9S MSYS /c/agent | |
$ cat ExtPlugins/ | |
__init__.py __pycache__/ ExamplePlugin.py StatementStats.py |
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
-bash-4.3$ #rmgr: XLOG len (rec/tot): 72/ 104, tx: 0, lsn: 0/01844EA8, prev 0/01844E40, bkp: 0000, desc: checkpoint: redo 0/1844EA8; tli 1; prev tli 1; fpw true; xid 0/1951; oid 16403; multi 1; offset 0; oldest xid 1929 in DB 1; oldest multi 1 in DB 1; oldest running xid 0; shutdown | |
-bash-4.3$ mv data/global/pg_control data/global/pg_control.back | |
-bash-4.3$ touch^Cata/global/pg_control | |
-bash-4.3$ mv data/global/pg_control.back data/global/pg_control | |
-bash-4.3$ pg_controldata data | |
pg_control version number: 942 | |
Catalog version number: 201409291 | |
Database system identifier: 6278627349384791518 | |
Database cluster state: shut down | |
pg_control last modified: Чт 28 апр 2016 18:21:46 |
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
diff --git a/src/backend/commands/indexcmds.c | |
b/src/backend/commands/indexcmds.c | |
index 13b04e6..1024603 100644 | |
--- a/src/backend/commands/indexcmds.c | |
+++ b/src/backend/commands/indexcmds.c | |
@@ -881,6 +881,12 @@ DefineIndex(Oid relationId, | |
CacheInvalidateRelcacheByRelid(heaprelid.relId); | |
/* | |
+ * Force WAL commit record to ensure that replica receives invalidation |
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
postgres=# select * from pg_file_settings where name = 'max_connections'; | |
sourcefile | sourceline | seqno | name | setting | applied | error | |
----------------------------------------+------------+-------+-----------------+---------+---------+------- | |
/var/lib/postgres/data/postgresql.conf | 64 | 1 | max_connections | 100 | t | | |
(1 row) | |
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
< 2016-02-26 04:23:57.615 EST >DEBUG: sendtime 2016-02-26 04:23:57.615669-05 receipttime 2016-02-26 04:23:57.615752-05 replication apply delay 0 ms transfer latency 0 ms | |
< 2016-02-26 04:23:57.615 EST >DEBUG: sending write 0/67C1B700 flush 0/67C1B6C8 apply 0/67C1B6C8 | |
< 2016-02-26 04:23:57.698 EST >DEBUG: sending write 0/67C1B700 flush 0/67C1B700 apply 0/67C1B6C8 | |
< 2016-02-26 04:23:57.704 EST >DEBUG: prune KnownAssignedXids to 1894 | |
< 2016-02-26 04:23:57.704 EST >CONTEXT: xlog redo Standby/RUNNING_XACTS: nextXid 1894 latestCompletedXid 1893 oldestRunningXid 1894 | |
< 2016-02-26 04:23:57.809 EST >DEBUG: forked new backend, pid=24586 socket=10 | |
< 2016-02-26 04:23:57.825 EST >DEBUG: postgres child[24586]: starting with ( | |
< 2016-02-26 04:23:57.825 EST >DEBUG: postgres | |
< 2016-02-26 04:23:57.825 EST >DEBUG: ) | |
< 2016-02-26 04:23:57.825 EST >DEBUG: InitPostgres |
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
# for NAME and DISPLAY_NAME, the '%s' is replaced whatever you pass to <service.exe> --install NAMEHERE, so you can | |
# register the same exe multiple times with different names and configuration files | |
NAME = 'cx_FreezeSampleService%s' # what the name of the service is, used in command line things like "sc" | |
DISPLAY_NAME = 'cx_Freeze Sample Service - %s' # display name of the service, this is what you see in the "Services" window | |
MODULE_NAME = 'service' # python file containing the actual service code | |
CLASS_NAME = 'Handler' # class name of the service, since it doesn't extend anything, all it needs are certain methods | |
DESCRIPTION = 'Sample service description' # description of the service, seen in the Service Properties window | |
AUTO_START = False # does the service auto start? | |
# does the service respond to session changes? Setting this to True and implemnting SessionChanged(sessionId, eventType) |
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
no-lock patch: | |
pgbench=# explain (analyze,buffers) select * from big_table b inner join small_table s on b.i = s.i where b.date > '2015-11-30 15:25:00' and b.i = 1000001; | |
QUERY PLAN | |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
Nested Loop (cost=0.00..16.94 rows=4 width=16) (actual time=0.057..0.060 rows=1 loops=1) | |
Buffers: shared hit=8 | |
-> Append (cost=0.00..8.45 rows=2 width=12) (actual time=0.024..0.025 rows=1 loops=1) | |
Buffers: shared hit=4 | |
-> Seq Scan on big_table b (cost=0.00..0.00 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=1) |