A template for PostgreSQL High Availability with Etcd, Consul, ZooKeeper, or Kubernetes
This report summarizes scanner evidence for patroni/patroni, a Python project with 8,777 GitHub stars. SynthScan examined 56,544 lines of code across 158 source files, recording 1108 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 25.3 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 647 finding(s).
Are imports declared and package/API names verified? 80 finding(s).
Are wrappers, guards, and repeated structures necessary? 857 finding(s).
Which changes need focused human review? 1108 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1108 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patroni/validator.py | 169 | def validate_standby_cluster_port(port: Any) -> bool: | CODE |
| LOW | patroni/validator.py | 210 | def comma_separated_host_port(string: str) -> bool: | CODE |
| LOW | patroni/validator.py | 222 | def validate_host_port_listen(host_port: str) -> bool: | CODE |
| LOW | patroni/validator.py | 235 | def validate_host_port_listen_multiple_hosts(host_port: str) -> bool: | CODE |
| LOW | patroni/validator.py | 1000 | def validate_synchronous_mode(value: Any) -> None: | CODE |
| LOW | patroni/ha.py | 318 | def quorum_commit_mode_is_active(self) -> bool: | CODE |
| LOW | patroni/ha.py | 325 | def _get_failover_action_name(self) -> str: | CODE |
| LOW | patroni/ha.py | 601 | def _handle_rewind_or_reinitialize(self) -> Optional[str]: | CODE |
| LOW | patroni/ha.py | 833 | def _maybe_enable_synchronous_mode(self) -> Optional[SyncState]: | CODE |
| LOW | patroni/ha.py | 851 | def disable_synchronous_replication(self) -> None: | CODE |
| LOW | patroni/ha.py | 870 | def _handle_synchronous_strict_mode(self, dcs_state: SyncState, replication_state: Any) -> bool: | CODE |
| LOW | patroni/ha.py | 923 | def _process_quorum_replication(self) -> None: | CODE |
| LOW | patroni/ha.py | 987 | def _process_multisync_replication(self) -> None: | CODE |
| LOW | patroni/ha.py | 1064 | def _process_multisync_prepromote(self) -> bool: | CODE |
| LOW | patroni/ha.py | 1095 | def _process_quorum_prepromote(self) -> None: | CODE |
| LOW | patroni/ha.py | 1115 | def process_sync_replication_prepromote(self) -> bool: | CODE |
| LOW | patroni/ha.py | 1198 | def enforce_follow_remote_member(self, message: str) -> str: | CODE |
| LOW | patroni/ha.py | 1558 | def manual_failover_process_no_leader(self) -> Optional[bool]: | CODE |
| LOW | patroni/ha.py | 1714 | def release_leader_key_voluntarily(self, last_lsn: Optional[int] = None) -> None: | CODE |
| LOW | patroni/ha.py | 1833 | def should_run_scheduled_action(self, action_name: str, scheduled_at: Optional[datetime.datetime], | CODE |
| LOW | patroni/ha.py | 1868 | def process_manual_failover_from_leader(self) -> Optional[str]: | CODE |
| LOW | patroni/ha.py | 1908 | def process_unhealthy_cluster(self) -> str: | CODE |
| LOW | patroni/ha.py | 2022 | def evaluate_scheduled_restart(self) -> Optional[str]: | CODE |
| LOW | patroni/ha.py | 2176 | def handle_long_action_in_progress(self) -> str: | CODE |
| LOW⚡ | patroni/config.py | 273 | def __get_and_maybe_adjust_int_value(self, config: Dict[str, Any], param: str, min_value: int) -> int: | CODE |
| LOW | patroni/config.py | 293 | def _validate_and_adjust_timeouts(self, config: Dict[str, Any]) -> None: | CODE |
| LOW | patroni/config.py | 334 | def set_dynamic_configuration(self, configuration: Union[ClusterConfig, Dict[str, Any]]) -> bool: | CODE |
| LOW | patroni/config.py | 360 | def reload_local_configuration(self) -> Optional[bool]: | CODE |
| LOW | patroni/config.py | 384 | def _process_postgresql_parameters(parameters: Any, is_local: bool = False) -> Dict[str, Any]: | CODE |
| LOW | patroni/config.py | 435 | def _safe_copy_dynamic_configuration(self, dynamic_configuration: Dict[str, Any]) -> Dict[str, Any]: | CODE |
| LOW | patroni/config.py | 481 | def _build_environment_configuration() -> Dict[str, Any]: | CODE |
| LOW | patroni/config.py | 714 | def _build_effective_configuration(self, dynamic_configuration: Dict[str, Any], | CODE |
| LOW | patroni/config.py | 833 | def build_effective_postgresql_configuration(self, role: PostgresqlRole) -> Dict[str, Any]: | CODE |
| LOW | patroni/config.py | 877 | def _validate_contradictory_tags(self) -> None: | CODE |
| LOW | patroni/log.py | 130 | def _try_to_report_lost_records(self) -> None: | CODE |
| LOW | patroni/global_config.py | 39 | def _cluster_has_valid_config(cluster: Optional['Cluster']) -> bool: | CODE |
| LOW | patroni/global_config.py | 120 | def is_synchronous_mode_strict(self) -> bool: | CODE |
| LOW | patroni/global_config.py | 124 | def get_standby_cluster_config(self) -> Any: | CODE |
| LOW | patroni/global_config.py | 253 | def manage_synchronized_standby_slots_enabled(self) -> bool: | CODE |
| LOW | patroni/file_perm.py | 76 | def set_permissions_from_data_directory(self, data_dir: str) -> None: | CODE |
| LOW | patroni/ctl.py | 586 | def get_all_members_leader_first(cluster: Cluster) -> Iterator[Member]: | CODE |
| LOW | patroni/ctl.py | 1255 | def _do_failover_or_switchover(action: str, cluster_name: str, group: Optional[int], site: Optional[str], | CODE |
| LOW | patroni/ctl.py | 1854 | def wait_until_pause_is_applied(dcs: AbstractDCS, paused: bool, old_cluster: Cluster) -> None: | CODE |
| LOW | patroni/ctl.py | 2040 | def format_config_for_editing(data: Any, default_flow_style: bool = False) -> str: | CODE |
| LOW | patroni/quorum.py | 255 | def __handle_non_steady_cases(self) -> Iterator[Transition]: | CODE |
| LOW | patroni/quorum.py | 375 | def __handle_replication_factor_change(self) -> Iterator[Transition]: | CODE |
| LOW | patroni/utils.py | 323 | def convert_int_from_base_unit(base_value: int, base_unit: Optional[str]) -> Optional[str]: | CODE |
| LOW | patroni/utils.py | 367 | def convert_real_from_base_unit(base_value: float, base_unit: Optional[str]) -> Optional[str]: | CODE |
| LOW | patroni/utils.py | 411 | def maybe_convert_from_base_unit(base_value: str, vartype: str, base_unit: Optional[str]) -> str: | CODE |
| LOW | patroni/config_generator.py | 329 | def _get_bin_dir_from_running_instance(self) -> str: | CODE |
| LOW | patroni/config_generator.py | 468 | def _enrich_config_from_running_instance(self) -> None: | CODE |
| LOW | patroni/__main__.py | 117 | def apply_dynamic_configuration(self, cluster: 'Cluster') -> None: | CODE |
| LOW | patroni/postgresql/validator.py | 235 | def _get_postgres_guc_validators(config: Dict[str, Any], parameter: str) -> Tuple[_Transformable, ...]: | CODE |
| LOW | patroni/postgresql/validator.py | 261 | def _read_postgres_gucs_validators_file(file: PathLikeObj) -> Dict[str, Any]: | CODE |
| LOW | patroni/postgresql/validator.py | 280 | def _load_postgres_gucs_validators() -> None: | CODE |
| LOW | patroni/postgresql/validator.py | 413 | def _transform_parameter_value(validators: MutableMapping[str, Tuple[_Transformable, ...]], | CODE |
| LOW | patroni/postgresql/validator.py | 446 | def transform_postgresql_parameter_value(version: int, name: str, value: Any, | CODE |
| LOW | patroni/postgresql/validator.py | 473 | def transform_recovery_parameter_value(version: int, name: str, value: Any, | CODE |
| LOW | patroni/postgresql/bootstrap.py | 33 | def keep_existing_recovery_conf(self) -> bool: | CODE |
| LOW | patroni/postgresql/sync.py | 304 | def _handle_synchronous_standby_names_change(self) -> None: | CODE |
| 414 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 145 | except Exception: | CODE |
| MEDIUM | setup.py | 142 | def run(self): | CODE |
| LOW | patroni/validator.py | 189 | except Exception: | CODE |
| LOW | patroni/validator.py | 262 | except Exception: | CODE |
| LOW | patroni/validator.py | 279 | except Exception: | CODE |
| LOW | patroni/validator.py | 744 | except Exception as e: | CODE |
| MEDIUM | patroni/ha.py | 357 | def acquire_lock(self) -> bool: | CODE |
| LOW | patroni/ha.py | 362 | except Exception: | CODE |
| LOW | patroni/ha.py | 398 | except Exception: | CODE |
| LOW | patroni/ha.py | 404 | except Exception: | CODE |
| LOW | patroni/ha.py | 445 | except Exception as e: | CODE |
| LOW | patroni/ha.py | 510 | except Exception: | CODE |
| LOW | patroni/ha.py | 1271 | except Exception as e: | CODE |
| LOW | patroni/ha.py | 1315 | except Exception as e: | CODE |
| LOW | patroni/ha.py | 1354 | except Exception: | CODE |
| LOW | patroni/ha.py | 1815 | except Exception: | CODE |
| LOW | patroni/ha.py | 2325 | except Exception as exc1: | CODE |
| LOW | patroni/ha.py | 2332 | except Exception as exc2: | CODE |
| LOW | patroni/ha.py | 2551 | except Exception: | CODE |
| LOW | patroni/raft_controller.py | 23 | except Exception: | CODE |
| MEDIUM | patroni/raft_controller.py | 20 | def _run_cycle(self) -> None: | CODE |
| LOW⚡ | patroni/config.py | 260 | except Exception: | CODE |
| LOW⚡ | patroni/config.py | 265 | except Exception: | CODE |
| LOW⚡ | patroni/config.py | 270 | except Exception: | CODE |
| LOW | patroni/config.py | 239 | except Exception: | CODE |
| LOW | patroni/config.py | 356 | except Exception: | CODE |
| LOW | patroni/config.py | 380 | except Exception: | CODE |
| LOW | patroni/config.py | 607 | except Exception: | CODE |
| LOW | patroni/config.py | 635 | except Exception: | CODE |
| LOW | patroni/log.py | 143 | except Exception: | CODE |
| LOW | patroni/log.py | 158 | except Exception: | CODE |
| LOW | patroni/log.py | 413 | except Exception as e: | CODE |
| LOW | patroni/log.py | 506 | except Exception: | CODE |
| LOW | patroni/file_perm.py | 55 | except Exception as e: | CODE |
| LOW | patroni/file_perm.py | 87 | except Exception as e: | CODE |
| LOW | patroni/ctl.py | 200 | except Exception as e: | CODE |
| LOW | patroni/ctl.py | 1424 | except Exception: | CODE |
| LOW | patroni/ctl.py | 1845 | except Exception as err: | CODE |
| LOW | patroni/ctl.py | 1906 | except Exception as err: | CODE |
| LOW | patroni/ctl.py | 2301 | except Exception as e: | CODE |
| LOW | patroni/ctl.py | 2396 | except Exception as err: | CODE |
| LOW | patroni/psycopg.py | 179 | except Exception: | CODE |
| LOW | patroni/api.py | 813 | except Exception: | CODE |
| LOW | patroni/api.py | 1045 | except Exception: | CODE |
| LOW | patroni/api.py | 1164 | except Exception as e: | CODE |
| LOW | patroni/api.py | 1558 | except Exception as e: | CODE |
| LOW | patroni/api.py | 1690 | except Exception as e: | CODE |
| LOW | patroni/api.py | 1712 | except Exception as e: | CODE |
| LOW | patroni/api.py | 1827 | except Exception: | CODE |
| LOW | patroni/api.py | 1949 | except Exception as e: | CODE |
| LOW | patroni/api.py | 2011 | except Exception as e: | CODE |
| LOW | patroni/api.py | 2067 | except Exception as e: | CODE |
| LOW | patroni/async_executor.py | 169 | except Exception: | CODE |
| LOW | patroni/config_generator.py | 66 | except Exception as err: | CODE |
| LOW | patroni/config_generator.py | 530 | except Exception as e: | CODE |
| LOW | patroni/__main__.py | 68 | except Exception as e: | CODE |
| LOW | patroni/__main__.py | 156 | except Exception: | CODE |
| LOW | patroni/__main__.py | 196 | except Exception: | CODE |
| LOW | patroni/__main__.py | 268 | except Exception: | CODE |
| LOW | patroni/__main__.py | 272 | except Exception: | CODE |
| 180 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | patroni/validator.py | 189 | except Exception: | CODE |
| HIGH | patroni/ha.py | 510 | except Exception: | CODE |
| HIGH | patroni/log.py | 143 | except Exception: | CODE |
| HIGH | patroni/__main__.py | 432 | except OSError: | CODE |
| HIGH | patroni/daemon.py | 54 | except ImportError: # pragma: no cover | CODE |
| HIGH | patroni/daemon.py | 243 | except KeyboardInterrupt: | CODE |
| HIGH | patroni/postgresql/config.py | 475 | except AttributeError: | CODE |
| HIGH | patroni/postgresql/__init__.py | 989 | except (psycopg.Error, PostgresConnectionException): | CODE |
| HIGH | patroni/postgresql/__init__.py | 973 | except TimeoutExpired: | CODE |
| HIGH | patroni/postgresql/postmaster.py | 330 | except psutil.NoSuchProcess: | CODE |
| HIGH | patroni/postgresql/postmaster.py | 212 | except psutil.Error: | CODE |
| HIGH | patroni/postgresql/postmaster.py | 284 | except psutil.NoSuchProcess: | CODE |
| HIGH | patroni/postgresql/cancellable.py | 108 | except Exception: | CODE |
| HIGH | patroni/postgresql/cancellable.py | 56 | except psutil.Error: | CODE |
| HIGH | patroni/postgresql/cancellable.py | 62 | except psutil.NoSuchProcess: | CODE |
| HIGH | patroni/watchdog/linux.py | 195 | except WatchdogError: | CODE |
| HIGH | patroni/dcs/zookeeper.py | 409 | except NoNodeError: | CODE |
| HIGH | patroni/dcs/zookeeper.py | 364 | except NoNodeError: | CODE |
| HIGH | patroni/dcs/etcd.py | 506 | except (ReferenceError, TypeError, AttributeError): | CODE |
| HIGH | patroni/dcs/kubernetes.py | 54 | except OSError: | CODE |
| HIGH | patroni/dcs/kubernetes.py | 251 | except K8sException: | CODE |
| HIGH | features/environment.py | 171 | except Exception: | CODE |
| HIGH | features/environment.py | 663 | except Exception: | CODE |
| HIGH | features/environment.py | 696 | except Exception: | CODE |
| HIGH | features/environment.py | 700 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 40 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 76 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 103 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 122 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 165 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 182 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 69 | except Exception: | CODE |
| HIGH | features/steps/slots.py | 31 | except Exception: | CODE |
| HIGH | features/steps/quorum_commit.py | 21 | except Exception: | CODE |
| HIGH | features/steps/quorum_commit.py | 56 | except Exception: | CODE |
| HIGH | features/steps/cascading_replication.py | 34 | except Exception: | CODE |
| HIGH | features/steps/cascading_replication.py | 49 | except Exception: | CODE |
| HIGH | features/steps/patroni_api.py | 178 | except Exception: | CODE |
| HIGH | features/steps/citus.py | 36 | except Exception: | CODE |
| HIGH | features/steps/citus.py | 62 | except Exception: | CODE |
| HIGH | tests/test_api.py | 880 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | features/environment.py | 637 | if subprocess.call([docker, 'info'], stdout=null, stderr=null) != 0: | CODE |
| HIGH⚡ | features/environment.py | 642 | if subprocess.call([docker, 'info'], stdout=null, stderr=null) != 0: | CODE |
| HIGH | features/environment.py | 1117 | '-out', context.certfile], stdout=null, stderr=null) | CODE |
| HIGH⚡ | features/steps/citus.py | 70 | context.pctl.query(name, 'CREATE TABLE public.d(id int not null)') | CODE |
| HIGH | tests/test_consul.py | 47 | 'ModifyIndex': 6429, 'Value': b'{"leader": "leader", "sync_standby": null}'}, | CODE |
| HIGH⚡ | tests/test_citus.py | 254 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 265 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 276 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 286 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 326 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 336 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 346 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 356 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 365 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 374 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 383 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH⚡ | tests/test_citus.py | 393 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH | tests/test_citus.py | 229 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH | tests/test_citus.py | 242 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH | tests/test_citus.py | 297 | self.assertTrue(new.equals(expected, True)) | CODE |
| HIGH | tests/test_citus.py | 312 | self.assertTrue(new.equals(expected, True)) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 174 | CODE | |
| LOW | patroni/validator.py | 110 | CODE | |
| LOW | patroni/validator.py | 169 | CODE | |
| LOW | patroni/validator.py | 295 | CODE | |
| LOW | patroni/validator.py | 552 | CODE | |
| LOW | patroni/validator.py | 708 | CODE | |
| LOW | patroni/validator.py | 782 | CODE | |
| LOW | patroni/validator.py | 841 | CODE | |
| LOW | patroni/ha.py | 449 | CODE | |
| LOW | patroni/ha.py | 755 | CODE | |
| LOW | patroni/ha.py | 923 | CODE | |
| LOW | patroni/ha.py | 1133 | CODE | |
| LOW | patroni/ha.py | 1177 | CODE | |
| LOW | patroni/ha.py | 1202 | CODE | |
| LOW | patroni/ha.py | 1381 | CODE | |
| LOW | patroni/ha.py | 1514 | CODE | |
| LOW | patroni/ha.py | 1558 | CODE | |
| LOW | patroni/ha.py | 1833 | CODE | |
| LOW | patroni/ha.py | 1868 | CODE | |
| LOW | patroni/ha.py | 1908 | CODE | |
| LOW | patroni/ha.py | 1969 | CODE | |
| LOW | patroni/ha.py | 2176 | CODE | |
| LOW | patroni/ha.py | 2317 | CODE | |
| LOW | patroni/ha.py | 2555 | CODE | |
| LOW | patroni/config.py | 242 | CODE | |
| LOW | patroni/config.py | 384 | CODE | |
| LOW | patroni/config.py | 435 | CODE | |
| LOW | patroni/config.py | 481 | CODE | |
| LOW | patroni/config.py | 714 | CODE | |
| LOW | patroni/dynamic_loader.py | 73 | CODE | |
| LOW | patroni/log.py | 342 | CODE | |
| LOW | patroni/log.py | 441 | CODE | |
| LOW | patroni/log.py | 509 | CODE | |
| LOW | patroni/ctl.py | 422 | CODE | |
| LOW | patroni/ctl.py | 897 | CODE | |
| LOW | patroni/ctl.py | 1112 | CODE | |
| LOW | patroni/ctl.py | 1586 | CODE | |
| LOW | patroni/ctl.py | 1809 | CODE | |
| LOW | patroni/ctl.py | 2272 | CODE | |
| LOW | patroni/api.py | 247 | CODE | |
| LOW | patroni/api.py | 960 | CODE | |
| LOW | patroni/api.py | 1134 | CODE | |
| LOW | patroni/api.py | 1693 | CODE | |
| LOW | patroni/api.py | 1998 | CODE | |
| LOW | patroni/utils.py | 122 | CODE | |
| LOW | patroni/utils.py | 916 | CODE | |
| LOW | patroni/utils.py | 1291 | CODE | |
| LOW | patroni/config_generator.py | 184 | CODE | |
| LOW | patroni/config_generator.py | 372 | CODE | |
| LOW | patroni/__main__.py | 286 | CODE | |
| LOW | patroni/__main__.py | 389 | CODE | |
| LOW | patroni/__main__.py | 418 | CODE | |
| LOW | patroni/postgresql/bootstrap.py | 157 | CODE | |
| LOW | patroni/postgresql/bootstrap.py | 263 | CODE | |
| LOW | patroni/postgresql/bootstrap.py | 386 | CODE | |
| LOW | patroni/postgresql/sync.py | 63 | CODE | |
| LOW | patroni/postgresql/sync.py | 336 | CODE | |
| LOW | patroni/postgresql/sync.py | 361 | CODE | |
| LOW | patroni/postgresql/callback_executor.py | 69 | CODE | |
| LOW | patroni/postgresql/config.py | 215 | CODE | |
| 73 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patroni/ha.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/ha.py | 120 | def update_slots(self, slots: Dict[str, int]) -> None: | CODE |
| LOW | patroni/ha.py | 207 | def set_is_active(self, value: float) -> None: | CODE |
| LOW | patroni/ha.py | 300 | def set_is_leader(self, value: bool) -> None: | CODE |
| LOW | patroni/ha.py | 1177 | def update_cluster_history(self) -> None: | CODE |
| LOW | patroni/ha.py | 2310 | def set_start_timeout(self, value: Optional[int]) -> None: | CODE |
| LOW | patroni/raft_controller.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/config.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/config.py | 534 | def _set_section_values(section: str, params: List[str]) -> None: | CODE |
| LOW | patroni/dynamic_loader.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/log.py | 37 | def set_log_file_mode(self, mode: Optional[int]) -> None: | CODE |
| LOW | patroni/log.py | 252 | def update_loggers(self, config: Dict[str, Any]) -> None: | CODE |
| LOW | patroni/file_perm.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/file_perm.py | 76 | def set_permissions_from_data_directory(self, data_dir: str) -> None: | CODE |
| LOW | patroni/ctl.py | 165 | def _set_hline(self, value: str) -> None: | CODE |
| LOW | patroni/psycopg.py | 13 | __all__ = ['connect', 'parse_conninfo', 'quote_ident', 'quote_literal', | CODE |
| LOW | patroni/quorum.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/api.py | 37 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/api.py | 1638 | def _set_fd_cloexec(fd: socket.socket) -> None: | CODE |
| LOW | patroni/utils.py | 41 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/utils.py | 706 | def update_delay(self) -> None: | CODE |
| LOW | patroni/async_executor.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/config_generator.py | 372 | def _set_pg_params(self, cur: Union['cursor', 'Cursor[Any]']) -> None: | CODE |
| LOW | patroni/config_generator.py | 415 | def _set_su_params(self) -> None: | CODE |
| LOW | patroni/config_generator.py | 438 | def _set_conf_files(self) -> None: | CODE |
| LOW | patroni/__main__.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/daemon.py | 45 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/validator.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/bootstrap.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/sync.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/sync.py | 415 | def set_synchronous_standby_names(self, sync: Collection[str], num: Optional[int] = None) -> None: | CODE |
| LOW | patroni/postgresql/misc.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/callback_executor.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/config.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/config.py | 495 | def set_file_permissions(self, filename: str) -> None: | CODE |
| LOW | patroni/postgresql/slots.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | patroni/postgresql/__init__.py | 474 | def set_enforce_hot_standby_feedback(self, value: bool) -> None: | CODE |
| LOW⚡ | patroni/postgresql/__init__.py | 723 | def set_role(self, value: PostgresqlRole) -> None: | CODE |
| LOW⚡ | patroni/postgresql/__init__.py | 732 | def set_state(self, value: PostgresqlState) -> None: | CODE |
| LOW | patroni/postgresql/__init__.py | 43 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/__init__.py | 361 | def set_pending_restart_reason(self, diff_dict: CaseInsensitiveDict) -> None: | CODE |
| LOW | patroni/postgresql/rewind.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/connection.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/postmaster.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/cancellable.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/available_parameters/__init__.py | 6 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/mpp/citus.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/postgresql/mpp/citus.py | 523 | def update_node(self, groupid: int, node: PgDistNode, cooldown: float = 10000) -> None: | CODE |
| LOW | patroni/postgresql/mpp/citus.py | 534 | def update_group(self, task: PgDistTask, transaction: bool) -> None: | CODE |
| LOW | patroni/watchdog/__init__.py | 3 | __all__ = ['WatchdogError', 'Watchdog'] | CODE |
| LOW | patroni/watchdog/linux.py | 212 | def set_timeout(self, timeout: int) -> None: | CODE |
| LOW | patroni/watchdog/linux.py | 237 | def set_timeout(self, timeout: int) -> None: | CODE |
| LOW | patroni/watchdog/base.py | 12 | __all__ = ['WatchdogError', 'Watchdog'] | CODE |
| LOW | patroni/watchdog/base.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/watchdog/base.py | 291 | def set_timeout(self, timeout: int) -> None: | CODE |
| LOW | patroni/scripts/wale_restore.py | 39 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/scripts/aws.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/scripts/barman/utils.py | 67 | def set_up_logging(log_file: Optional[str] = None) -> None: | CODE |
| LOW | patroni/dcs/exhibitor.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | patroni/dcs/etcd3.py | 30 | logger = logging.getLogger(__name__) | CODE |
| 26 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | tests/test_ha.py | 281 | self.ha.cluster.config.data.update({'standby_cluster': {'port': 5432}}) | STRING |
| CRITICAL⚡ | tests/test_ha.py | 1524 | self.ha.cluster.config.data.update({'synchronous_mode': True, 'primary_start_timeout': 0}) | STRING |
| CRITICAL⚡ | tests/test_ha.py | 1533 | self.ha.cluster.config.data.update({'primary_stop_timeout': 30}) | STRING |
| CRITICAL⚡ | tests/test_ha.py | 1871 | self.ha.cluster.config.data.clear() | STRING |
| CRITICAL | tests/test_ha.py | 340 | self.ha.cluster.config.data.update({'maximum_lag_on_failover': 10}) | STRING |
| CRITICAL | tests/test_ha.py | 373 | self.ha.cluster.leader.member.data.update(version='2.0.2', role=PostgresqlRole.PRIMARY) | STRING |
| CRITICAL | tests/test_ha.py | 514 | self.ha.cluster.config.data.update({'slots': {'l': {'database': 'a', 'plugin': 'b'}}}) | STRING |
| CRITICAL | tests/test_ha.py | 519 | self.ha.cluster.config.data.update({'postgresql': {'use_slots': False}}) | STRING |
| CRITICAL | tests/test_ha.py | 861 | self.ha.cluster.config.data.update({'maximum_lag_on_failover': 5}) | STRING |
| CRITICAL | tests/test_ha.py | 909 | self.ha.cluster.config.data.update({'maximum_lag_on_failover': 5}) | STRING |
| CRITICAL | tests/test_ha.py | 1054 | self.ha.cluster.config.data.update({'maximum_lag_on_failover': 5}) | STRING |
| CRITICAL | tests/test_ha.py | 1246 | self.ha.cluster.config.data.update({'maximum_lag_on_failover': 5}) | STRING |
| CRITICAL | tests/test_ha.py | 1562 | self.ha.cluster.config.data.update({'standby_cluster': {'port': 5432}}) | STRING |
| CRITICAL | tests/test_ha.py | 1596 | self.ha.cluster.config.data.update({'standby_cluster': {'restore_command': 'foo', 'port': None}}) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | patroni/dcs/etcd3.py | 0 | load and build the :class:`cluster` object from dcs, which represents a single postgresql cluster. :param path: the path | STRING |
| HIGH | patroni/dcs/zookeeper.py | 0 | load and build the :class:`cluster` object from dcs, which represents a single postgresql cluster. :param path: the path | STRING |
| HIGH | patroni/dcs/__init__.py | 0 | load and build the :class:`cluster` object from dcs, which represents a single postgresql cluster. :param path: the path | STRING |
| HIGH | patroni/dcs/etcd.py | 0 | load and build the :class:`cluster` object from dcs, which represents a single postgresql cluster. :param path: the path | STRING |
| HIGH | patroni/dcs/consul.py | 0 | load and build the :class:`cluster` object from dcs, which represents a single postgresql cluster. :param path: the path | STRING |
| HIGH | patroni/dcs/kubernetes.py | 0 | load and build the :class:`cluster` object from dcs, which represents a single postgresql cluster. :param path: the path | STRING |
| HIGH | patroni/dcs/raft.py | 0 | load and build the :class:`cluster` object from dcs, which represents a single postgresql cluster. :param path: the path | STRING |
| HIGH | patroni/dcs/etcd3.py | 0 | load and build all postgresql clusters from a single mpp cluster. :param path: the path in dcs where to load cluster(s) | STRING |
| HIGH | patroni/dcs/zookeeper.py | 0 | load and build all postgresql clusters from a single mpp cluster. :param path: the path in dcs where to load cluster(s) | STRING |
| HIGH | patroni/dcs/__init__.py | 0 | load and build all postgresql clusters from a single mpp cluster. :param path: the path in dcs where to load cluster(s) | STRING |
| HIGH | patroni/dcs/etcd.py | 0 | load and build all postgresql clusters from a single mpp cluster. :param path: the path in dcs where to load cluster(s) | STRING |
| HIGH | patroni/dcs/consul.py | 0 | load and build all postgresql clusters from a single mpp cluster. :param path: the path in dcs where to load cluster(s) | STRING |
| HIGH | patroni/dcs/kubernetes.py | 0 | load and build all postgresql clusters from a single mpp cluster. :param path: the path in dcs where to load cluster(s) | STRING |
| HIGH | patroni/dcs/raft.py | 0 | load and build all postgresql clusters from a single mpp cluster. :param path: the path in dcs where to load cluster(s) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patroni/dynamic_loader.py | 13 | CODE | |
| LOW | patroni/global_config.py | 17 | CODE | |
| LOW | patroni/ctl.py | 51 | CODE | |
| LOW | patroni/psycopg.py | 10 | CODE | |
| LOW | patroni/psycopg.py | 11 | CODE | |
| LOW | patroni/psycopg.py | 11 | CODE | |
| LOW | patroni/psycopg.py | 23 | CODE | |
| LOW | patroni/psycopg.py | 23 | CODE | |
| LOW | patroni/psycopg.py | 23 | CODE | |
| LOW | patroni/psycopg.py | 23 | CODE | |
| LOW | patroni/psycopg.py | 75 | CODE | |
| LOW | patroni/psycopg.py | 75 | CODE | |
| LOW | patroni/psycopg.py | 75 | CODE | |
| LOW | patroni/psycopg.py | 75 | CODE | |
| LOW | patroni/utils.py | 37 | CODE | |
| LOW | patroni/config_generator.py | 16 | CODE | |
| LOW | patroni/__main__.py | 23 | CODE | |
| LOW | patroni/__main__.py | 24 | CODE | |
| LOW | patroni/postgresql/bootstrap.py | 17 | CODE | |
| LOW | patroni/postgresql/sync.py | 15 | CODE | |
| LOW | patroni/postgresql/config.py | 28 | CODE | |
| LOW | patroni/postgresql/slots.py | 25 | CODE | |
| LOW | patroni/postgresql/slots.py | 26 | CODE | |
| LOW | patroni/postgresql/slots.py | 28 | CODE | |
| LOW | patroni/postgresql/__init__.py | 40 | CODE | |
| LOW | patroni/postgresql/__init__.py | 40 | CODE | |
| LOW | patroni/postgresql/__init__.py | 41 | CODE | |
| LOW | patroni/postgresql/__init__.py | 41 | CODE | |
| LOW | patroni/postgresql/connection.py | 8 | CODE | |
| LOW | patroni/postgresql/connection.py | 8 | CODE | |
| LOW | patroni/postgresql/mpp/__init__.py | 15 | CODE | |
| LOW | patroni/postgresql/mpp/__init__.py | 16 | CODE | |
| LOW | patroni/postgresql/mpp/citus.py | 16 | CODE | |
| LOW | patroni/watchdog/__init__.py | 1 | CODE | |
| LOW | patroni/watchdog/__init__.py | 1 | CODE | |
| LOW | patroni/scripts/barman/config_switch.py | 27 | CODE | |
| LOW | patroni/scripts/barman/recover.py | 27 | CODE | |
| LOW | patroni/dcs/zookeeper.py | 22 | CODE | |
| LOW | patroni/dcs/__init__.py | 27 | CODE | |
| LOW | patroni/dcs/__init__.py | 28 | CODE | |
| LOW | patroni/dcs/__init__.py | 30 | CODE | |
| LOW | patroni/dcs/etcd.py | 33 | CODE | |
| LOW | patroni/dcs/consul.py | 27 | CODE | |
| LOW | patroni/dcs/kubernetes.py | 33 | CODE | |
| LOW | patroni/dcs/raft.py | 33 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | postgres1.yml | 1 | scope: batman | COMMENT |
| LOW | postgres1.yml | 21 | #citus: | COMMENT |
| LOW | postgres1.yml | 61 | # For kerberos gss based connectivity (discard @.*$) | COMMENT |
| LOW | postgres0.yml | 1 | scope: batman | COMMENT |
| LOW | postgres0.yml | 21 | #citus: | COMMENT |
| LOW | postgres0.yml | 41 | # self_addr: 127.0.0.1:2222 | COMMENT |
| LOW | postgres0.yml | 61 | #host: 127.0.0.1 | COMMENT |
| LOW | postgres0.yml | 81 | # max_replication_slots: 10 | COMMENT |
| LOW | postgres0.yml | 121 | parameters: | COMMENT |
| LOW | docker-compose-citus.yml | 1 | # docker compose file for running a Citus cluster | COMMENT |
| LOW | postgres2.yml | 21 | #citus: | COMMENT |
| LOW | postgres2.yml | 61 | # For kerberos gss based connectivity (discard @.*$) | COMMENT |
| LOW | patroni/api.py | 81 | # A hacky way to have decorators that work with and without parameters. | COMMENT |
| LOW | patroni/postgresql/config.py | 341 | 'old_value': (maybe_convert_from_base_unit(str_value(old_value), vartype, unit) | COMMENT |
| LOW | patroni/postgresql/postmaster.py | 301 | # it is hard to know the current state of postgres startup, so we had to reimplement pg_ctl start | COMMENT |
| LOW | patroni/scripts/wale_restore.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | docs/conf.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | docs/conf.py | 81 | author = 'Patroni Contributors' | COMMENT |
| LOW | docs/conf.py | 141 | COMMENT | |
| LOW | docs/conf.py | 161 | COMMENT | |
| LOW | kubernetes/citus_k8s.yaml | 241 | - name: pgdata | COMMENT |
| LOW | kubernetes/patroni_k8s.yaml | 101 | - name: pgdata | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patroni/validator.py | 151 | # Check if "socket.IF_INET" or "socket.IF_INET6" is being used and instantiate a socket with the identified | COMMENT |
| LOW | patroni/ha.py | 977 | # Check if manage_synchronized_standby_slots feature state changed even when no sync changes | COMMENT |
| LOW | patroni/ha.py | 1029 | # Check if manage_synchronized_standby_slots feature state changed | COMMENT |
| LOW | patroni/ha.py | 2274 | # Check if we are in startup, when paused defer to main loop for manual failovers. | COMMENT |
| LOW | patroni/ha.py | 2373 | # Check if we tried to recover from postgres crash and failed | COMMENT |
| LOW | patroni/postgresql/config.py | 1277 | # Check if any parameter was set back to the current pg_settings value | COMMENT |
| LOW | patroni/postgresql/mpp/citus.py | 657 | # Add the task to the list if Worker node state is different from the cached `pg_dist_group` | COMMENT |
| LOW | tests/test_patroni.py | 322 | # Set role to REPLICA | COMMENT |
| LOW | tests/test_patroni.py | 344 | # Set role to REPLICA and mark it as already processed | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | patroni/api.py | 2052 | # Define the Server header response using the server_tokens option. | COMMENT |
| MEDIUM | patroni/dcs/zookeeper.py | 41 | """This method is trying to establish connection with one of the zookeeper nodes. | STRING |
| MEDIUM | patroni/dcs/__init__.py | 1857 | # This method is always called with ``optime`` key, rest of the keys are optional. | COMMENT |
| MEDIUM | docs/conf.py | 7 | # This file is execfile()d with the current directory set to its | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patroni/ha.py | 1836 | # If the scheduled action is in the far future, we shouldn't do anything and just return. | COMMENT |
| LOW | patroni/postgresql/validator.py | 465 | # likely an extension GUC, so just return as it is. Otherwise, if `name` is in `parameters`, it's likely a | COMMENT |
| LOW | patroni/postgresql/validator.py | 488 | # just pass down the list of settings defined in Patroni validators so :func:`_transform_parameter_value` will not | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patroni/utils.py | 658 | CODE | |
| LOW | tests/test_ha.py | 112 | CODE |