mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-17 10:22:56 +00:00
Even more verbose prints
This commit is contained in:
12
hack/demo.py
12
hack/demo.py
@@ -50,6 +50,12 @@ def from_backup_at(args, backup_dir: Path):
|
||||
print(textwrap.indent(r, '> '))
|
||||
|
||||
|
||||
def debug_prints(node):
|
||||
print('RELID:', node.execute("select 'foo'::regclass::oid")[0][0])
|
||||
print("DBs:", node.execute('table pg_database'))
|
||||
print("foo:", node.execute('table foo'))
|
||||
|
||||
|
||||
def main(args):
|
||||
print("Create a node")
|
||||
node = testgres.get_new_node()
|
||||
@@ -57,13 +63,17 @@ def main(args):
|
||||
node.execute("""
|
||||
create table foo as select 1;
|
||||
""")
|
||||
print('RELID:', node.execute("select 'foo'::regclass::oid")[0][0])
|
||||
debug_prints(node)
|
||||
# node.pgbench_init(scale=1)
|
||||
|
||||
print("Create a backup")
|
||||
backup = node.backup()
|
||||
backup_dir = Path(backup.base_dir)
|
||||
|
||||
# pr = backup.spawn_primary().start()
|
||||
# debug_prints(pr)
|
||||
# exit(1)
|
||||
|
||||
print("Import a backup")
|
||||
create_tenant(args.tenant_id)
|
||||
from_backup_at(args, backup_dir)
|
||||
|
||||
Reference in New Issue
Block a user