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
#!/usr/bin/env python3 | |
import requests | |
import time | |
import contextlib | |
from pprint import pprint | |
import psycopg2 |
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
// @@ -569,6 +569,21 @@ PushPage(StringInfo input_message) | |
/* | |
* Every backend on the compute side will verify the page checksum | |
* after reading it from pageserver using GetPage@LSN. Here in the | |
* WAL redo process we are reading pages directly from stdin, so we | |
* would better verify checksum too before applying any WAL records | |
* on top of it. | |
*/ | |
if (!PageIsVerifiedExtended((Page) content, blknum, | |
PIV_LOG_WARNING | PIV_REPORT_STAT)) |
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
#!/usr/bin/env sh | |
export PATH=$(pwd)/target/debug/:$(pwd)/tmp_install/bin:$PATH | |
# Remove all traces of the previous run | |
killall pageserver | |
killall wal_acceptor | |
killall postgres | |
rm -rf zenith_tmp |
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
/* | |
* Data structures defining the semantics of the standard lock methods. | |
* | |
* The conflict table defines the semantics of the various lock modes. | |
*/ | |
static const LOCKMASK LockConflicts[] = { | |
0, | |
/* AccessShareLock */ | |
LOCKBIT_ON(AccessExclusiveLock), |
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
\set aid random(1, 100000 * :scale) | |
\set bid random(1, 1 * :scale) | |
\set tid random(1, 10 * :scale) | |
\set delta random(-5000, 5000) | |
BEGIN; | |
UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid; | |
SELECT abalance FROM pgbench_accounts WHERE aid = :aid; | |
UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid; | |
UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid; | |
INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); |
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 <string.h> | |
#include <stdlib.h> | |
#define MAXBUFSIZE 20 | |
void put(char (*dest)[MAXBUFSIZE], char *src) | |
{ | |
strcpy((char *) dest, src); | |
} |
Clone ICU repo:
git clone https://github.com/unicode-org/icu.git
cd icu
Run script:
python3 grep-icu.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
#!/bin/sh -ex | |
#export PATH=/usr/pgsql-11/bin:$PATH | |
pg_ctl stop -D /tmp/master || echo "ok" | |
pg_ctl stop -D /tmp/slave || echo "ok" | |
rm -rf /tmp/master | |
rm -rf /tmp/slave | |
# setup master | |
initdb -D /tmp/master |
NewerOlder