Allow setting of effective_io_concurrency on tablespaces in 9.6+. Fixes #2000

pull/3/head
Surinder Kumar 2017-01-08 03:28:32 +00:00 committed by Dave Page
parent a93a99fdc0
commit 07e1c61eea
2 changed files with 13 additions and 3 deletions

View File

@ -563,9 +563,15 @@ class TablespaceView(PGChildNodeView):
This function will return list of variables available for
table spaces.
"""
SQL = render_template(
"/".join([self.template_path, 'variables.sql'])
)
ver = self.manager.version
if ver >= 90600:
SQL = render_template(
"/".join(['tablespaces/sql/9.6_plus', 'variables.sql'])
)
else:
SQL = render_template(
"/".join([self.template_path, 'variables.sql'])
)
status, rset = self.conn.execute_dict(SQL)
if not status:

View File

@ -0,0 +1,4 @@
{### SQL to fetch tablespace object options ###}
SELECT name, vartype, min_val, max_val, enumvals
FROM pg_settings
WHERE name IN ('seq_page_cost', 'random_page_cost', 'effective_io_concurrency');