This file contains hidden or 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
-- Midnight graph hacking with your host Thomas Munro <[email protected]> | |
create table data_source ( | |
id serial primary key, | |
name text not null | |
); | |
create table currency ( | |
id text primary key | |
); |
This file contains hidden or 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 TABLE tag ( | |
id serial primary key, | |
name text not null, | |
parent integer references tag(id), | |
unique (parent, name) | |
); | |
CREATE TABLE photo ( | |
id serial primary key, | |
path text not null |
This file contains hidden or 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/access/transam/multixact.c b/src/backend/access/transam/multixact.c | |
index 516a89f..ab85f6f 100644 | |
--- a/src/backend/access/transam/multixact.c | |
+++ b/src/backend/access/transam/multixact.c | |
@@ -2734,7 +2734,7 @@ find_multixact_start(MultiXactId multi, MultiXactOffset *result) | |
pageno = MultiXactIdToOffsetPage(multi); | |
entryno = MultiXactIdToOffsetEntry(multi); | |
- if (!SimpleLruDoesPhysicalPageExist(MultiXactOffsetCtl, pageno)) | |
+ if (!SimpleLruDoesPageExist(MultiXactOffsetCtl, pageno)) |
This file contains hidden or 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/replication/syncrep.c b/src/backend/replication/syncrep.c | |
index 325239d..2e18768 100644 | |
--- a/src/backend/replication/syncrep.c | |
+++ b/src/backend/replication/syncrep.c | |
@@ -462,6 +462,11 @@ SyncRepReleaseWaiters(void) | |
walsndctl->lsn[SYNC_REP_WAIT_FLUSH] = MyWalSnd->flush; | |
numflush = SyncRepWakeQueue(false, SYNC_REP_WAIT_FLUSH); | |
} | |
+ if (walsndctl->lsn[SYNC_REP_WAIT_APPLY] < MyWalSnd->apply) | |
+ { |
This file contains hidden or 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
macdice=> select * from a; | |
┌────┬──────┐ | |
│ id │ name │ | |
├────┼──────┤ | |
│ 0 │ one │ | |
└────┴──────┘ | |
(1 row) | |
macdice=> select * from b; | |
┌────┬───────┬──────┐ |
This file contains hidden or 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
-- Demo of PostgreSQL 9.5 features for Wellington PostgreSQL User's Group | |
-- The following is not necessarily in the right order or exactly how I ran it, | |
-- I mixed it up a bit when presenting! | |
DROP TABLE IF EXISTS country CASCADE; | |
DROP TABLE IF EXISTS sales_per_person CASCADE; | |
DROP TABLE IF EXISTS film CASCADE; |
This file contains hidden or 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
# "Walrus" | |
# | |
# A quick and dirty hack to experiment with a kind of automatic query | |
# plan cache. | |
# | |
# This is not real code. It's entirely imaginary. But you could imagine | |
# turning it into a wrapper, a cursor factory, a mix-in, a shirt, | |
# a sock, a glove, a hat. | |
# | |
# Thought: types are going to suck with this transparent approach, right? |
This file contains hidden or 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 application_name, replay_lag from pg_stat_replication order by application_name; | |
application_name | replay_lag | |
------------------+----------------- | |
node2 | 00:00:00.00323 | |
node3 | 00:00:00.003447 | |
node4 | 00:00:00.003464 | |
node5 | 00:00:00.003607 | |
node6 | 00:00:00.00351 | |
node7 | 00:00:00.003494 | |
node8 | 00:00:00.003403 |
This file contains hidden or 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/configure b/configure | |
index 24655dc..e239641 100755 | |
--- a/configure | |
+++ b/configure | |
@@ -10193,7 +10193,7 @@ fi | |
## Header files | |
## | |
-for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/epoll.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h | |
+for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/epoll.h sys/event.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h |
This file contains hidden or 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
tx1: BEGIN; | |
tx1: update ports dependency data | |
tx1: trigger sees row in cache_clearing_ports, decides not to insert new one | |
tx2: BEGIN; | |
tx2: sees row in cache_clearing_ports, deletes it | |
tx2: clears the cache | |
tx2: COMMIT; | |
external actor: doesn't see tx1, populates cache |
OlderNewer