Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b934b3

Browse files
committed
Add log_statement option
1 parent2ee441a commit6b934b3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎testgres/testgres.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,13 +499,15 @@ def init(self, allow_streaming=False, fsync=False, initdb_params=[]):
499499

500500
returnself
501501

502-
defdefault_conf(self,allow_streaming=True,fsync=False):
502+
defdefault_conf(self,allow_streaming=True,fsync=False,log_statement='all'):
503503
"""
504504
Apply default settings to this node.
505505
506506
Args:
507507
allow_streaming: should this node add a hba entry for replication?
508508
fsync: should this node use fsync to keep data safe?
509+
log_statement: one of ('all', 'off', 'mod', 'ddl'), look at
510+
postgresql docs for more information
509511
510512
Returns:
511513
This instance of PostgresNode.
@@ -530,9 +532,10 @@ def default_conf(self, allow_streaming=True, fsync=False):
530532
ifnotfsync:
531533
conf.write("fsync = off\n")
532534

533-
conf.write("log_statement =all\n"
535+
conf.write("log_statement ={}\n"
534536
"listen_addresses = '{}'\n"
535-
"port = {}\n".format(self.host,
537+
"port = {}\n".format(log_statement,
538+
self.host,
536539
self.port))
537540

538541
ifallow_streaming:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp