+
    G%@i7                         ^ RI t ^ RIt^ RIHtHt RtRtR]R,           R]R,           R	]R
,           R]R,           R]R,           R]R,           R]R,           R]R,           /t]R	,           R2tRt	Rt
Rt ! R R]]4      tR# )    N)PluginUbuntuPluginz#/var/snap/charmed-postgresql/commonz$/var/snap/charmed-postgresql/currentPOSTGRESQL_CONFz/var/lib/postgresqlPOSTGRESQL_LOGSz/var/log/postgresqlPATRONI_CONFz/etc/patroniPATRONI_LOGSz/var/log/patroniPGBACKREST_CONFz/etc/pgbackrestPGBACKREST_LOGSz/var/log/pgbackrestPGBOUNCER_CONFz/etc/pgbouncerPGBOUNCER_LOGSz/var/log/pgbouncerz/patroni.yamlsnap_daemonzcharmed-postgresql.psqlzcharmed-postgresql.patronictlc                   p   a  ] tR t^#t o RtRtRt]V 3R lR l4       t]V 3R lR l4       t	R t
R tR	tV tR
# )CharmedPostgreSQLzCharmed PostgreSQLcharmed_postgresqlc                    < V ^8  d   QhRS[ /#    returnstr)format__classdict__s   "G/usr/lib/python3/dist-packages/sos/report/plugins/charmed_postgresql.py__annotate__CharmedPostgreSQL.__annotate__*   s     6 6 6    c                    R \          2# )z--config-file )PATRONI_CONFIG_FILEselfs   &r   patronictl_args!CharmedPostgreSQL.patronictl_args)   s     3455r   c                    < V ^8  d   QhRS[ /# r   r   )r   r   s   "r   r   r   .   s     - -3 -r   c                V    R V P                    RV P                   RV P                   R2# )z-U z -h z -p z -d postgres -P pager=off)postgresql_usernamepostgresql_hostpostgresql_portr   s   &r   	psql_argsCharmedPostgreSQL.psql_args-   sA    d../ 0**+ ,**+ ,,, 	-r   c                Z   V P                  \        R ,           R2\        R,           R2.4       V P                  \        R,           R2\        R,           \        R ,           R2\        R,           \        R,           \        R	,           \        R,           \        R
,           .4       V P                  R4       V P	                  RRR7        \        \        RR7      ;_uu_ 4       p\        P                  ! V4      pRRR4       XR,          V n	        VR,          pVR,          P                  R4      pVw  V n        V n        VR,          pVR,          pVR,          V n        VR,          V n        T P	                  \,         RT P.                   RT P                   2R\0        R7       T P	                  \,         RT P.                   R T P                   2R!\0        R7       T P	                  \,         RT P.                   R"T P                   2R#\0        R7       T P                  \2        P4                  R$&   T P	                  \6         RT P8                   R%2R&\0        R7       T P	                  \6         RT P8                   R'2R(\0        R7       T P	                  \6         RT P8                   R)2R*\0        R7       R#   + '       g   i     EL; i  \        \        P                   \"        \$        \&        \(        3 d'   pT P+                  R\         RT 24        Rp?R# Rp?ii ; i)+r   z/*.pemr   r   z/*.conf*r   z/*.y*mlr   r	   r
   r   zsnap.charmed-postgresql.*zsnap info charmed-postgresqlz	snap-info)suggest_filenamezutf-8)encodingNscope
postgresqlconnect_address:authentication	superuserusernamepasswordzVCan not run additional commands due to an error on opening or parsing the config file z:  z
 topology zpatroni-topology)r+   runasz	 history zpatroni-historyz show-config zpatroni-dcs-config
PGPASSWORDz	 -c '\l+'zpostgresql-databasesz -c '\duS+'zpostgresql-usersz -c '\dtS+'zpostgresql-tables)add_forbidden_pathPATHSadd_copy_specadd_journaladd_cmd_outputopenr   yaml	safe_loadpatroni_cluster_namesplitr&   r'   r%   postgresql_passwordOSError	YAMLError	TypeError
ValueErrorKeyErrorAttributeError	_log_warn
PATRONICTLr!   RUNASosenvironPSQLr(   )r    fpatroni_configr.   	host_portr1   r2   errors   &       r   setupCharmedPostgreSQL.setup4   sN    	^$%V,%&'v.!
 	 	&'(1&'(^$%W-^$%&'(&'(%&'%&'	
 		 	45 	*( 	 	
	)G<<!%!2 =(6w(?D%'5J"#45;;C@I9B6D $"6'(89N&{3I'0'<D$'0'<D$ 	|1T112 32235/	 	 	
 	|1T112 31124.	 	 	
 	|1T112 3 55681	 	 	
 $(#;#;

<  	vQt~~& ' 3	 	 	
 	vQt~~& ' /	 	 	
 	vQt~~& ' 0	 	 	
I =<< Hn6 	NN M12"#W& ' 	s1   K +KA4K K		K /L*L%%L*c                   R \         P                  9   d   \         P                  R  V P                  \        R,           R2RR4       V P                  \        R,           R2RR4       V P                  \        R	,           R
2RR4       R# )r7   r   z/*z(password: )"?.*"?z\1"*********"r	   z/pgbackrest.confz(.*s3-key.*=).*z\1*********r   z/pgbouncer/userlist.txtz(".*" )".*"N)rL   rM   do_path_regex_subr9   r   s   &r   postprocCharmedPostgreSQL.postproc   s     2::%

<( 	^$%R(!	
 	&'((89	
 	%&''>?	
r   )r@   r&   rB   r'   r%   N)zcharmed-postgresql)__name__
__module____qualname____firstlineno__
short_descplugin_namepackagespropertyr!   r(   rS   rW   __static_attributes____classdictcell__)r   s   @r   r   r   #   sK     %J&K&H6 6 - -l
\
 
r   r   )rL   r>   sos.report.pluginsr   r   SNAP_COMMON_PATHSNAP_CURRENT_PATHr9   r   rK   rN   rJ   r    r   r   <module>rg      s    
  38 :  '*??'*??%6$'99(+<<'*??'*::&)==		 ~./}=  ,
\
 \
r   