{"id":38232,"date":"2019-10-31T22:22:28","date_gmt":"2019-10-31T19:22:28","guid":{"rendered":"https:\/\/prohoster.info\/blog\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql\/"},"modified":"2019-10-31T22:22:28","modified_gmt":"2019-10-31T19:22:28","slug":"odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql","status":"publish","type":"post","link":"https:\/\/prohoster.info\/es\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql","title":{"rendered":"Uno de los m\u00e9todos para obtener el historial de bloqueos en PostgreSQL.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Continuaci\u00f3n del art\u00edculo &#171;<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467181\/\">Intento de crear un an\u00e1logo de ASH para PostgreSQL <\/a><\/noindex>\u00ab.<\/p>\n<p>En este art\u00edculo se examinar\u00e1 y se mostrar\u00e1n consultas y ejemplos espec\u00edficos sobre la informaci\u00f3n \u00fatil que se puede obtener a trav\u00e9s de la vista de pg_locks.<\/p>\n<blockquote><p>Advertencia.<br \/>\nDebido a la novedad del tema y a que el per\u00edodo de prueba no ha finalizado, el art\u00edculo puede contener errores. Se agradecen y se esperan cr\u00edticas y comentarios.<\/p><\/blockquote>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>Datos de entrada<\/h2>\n<p><\/p>\n<h3>Vista de pg_locks<\/h3>\n<p>\n<b class=\"spoiler_title\">archive_locking<\/b><\/p>\n<pre><code class=\"pgsql\">CREAR TABLA archive_locking \n(       timepoint timestamp sin zona horaria ,\n\tlocktype text ,\n\trelacion oid ,\n\tmode text ,\n\ttid xid ,\n\tvtid text ,\n\tpid entero ,\n\tblocking_pids entero[] ,\n\tgranted boolean ,\n        queryid bigint \n);<\/code><\/pre>\n<p>\nFundamentalmente, la tabla es an\u00e1loga a la tabla <b>archive_pg_stat_activity<\/b>, descrita m\u00e1s detalladamente aqu\u00ed \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467277\/\">pg_stat_statements + pg_stat_activity + loq_query = pg_ash? <\/a><\/noindex> y aqu\u00ed \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467181\/\">Intento de crear un an\u00e1logo de ASH para PostgreSQL.<\/a><\/noindex><\/p>\n<p>Para llenar la columna <b>queryid<\/b> se utiliza la funci\u00f3n <\/p>\n<p><b class=\"spoiler_title\">update_history_locking_by_queryid<\/b><\/p>\n<pre><code class=\"pgsql\">--update_history_locking_by_queryid.sql\nCREAR O REEMPLAZAR FUNCI\u00d3N update_history_locking_by_queryid() DEVUELVE boolean AS $$\nDECLARE\n  resultado boolean ;\n  minuto_actual doble precisi\u00f3n ; \n  \n  minuto_inicio entero ;\n  minuto_fin entero ;\n  \n  periodo_inicio timestamp sin zona horaria ;\n  periodo_fin timestamp sin zona horaria ;\n  \n  lock_rec registro ; \n  endpoint_rec registro ; \n  \n  diferencia_hora_actual doble precisi\u00f3n ;\nBEGIN\n  RAISE NOTICE '***update_history_locking_by_queryid';\n  \n  resultado = TRUE ;\n  \n  minuto_actual = extract ( minuto desde ahora() );\n\n  SELECT * FROM endpoint WHERE is_need_monitoring\n  INTO endpoint_rec ;\n  \n  diferencia_hora_actual = endpoint_rec.hour_diff ;\n  \n  IF minuto_actual &lt; 5 \n  THEN\n\tRAISE NOTICE &#039;El tiempo actual es menos de 5 minutos.&#039;;\n\t\n\tperiodo_inicio = date_trunc(&#039;hour&#039;,ahora()) + (diferencia_hora_actual * interval &#039;1 hora&#039;);\n    periodo_fin = periodo_inicio - interval &#039;5 minutos&#039; ;\n  ELSE \n    minuto_fin =  extract ( minuto desde ahora() ) \/ 5 ;\n    minuto_inicio =  minuto_fin - 1 ;\n  \n    periodo_inicio = date_trunc(&#039;hour&#039;,ahora()) + interval &#039;1 minuto&#039;*minuto_inicio*5+(diferencia_hora_actual * interval &#039;1 hora&#039;);\n    periodo_fin = date_trunc(&#039;hour&#039;,ahora()) + interval &#039;1 minuto&#039;*minuto_fin*5+(diferencia_hora_actual * interval &#039;1 hora&#039;) ;\n    \n  END IF ;  \n  \n  RAISE NOTICE &#039;periodo_inicio = %&#039;, periodo_inicio;\n  RAISE NOTICE &#039;periodo_fin = %&#039;, periodo_fin;\n\n\tFOR lock_rec IN   \n\tWITH act_queryid AS\n\t (\n\t\tSELECT \n\t\t\t\tpid , \n\t\t\t\ttimepoint ,\n\t\t\t\tquery_start AS started ,\t\t\t\n\t\t\t\tMAX(timepoint) OVER (PARTITION BY pid ,\tquery_start   ) AS finished ,\t\t\t\n\t\t\t\tqueryid \n\t\tFROM \n\t\t\t\tactivity_hist.history_pg_stat_activity \t\t\t\n\t\tWHERE \t\t\t\n\t\t\t\ttimepoint ENTRE periodo_inicio y \n\t\t\t\t\t\t\t\t  periodo_fin\n\t\tGROUP BY \n\t\t\t\tpid , \n\t\t\t\ttimepoint ,  \n\t\t\t\tquery_start ,\n\t\t\t\tqueryid \n\t ),\n\t lock_pids AS\n\t\t(\n\t\t\tSELECT\n\t\t\t\thl.pid , \n\t\t\t\thl.locktype  ,\n\t\t\t\thl.mode ,\n\t\t\t\thl.timepoint , \n\t\t\t\tMIN ( timepoint ) OVER (PARTITION BY pid , locktype  ,mode ) como started \n\t\t\tFROM \n\t\t\t\tactivity_hist.history_locking hl\n\t\t\tWHERE \n\t\t\t\thl.timepoint entre periodo_inicio y \n\t\t\t\t\t\t\t\t     periodo_fin\n\t\t\tGROUP BY \n\t\t\t\thl.pid , \n\t\t\t\thl.locktype  ,\n\t\t\t\thl.mode ,\n\t\t\t\thl.timepoint \n\t\t)\n\tSELECT \n\t\tlp.pid , \n\t\tlp.locktype  ,\n\t\tlp.mode ,\n\t\tlp.timepoint ,     \n\t\taq.queryid \n\tFROM lock_pids \tlp LEFT OUTER JOIN act_queryid aq ON ( lp.pid = aq.pid AND lp.started ENTRE aq.started Y aq.finished )\n\tWHERE aq.queryid NO ES NULO \n\tGROUP BY  \n\t\tlp.pid , \n\t\tlp.locktype  ,\n\t\tlp.mode ,\n\t\tlp.timepoint , \n\t\taq.queryid\n\tLOOP\n\t\tUPDATE activity_hist.history_locking SET queryid = lock_rec.queryid \n\t\tWHERE pid = lock_rec.pid AND locktype = lock_rec.locktype AND mode = lock_rec.mode AND timepoint = lock_rec.timepoint ;\t\n\tEND LOOP;    \n  \n  DEVOLVER resultado ;\nEND\n$$ LENGUAJE plpgsql;<\/code><\/pre>\n<p>\n<b>Explicaci\u00f3n:<\/b> El valor de la columna queryid se actualiza en la tabla history_locking, y luego, al crear una nueva secci\u00f3n para la tabla archive_locking, el valor se guardar\u00e1 en los valores hist\u00f3ricos. <\/p>\n<h2>Datos de salida<\/h2>\n<p>\nInformaci\u00f3n general sobre los procesos en general.<\/p>\n<h3>ESPERANDO BLOQUEOS POR TIPOS DE BLOQUEO<\/h3>\n<p>\n<b class=\"spoiler_title\">Consulta<\/b><\/p>\n<pre><code class=\"pgsql\">CON\nt COMO\n(\n\tSELECCIONAR \n\t\ttipobloqueo,\n\t\tmodo,\n\t\tconteo(*) como total \n\tDE\n\t\tactivity_hist.archive_locking\n\tD\u00d3NDE\n\t\ttiempos entre pg_stat_history_begin+(current_hour_diff * intervalo '1 hora') Y pg_stat_history_end+(current_hour_diff * intervalo '1 hora') Y \n\t\tNO concedido\n\tAGRUPE POR\n\t\ttipobloqueo,\n\t\tmodo\n)\nSELECCIONAR\n\ttipobloqueo,\n\tmodo,\n\ttotal * intervalo '1 segundo' como duraci\u00f3n\t\t\t\nDE t \t\t\nORDENAR POR 3 DESC <\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Ejemplo<\/b><\/p>\n<pre>| ESPERANDO BLOQUEOS POR TIPOS DE BLOQUEO\n+--------------------+------------------------------+--------------------\n|            tipobloqueo|                          modo|            duraci\u00f3n\n+--------------------+------------------------------+--------------------\n|       transactionid|                     ShareLock|            19:39:26\n|               tuple|           AccessExclusiveLock|            00:03:35\n+--------------------+------------------------------+--------------------\n<\/pre>\n<p><\/p>\n<h3>TOMAS DE BLOQUEOS POR TIPOS DE BLOQUEO<\/h3>\n<p>\n<b class=\"spoiler_title\">Consulta<\/b><\/p>\n<pre><code class=\"pgsql\">CON\nt COMO\n(\n\tSELECCIONAR \n\t\ttipobloqueo,\n\t\tmodo,\n\t\tconteo(*) como total \n\tDE\n\t\tactivity_hist.archive_locking\n\tD\u00d3NDE\n\t\ttiempos entre pg_stat_history_begin+(current_hour_diff * intervalo '1 hora') Y pg_stat_history_end+(current_hour_diff * intervalo '1 hora') Y \n\t\tconcedido\n\tAGRUPE POR\n\t\ttipobloqueo,\n\t\tmodo\n)\nSELECCIONAR\n\ttipobloqueo,\n\tmodo,\n\ttotal * intervalo '1 segundo' como duraci\u00f3n\t\t\t\nDE t \t\t\nORDENAR POR 3 DESC <\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Ejemplo<\/b><\/p>\n<pre>| TOMAS DE BLOQUEOS POR TIPOS DE BLOQUEO\n+--------------------+------------------------------+--------------------\n|            tipobloqueo|                          modo|            duraci\u00f3n\n+--------------------+------------------------------+--------------------\n|            relaci\u00f3n|              RowExclusiveLock|            51:11:10\n|          virtualxid|                 ExclusiveLock|            48:10:43\n|       transactionid|                 ExclusiveLock|            44:24:53\n|            relaci\u00f3n|               AccessShareLock|            20:06:13\n|               tuple|           AccessExclusiveLock|            17:58:47\n|               tuple|                 ExclusiveLock|            01:40:41\n|            relaci\u00f3n|      ShareUpdateExclusiveLock|            00:26:41\n|              objeto|              RowExclusiveLock|            00:00:01\n|       transactionid|                     ShareLock|            00:00:01\n|              extender|                 ExclusiveLock|            00:00:01\n+--------------------+------------------------------+--------------------\n<\/pre>\n<p>\nInformaci\u00f3n detallada sobre solicitudes con queryid espec\u00edficas.<\/p>\n<h3>ESPERANDO BLOQUEOS POR TIPOS DE BLOQUEO POR QUERYID<\/h3>\n<p>\n<b class=\"spoiler_title\">Consulta<\/b><\/p>\n<pre><code class=\"pgsql\">CON\nlt COMO\n(\n\tSELECCIONAR\n\t\tpid,\n\t\ttipobloqueo,\n\t\tmodo,\n\t\ttiempos,\n\t\tqueryid,\n\t\tblocking_pids,\n                MIN(tiempos) SOBRE (PARTICIONAR POR pid, tipobloqueo, modo) como iniciado \n\tDE\n\t\tactivity_hist.archive_locking\n\tD\u00d3NDE\n\t\ttiempos entre pg_stat_history_begin+(current_hour_diff * intervalo '1 hora') Y \n\t\t\t                  pg_stat_history_end+(current_hour_diff * intervalo '1 hora') Y \n\t\tNO concedido Y\n\t       queryid NO ES NULO \n\tAGRUPE POR\n\t        pid,\n\t\ttipobloqueo,\n\t\tmodo,\n\t\ttiempos,\n\t\tqueryid,\n\t\tblocking_pids \n)\nSELECCIONAR\n        lt.pid,\n\tlt.tipobloqueo,\n\tlt.modo,\t\t\t\n        lt.iniciado,\n\tlt.queryid,\n\tlt.blocking_pids,\n\tCONTAR(*) * intervalo '1 segundo' como duraci\u00f3n\t\t\nDE lt \t\nAGRUPE POR\n\tlt.pid,\n        lt.tipobloqueo,\n\tlt.modo,\t\t\t\n        lt.iniciado,\n        lt.queryid,\n\tlt.blocking_pids \nORDENAR POR 4<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Ejemplo<\/b><\/p>\n<pre>| ESPERANDO BLOQUEOS POR TIPOS DE BLOQUEO POR QUERYID\n+----------+-------------------------+--------------------+------------------------------+--------------------+--------------------+--------------------\n|       pid|                 locktype|                mode|                       started|             queryid|       blocking_pids|            duration\n+----------+-------------------------+--------------------+------------------------------+--------------------+--------------------+--------------------\n|     11288|            transactionid|           ShareLock|    2019-09-17 10:00:00.302936|  389015618226997618|             {11092}|            00:03:34\n|     11626|            transactionid|           ShareLock|    2019-09-17 10:00:21.380921|  389015618226997618|             {12380}|            00:00:29\n|     11626|            transactionid|           ShareLock|    2019-09-17 10:00:21.380921|  389015618226997618|             {11092}|            00:03:25\n|     11626|            transactionid|           ShareLock|    2019-09-17 10:00:21.380921|  389015618226997618|             {12213}|            00:01:55\n|     11626|            transactionid|           ShareLock|    2019-09-17 10:00:21.380921|  389015618226997618|             {12751}|            00:00:01\n|     11629|            transactionid|           ShareLock|    2019-09-17 10:00:24.331935|  389015618226997618|             {11092}|            00:03:22\n|     11629|            transactionid|           ShareLock|    2019-09-17 10:00:24.331935|  389015618226997618|             {12007}|            00:00:01\n|     12007|            transactionid|           ShareLock|    2019-09-17 10:05:03.327933|  389015618226997618|             {11629}|            00:00:13\n|     12007|            transactionid|           ShareLock|    2019-09-17 10:05:03.327933|  389015618226997618|             {11092}|            00:01:10\n|     12007|            transactionid|           ShareLock|    2019-09-17 10:05:03.327933|  389015618226997618|             {11288}|            00:00:05\n|     12213|            transactionid|           ShareLock|    2019-09-17 10:06:07.328019|  389015618226997618|             {12007}|            00:00:10<\/pre>\n<p><\/p>\n<h3>BLOQUEANDO POR TIPOS DE BLOQUEO POR QUERYID<\/h3>\n<p>\n<b class=\"spoiler_title\">Consulta<\/b><\/p>\n<pre><code class=\"pgsql\">CON\nlt COMO\n(\n\tSELECCIONAR\n\t\tpid , \n\t\tlocktype  ,\n\t\tmode ,\n\t\ttimepoint , \n\t\tqueryid , \n\t\tblocking_pids ,\n                MIN ( timepoint ) OVER (PARTITION BY pid , locktype  ,mode ) as started  \n\tDE\n\t\tactivity_hist.archive_locking\n\tDONDE \n\t\ttimepoint entre pg_stat_history_begin+(current_hour_diff * interval '1 hour') Y \n\t\t\t                  pg_stat_history_end+(current_hour_diff * interval '1 hour') Y \n\t\tgranted Y\n\t\tqueryid IS NOT NULL \n\tAGRUPAR POR \n\t        pid , \n\t\tlocktype  ,\n\t\tmode , \n\t\ttimepoint ,\n\t\tqueryid ,\n\t\tblocking_pids \n)\nSELECCIONAR \n        lt.pid , \n\tlt.locktype  ,\n\tlt.mode ,\n\t\t\t\n        lt.started ,\n\tlt.queryid  ,\n\tlt.blocking_pids ,\n\tCOUNT(*)  * interval '1 second'\t as duration\t\t\t\nDE lt \t\nAGRUPAR POR \n\tlt.pid , \n\tlt.locktype  ,\n\tlt.mode ,\n\t\t\t\n        lt.started ,\n\tlt.queryid ,\n\tlt.blocking_pids \nORDENAR POR 4<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Ejemplo<\/b><\/p>\n<pre>| OBTENIENDO BLOQUEOS POR TIPO DE BLOQUEO POR QUERYID\n+----------+-------------------------+--------------------+------------------------------+--------------------+--------------------+--------------------\n|       pid|                 locktype|                mode|                       started|             queryid|       blocking_pids|            duration\n+----------+-------------------------+--------------------+------------------------------+--------------------+--------------------+--------------------\n|     11288|                 relation|    RowExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|             {11092}|            00:03:34\n|     11092|            transactionid|       ExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|                  {}|            00:03:34\n|     11288|                 relation|    RowExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|                  {}|            00:00:10\n|     11092|                 relation|    RowExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|                  {}|            00:03:34\n|     11092|               virtualxid|       ExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|                  {}|            00:03:34\n|     11288|               virtualxid|       ExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|             {11092}|            00:03:34\n|     11288|            transactionid|       ExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|             {11092}|            00:03:34\n|     11288|                    tuple| AccessExclusiveLock|    2019-09-17 10:00:00.302936|  389015618226997618|             {11092}|            00:03:34<\/pre>\n<p>\n<b>Uso del historial de bloqueos al analizar incidentes de rendimiento.<\/b><\/p>\n<ol>\n<li>La consulta con queryid=389015618226997618 ejecutada por el proceso con pid=11288 ha estado esperando el bloqueo desde 2019-09-17 10:00:00 durante 3 minutos.<\/li>\n<li>El bloqueo fue sostenido por el proceso con pid=11092.<\/li>\n<li>El proceso con pid=11092, al ejecutar la consulta con queryid=389015618226997618 desde 2019-09-17 10:00:00, ha mantenido el bloqueo durante 3 minutos.<\/li>\n<\/ol>\n<p><\/p>\n<h2>Summary<\/h2>\n<p>\nAhora, espero que comience lo m\u00e1s interesante y \u00fatil: la recopilaci\u00f3n de estad\u00edsticas y el an\u00e1lisis de casos del historial de esperas y bloqueos. <\/p>\n<p>A futuro, espero crear un conjunto de algunas notas (an\u00e1logo a las metalinks de Oracle).<\/p>\n<p>En general, esta es la raz\u00f3n por la que la metodolog\u00eda utilizada se presenta de la manera m\u00e1s r\u00e1pida posible para el conocimiento general.<\/p>\n<p>En el corto plazo, intentar\u00e9 publicar el proyecto en github.<br \/>\n<br \/>Fuente: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467719\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &#171;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u2014 \u043a\u0430\u043a\u0443\u044e \u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f pg_locks. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u043e\u0432\u0438\u0437\u043d\u043e\u0439 \u0442\u0435\u043c\u044b \u0438 \u043d\u0435\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u0440\u0438\u0442\u0438\u043a\u0430 \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0438 \u043e\u0436\u0438\u0434\u0430\u044e\u0442\u0441\u044f. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-38232","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &quot;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/es\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u0432 PostgreSQL | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &quot;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/es\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:22:28+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:22:28+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Uno de los m\u00e9todos para obtener el historial de bloqueos en PostgreSQL | ProHoster","description":"Continuaci\u00f3n del art\u00edculo \"Intento de crear un an\u00e1logo de ASH para PostgreSQL\". En el art\u00edculo se examinar\u00e1n y mostrar\u00e1n consultas espec\u00edficas.","canonical_url":"https:\/\/prohoster.info\/es\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"es_ES","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u0432 PostgreSQL | ProHoster","og:description":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &quot;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438.","og:url":"https:\/\/prohoster.info\/es\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:22:28+00:00","article:modified_time":"2019-10-31T19:22:28+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"38232","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 21:03:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:13:22","updated":"2026-01-23 21:03:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/38232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/comments?post=38232"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/38232\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media?parent=38232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/categories?post=38232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/tags?post=38232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}