nixos/tests: add postgresql wal2json test
This test should ensure wal2json functions. I'm planning to upgrade wal2json, so it seems nice to have a test here. It passes on my machine.
This commit is contained in:
74
nixos/tests/postgresql/wal2json/example2.out
Normal file
74
nixos/tests/postgresql/wal2json/example2.out
Normal file
@@ -0,0 +1,74 @@
|
||||
init
|
||||
{
|
||||
"change": [
|
||||
{
|
||||
"kind": "message",
|
||||
"transactional": false,
|
||||
"prefix": "wal2json",
|
||||
"content": "this non-transactional message will be delivered even if you rollback the transaction"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"change": [
|
||||
{
|
||||
"kind": "insert",
|
||||
"schema": "public",
|
||||
"table": "table2_with_pk",
|
||||
"columnnames": ["a", "b", "c"],
|
||||
"columntypes": ["integer", "character varying(30)", "timestamp without time zone"],
|
||||
"columnvalues": [1, "Backup and Restore", "2018-03-27 12:05:29.914496"]
|
||||
}
|
||||
,{
|
||||
"kind": "insert",
|
||||
"schema": "public",
|
||||
"table": "table2_with_pk",
|
||||
"columnnames": ["a", "b", "c"],
|
||||
"columntypes": ["integer", "character varying(30)", "timestamp without time zone"],
|
||||
"columnvalues": [2, "Tuning", "2018-03-27 12:05:29.914496"]
|
||||
}
|
||||
,{
|
||||
"kind": "insert",
|
||||
"schema": "public",
|
||||
"table": "table2_with_pk",
|
||||
"columnnames": ["a", "b", "c"],
|
||||
"columntypes": ["integer", "character varying(30)", "timestamp without time zone"],
|
||||
"columnvalues": [3, "Replication", "2018-03-27 12:05:29.914496"]
|
||||
}
|
||||
,{
|
||||
"kind": "message",
|
||||
"transactional": true,
|
||||
"prefix": "wal2json",
|
||||
"content": "this message will be delivered"
|
||||
}
|
||||
,{
|
||||
"kind": "delete",
|
||||
"schema": "public",
|
||||
"table": "table2_with_pk",
|
||||
"oldkeys": {
|
||||
"keynames": ["a", "c"],
|
||||
"keytypes": ["integer", "timestamp without time zone"],
|
||||
"keyvalues": [1, "2018-03-27 12:05:29.914496"]
|
||||
}
|
||||
}
|
||||
,{
|
||||
"kind": "delete",
|
||||
"schema": "public",
|
||||
"table": "table2_with_pk",
|
||||
"oldkeys": {
|
||||
"keynames": ["a", "c"],
|
||||
"keytypes": ["integer", "timestamp without time zone"],
|
||||
"keyvalues": [2, "2018-03-27 12:05:29.914496"]
|
||||
}
|
||||
}
|
||||
,{
|
||||
"kind": "insert",
|
||||
"schema": "public",
|
||||
"table": "table2_without_pk",
|
||||
"columnnames": ["a", "b", "c"],
|
||||
"columntypes": ["integer", "numeric(5,2)", "text"],
|
||||
"columnvalues": [1, 2.34, "Tapir"]
|
||||
}
|
||||
]
|
||||
}
|
||||
stop
|
||||
Reference in New Issue
Block a user