{"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\/hu\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql","title":{"rendered":"Az egyik m\u00f3dszer a PostgreSQL z\u00e1rol\u00e1si t\u00f6rt\u00e9net\u00e9nek lek\u00e9r\u00e9s\u00e9re","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>A cikk folytat\u00e1sa &#171;<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467181\/\">ASH anal\u00f3g l\u00e9trehoz\u00e1sa PostgreSQL-hez <\/a><\/noindex>A &#171;ALTER TABLE&#187; \u00e9s &#171;RENAME TABLE&#187; m\u0171veletekben t\u00e1mogat\u00e1sra ker\u00fclt a &#171;IF EXISTS&#187; felt\u00e9tel, amely lehet\u0151v\u00e9 teszi az oper\u00e1ci\u00f3 v\u00e9grehajt\u00e1s\u00e1t a t\u00e1bla l\u00e9tez\u00e9se eset\u00e9n.<\/p>\n<p>A cikk megvizsg\u00e1lja \u00e9s konkr\u00e9t lek\u00e9rdez\u00e9sekkel \u00e9s p\u00e9ld\u00e1kkal bemutatja, hogy milyen hasznos inform\u00e1ci\u00f3kat nyerhet\u00fcnk a pg_locks n\u00e9zet t\u00f6rt\u00e9net\u00e9b\u0151l.<\/p>\n<blockquote><p>Figyelmeztet\u00e9s.<br \/>\nA t\u00e9ma \u00fajdons\u00e1ga \u00e9s a tesztel\u00e9si id\u0151szak befejezetlens\u00e9ge miatt a cikk hib\u00e1kat tartalmazhat. Kritik\u00e1kat \u00e9s \u00e9szrev\u00e9teleket \u00f6r\u00f6mmel v\u00e1runk.<\/p><\/blockquote>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>Bemeneti adatok<\/h2>\n<p><\/p>\n<h3>A pg_locks n\u00e9zet t\u00f6rt\u00e9nete<\/h3>\n<p>\n<b class=\"spoiler_title\">archive_locking<\/b><\/p>\n<pre><code class=\"pgsql\">CREATE TABLE archive_locking \n(       timepoint timestamp without time zone ,\n\tlocktype text ,\n\trelation oid ,\n\tmode text ,\n\ttid xid ,\n\tvtid text ,\n\tpid integer ,\n\tblocking_pids integer[] ,\n\tgranted boolean ,\n        queryid bigint \n);<\/code><\/pre>\n<p>\nL\u00e9nyeg\u00e9ben a t\u00e1bla az <b>archive_pg_stat_activity<\/b>t\u00e1bl\u00e1hoz hasonl\u00f3, amely r\u00e9szletesebben van le\u00edrva itt \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467277\/\">pg_stat_statements + pg_stat_activity + loq_query = pg_ash? <\/a><\/noindex> \u00e9s itt \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467181\/\">ASH anal\u00f3g l\u00e9trehoz\u00e1sa PostgreSQL-hez.<\/a><\/noindex><\/p>\n<p>A <b>queryid<\/b> oszlop kit\u00f6lt\u00e9s\u00e9hez <\/p>\n<p><b class=\"spoiler_title\">az update_history_locking_by_queryid f\u00fcggv\u00e9ny ker\u00fcl felhaszn\u00e1l\u00e1sra.<\/b><\/p>\n<pre><code class=\"pgsql\">--update_history_locking_by_queryid.sql\nCREATE OR REPLACE FUNCTION update_history_locking_by_queryid() RETURNS boolean AS $$\nDECLARE\n  result boolean ;\n  current_minute double precision ; \n  \n  start_minute integer ;\n  finish_minute integer ;\n  \n  start_period timestamp without time zone ;\n  finish_period timestamp without time zone ;\n  \n  lock_rec record ; \n  endpoint_rec record ; \n  \n  current_hour_diff double precision ;\nBEGIN\n  RAISE NOTICE '***update_history_locking_by_queryid';\n  \n  result = TRUE ;\n  \n  current_minute = extract ( minute from now() );\n\n  SELECT * FROM endpoint WHERE is_need_monitoring\n  INTO endpoint_rec ;\n  \n  current_hour_diff = endpoint_rec.hour_diff ;\n  \n  IF current_minute &lt; 5 \n  THEN\n\tRAISE NOTICE &#039;Current time is less than 5 minute.&#039;;\n\t\n\tstart_period = date_trunc(&#039;hour&#039;,now()) + (current_hour_diff * interval &#039;1 hour&#039;);\n    finish_period = start_period - interval &#039;5 minute&#039; ;\n  ELSE \n    finish_minute =  extract ( minute from now() ) \/ 5 ;\n    start_minute =  finish_minute - 1 ;\n  \n    start_period = date_trunc(&#039;hour&#039;,now()) + interval &#039;1 minute&#039;*start_minute*5+(current_hour_diff * interval &#039;1 hour&#039;);\n    finish_period = date_trunc(&#039;hour&#039;,now()) + interval &#039;1 minute&#039;*finish_minute*5+(current_hour_diff * interval &#039;1 hour&#039;) ;\n    \n  END IF ;  \n  \n  RAISE NOTICE &#039;start_period = %&#039;, start_period;\n  RAISE NOTICE &#039;finish_period = %&#039;, finish_period;\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 BETWEEN start_period and \n\t\t\t\t\t\t\t\t  finish_period\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 ) as started \n\t\t\tFROM \n\t\t\t\tactivity_hist.history_locking hl\n\t\t\tWHERE \n\t\t\t\thl.timepoint between start_period and \n\t\t\t\t\t\t\t\t     finish_period\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 BETWEEN aq.started AND aq.finished )\n\tWHERE aq.queryid IS NOT NULL \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  RETURN result ;\nEND\n$$ LANGUAGE plpgsql;<\/code><\/pre>\n<p>\n<b>Magyar\u00e1zat:<\/b> a queryid oszlop \u00e9rt\u00e9ke friss\u00fcl a history_locking t\u00e1bl\u00e1ban, \u00e9s ezut\u00e1n, amikor \u00faj szekci\u00f3t hoznak l\u00e9tre az archive_locking t\u00e1bl\u00e1hoz, az \u00e9rt\u00e9k a t\u00f6rt\u00e9nelmi adatokban lesz t\u00e1rolva. <\/p>\n<h2>Kimeneti adatok<\/h2>\n<p>\n\u00c1ltal\u00e1nos inform\u00e1ci\u00f3k, a folyamatok \u00f6sszess\u00e9g\u00e9r\u0151l.<\/p>\n<h3>LOCKT\u00cdPUSOK \u00c1LTALI Z\u00c1RAK V\u00c1R\u00c1SA<\/h3>\n<p>\n<b class=\"spoiler_title\">Lek\u00e9rdez\u00e9s<\/b><\/p>\n<pre><code class=\"pgsql\">WITH\nt AS\n(\n\tSELECT \n\t\tlocktype  ,\n\t\tmode ,\n\t\tcount(*) as total \n\tFROM \n\t\tactivity_hist.archive_locking\n\tWHERE \n\t\ttimepoint between pg_stat_history_begin+(current_hour_diff * interval '1 hour') AND pg_stat_history_end+(current_hour_diff * interval '1 hour') AND \n\t\tNOT granted\n\tGROUP BY \n\t\tlocktype  ,\n\t\tmode  \n)\nSELECT \n\tlocktype  ,\n\tmode ,\n\ttotal * interval '1 second' as duration\t\t\t\nFROM t \t\t\nORDER BY 3 DESC <\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">t\u00e1mad\u00e1sra<\/b><\/p>\n<pre>| Z\u00c1RRAK V\u00c1R\u00c1SA Z\u00c1RT\u00cdPUSOK SZERINT\n+--------------------+------------------------------+--------------------\n|            z\u00e1rtipus|                          m\u00f3d|            id\u0151tartam\n+--------------------+------------------------------+--------------------\n|       transactionid|                     ShareLock|            19:39:26\n|               tuple|           AccessExclusiveLock|            00:03:35\n+--------------------+------------------------------+--------------------\n<\/pre>\n<p><\/p>\n<h3>Z\u00c1RRAK FELV\u00c9TELE Z\u00c1RT\u00cdPUSOK SZERINT<\/h3>\n<p>\n<b class=\"spoiler_title\">Lek\u00e9rdez\u00e9s<\/b><\/p>\n<pre><code class=\"pgsql\">WITH\nt AS\n(\n\tSELECT \n\t\tz\u00e1rtipus  ,\n\t\tm\u00f3d ,\n\t\tcount(*) as \u00f6sszes \n\tFROM \n\t\tactivity_hist.archive_locking\n\tWHERE \n\t\ttimepoint between pg_stat_history_begin+(current_hour_diff * interval '1 hour') AND pg_stat_history_end+(current_hour_diff * interval '1 hour') AND \n\t\tgranted\n\tGROUP BY \n\t\tz\u00e1rtipus  ,\n\t\tm\u00f3d  \n)\nSELECT \n\tz\u00e1rtipus  ,\n\tm\u00f3d ,\n\ts \u00f6sszes * interval '1 m\u00e1sodperc' as id\u0151tartam\t\t\t\nFROM t \t\t\nORDER BY 3 DESC <\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">t\u00e1mad\u00e1sra<\/b><\/p>\n<pre>| Z\u00c1RRAK FELV\u00c9TELE Z\u00c1RT\u00cdPUSOK SZERINT\n+--------------------+------------------------------+--------------------\n|            z\u00e1rtipus|                          m\u00f3d|            id\u0151tartam\n+--------------------+------------------------------+--------------------\n|            relation|              RowExclusiveLock|            51:11:10\n|          virtualxid|                 ExclusiveLock|            48:10:43\n|       transactionid|                 ExclusiveLock|            44:24:53\n|            relation|               AccessShareLock|            20:06:13\n|               tuple|           AccessExclusiveLock|            17:58:47\n|               tuple|                 ExclusiveLock|            01:40:41\n|            relation|      ShareUpdateExclusiveLock|            00:26:41\n|              object|              RowExclusiveLock|            00:00:01\n|       transactionid|                     ShareLock|            00:00:01\n|              extend|                 ExclusiveLock|            00:00:01\n+--------------------+------------------------------+--------------------\n<\/pre>\n<p>\nR\u00e9szletes inform\u00e1ci\u00f3k az adott queryid lek\u00e9rdez\u00e9sekr\u0151l<\/p>\n<h3>Z\u00c1RRAK V\u00c1R\u00c1SA Z\u00c1RT\u00cdPUSOK SZERINT QUERYID ALAPJ\u00c1N<\/h3>\n<p>\n<b class=\"spoiler_title\">Lek\u00e9rdez\u00e9s<\/b><\/p>\n<pre><code class=\"pgsql\">WITH\nlt AS\n(\n\tSELECT\n\t\tpid , \n\t\tz\u00e1rtipus  ,\n\t\tm\u00f3d ,\n\t\ttimepoint , \n\t\tqueryid , \n\t\tblocking_pids ,\n                MIN ( timepoint ) OVER (PARTITION BY pid , z\u00e1rtipus  ,m\u00f3d ) as elindult  \n\tFROM \n\t\tactivity_hist.archive_locking\n\tWHERE \n\t\ttimepoint between pg_stat_history_begin+(current_hour_diff * interval '1 hour') AND \n\t\t\t                  pg_stat_history_end+(current_hour_diff * interval '1 hour') AND \n\t\tNOT granted AND\n\t       queryid IS NOT NULL \n\tGROUP BY \n\t        pid , \n\t\tz\u00e1rtipus  ,\n\t\tm\u00f3d ,\n\t\ttimepoint ,\n\t\tqueryid ,\n\t\tblocking_pids \n)\nSELECT \n        lt.pid , \n\tlt.z\u00e1rtipus  ,\n\tlt.m\u00f3d ,\t\t\t\n        lt.elindult ,\n\tlt.queryid  ,\n\tlt.blocking_pids ,\n\tCOUNT(*)  * interval '1 m\u00e1sodperc'\t as id\u0151tartam\t\t\nFROM lt \t\nGROUP BY \n\tlt.pid , \n        lt.z\u00e1rtipus  ,\n\tlt.m\u00f3d ,\t\t\t\n        lt.elindult ,\n        lt.queryid ,\n\tlt.blocking_pids \nORDER BY 4<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">t\u00e1mad\u00e1sra<\/b><\/p>\n<pre>| Z\u00c1RRAK V\u00c1RAK A Z\u00c1RK\u00c9PEK \u00c9S K\u00c9RD\u00c9S AZONOS\u00cdT\u00d3K SZERINT\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>Z\u00c1RRAK FELV\u00c9TELE A Z\u00c1RK\u00c9PEK \u00c9S K\u00c9RD\u00c9S AZONOS\u00cdT\u00d3K SZERINT<\/h3>\n<p>\n<b class=\"spoiler_title\">Lek\u00e9rdez\u00e9s<\/b><\/p>\n<pre><code class=\"pgsql\">WITH\nlt AS\n(\n\tSELECT\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\tFROM \n\t\tactivity_hist.archive_locking\n\tWHERE \n\t\ttimepoint between pg_stat_history_begin+(current_hour_diff * interval '1 hour') AND \n\t\t\t                  pg_stat_history_end+(current_hour_diff * interval '1 hour') AND \n\t\tgranted AND\n\t\tqueryid IS NOT NULL \n\tGROUP BY \n\t        pid , \n\t\tlocktype  ,\n\t\tmode ,\n\t\ttimepoint ,\n\t\tqueryid ,\n\t\tblocking_pids \n)\nSELECT \n        lt.pid , \n\tlt.locktype  ,\n\tlt.mode ,\t\t\t\n        lt.started ,\n\tlt.queryid  ,\n\tlt.blocking_pids ,\n\tCOUNT(*)  * interval '1 second'\t as duration\t\t\t\nFROM lt \t\nGROUP BY \n\tlt.pid , \n\tlt.locktype  ,\n\tlt.mode ,\t\t\t\n        lt.started ,\n\tlt.queryid ,\n\tlt.blocking_pids \nORDER BY 4<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">t\u00e1mad\u00e1sra<\/b><\/p>\n<pre>| Z\u00c1R TAKAR\u00cdT\u00c1S Z\u00c1R T\u00cdPUSOK ALAPJ\u00c1N K\u00c9R\u00c9S ID\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>A z\u00e1rol\u00e1sok t\u00f6rt\u00e9net\u00e9nek haszn\u00e1lata a teljes\u00edtm\u00e9nyprobl\u00e9m\u00e1k elemz\u00e9sekor.<\/b><\/p>\n<ol>\n<li>A queryid=389015618226997618 azonos\u00edt\u00f3j\u00fa k\u00e9r\u00e9s, amelyet a 11288-as pid-j\u0171 folyamat v\u00e9gzett, 2019-09-17 10:00:00-t\u00f3l 3 perc alatt v\u00e1rta a z\u00e1rol\u00e1st.<\/li>\n<li>A z\u00e1rol\u00e1st a 11092-es pid-j\u0171 folyamat tartotta fenn.<\/li>\n<li>A 11092-es pid-j\u0171 folyamat, amely a 389015618226997618 queryid-j\u00fa k\u00e9r\u00e9st futtatta, 2019-09-17 10:00:00-t\u00f3l 3 percig fenntartotta a z\u00e1rol\u00e1st.<\/li>\n<\/ol>\n<p><\/p>\n<h2>Result<\/h2>\n<p>\nMost, rem\u00e9lem, elkezd\u0151dik a leg\u00e9rdekesebb \u00e9s leghasznosabb - a statisztikai adatok gy\u0171jt\u00e9se \u00e9s a v\u00e1rakoz\u00e1sok valamint z\u00e1rol\u00e1sok t\u00f6rt\u00e9net\u00e9nek esetfelm\u00e9r\u00e9se. <\/p>\n<p>A j\u00f6v\u0151ben rem\u00e9lj\u00fck, siker\u00fcl majd egyfajta jegyzetek gy\u0171jtem\u00e9nye, hasonl\u00f3an az Oracle metalinkhez.<\/p>\n<p>Egy\u00e9bk\u00e9nt pontosan ezen okb\u00f3l kifoly\u00f3lag a haszn\u00e1lt m\u00f3dszer a lehet\u0151 leggyorsabban megjelenik a k\u00f6z\u00f6ns\u00e9g sz\u00e1m\u00e1ra.<\/p>\n<p>A lehet\u0151 leghamarabb megpr\u00f3b\u00e1lom felt\u00f6lteni a projektet a github-ra.<br \/>\n<br \/>Forr\u00e1s: <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.3 - 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\/hu\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"hu_HU\" \/>\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\/hu\/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\udd47A z\u00e1rol\u00e1sok t\u00f6rt\u00e9net\u00e9nek egy m\u00f3dszere a PostgreSQL-ben | ProHoster","description":"A \"K\u00eds\u00e9rlet az ASH anal\u00f3gj\u00e1nak l\u00e9trehoz\u00e1s\u00e1ra a PostgreSQL sz\u00e1m\u00e1ra\" c\u00edm\u0171 cikk folytat\u00e1sa. A cikk konkr\u00e9t lek\u00e9rdez\u00e9seken kereszt\u00fcl fogja vizsg\u00e1lni \u00e9s bemutatni.","canonical_url":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-istorii-blokirovok-v-postgresql","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"hu_HU","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\/hu\/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\/hu\/wp-json\/wp\/v2\/posts\/38232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/comments?post=38232"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/38232\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media?parent=38232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/categories?post=38232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/tags?post=38232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}