@@ -14623,91 +14623,147 @@ SELECT (pg_stat_file('filename')).modification;
1462314623 <literal><function>pg_advisory_lock(<parameter>key</> <type>bigint</>)</function></literal>
1462414624 </entry>
1462514625 <entry><type>void</type></entry>
14626- <entry>Obtain exclusive advisory lock</entry>
14626+ <entry>Obtain exclusive session level advisory lock</entry>
1462714627 </row>
1462814628 <row>
1462914629 <entry>
1463014630 <literal><function>pg_advisory_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
1463114631 </entry>
1463214632 <entry><type>void</type></entry>
14633- <entry>Obtain exclusive advisory lock</entry>
14633+ <entry>Obtain exclusive session level advisory lock</entry>
1463414634 </row>
1463514635 <row>
1463614636 <entry>
1463714637 <literal><function>pg_advisory_lock_shared(<parameter>key</> <type>bigint</>)</function></literal>
1463814638 </entry>
1463914639 <entry><type>void</type></entry>
14640- <entry>Obtain shared advisory lock</entry>
14640+ <entry>Obtain shared session level advisory lock</entry>
1464114641 </row>
1464214642 <row>
1464314643 <entry>
1464414644 <literal><function>pg_advisory_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
1464514645 </entry>
1464614646 <entry><type>void</type></entry>
14647- <entry>Obtain shared advisory lock</entry>
14647+ <entry>Obtain shared session level advisory lock</entry>
1464814648 </row>
1464914649 <row>
1465014650 <entry>
1465114651 <literal><function>pg_advisory_unlock(<parameter>key</> <type>bigint</>)</function></literal>
1465214652 </entry>
1465314653 <entry><type>boolean</type></entry>
14654- <entry>Release an exclusive advisory lock</entry>
14654+ <entry>Release an exclusive session level advisory lock</entry>
1465514655 </row>
1465614656 <row>
1465714657 <entry>
1465814658 <literal><function>pg_advisory_unlock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
1465914659 </entry>
1466014660 <entry><type>boolean</type></entry>
14661- <entry>Release an exclusive advisory lock</entry>
14661+ <entry>Release an exclusive session level advisory lock</entry>
1466214662 </row>
1466314663 <row>
1466414664 <entry>
1466514665 <literal><function>pg_advisory_unlock_all()</function></literal>
1466614666 </entry>
1466714667 <entry><type>void</type></entry>
14668- <entry>Release all advisory locks held by the current session</entry>
14668+ <entry>Release all session level advisory locks held by the current session</entry>
1466914669 </row>
1467014670 <row>
1467114671 <entry>
1467214672 <literal><function>pg_advisory_unlock_shared(<parameter>key</> <type>bigint</>)</function></literal>
1467314673 </entry>
1467414674 <entry><type>boolean</type></entry>
14675- <entry>Release a shared advisory lock</entry>
14675+ <entry>Release a shared session level advisory lock</entry>
1467614676 </row>
1467714677 <row>
1467814678 <entry>
1467914679 <literal><function>pg_advisory_unlock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
1468014680 </entry>
1468114681 <entry><type>boolean</type></entry>
14682- <entry>Release a shared advisory lock</entry>
14682+ <entry>Release a shared session level advisory lock</entry>
14683+ </row>
14684+ <row>
14685+ <entry>
14686+ <literal><function>pg_advisory_xact_lock(<parameter>key</> <type>bigint</>)</function></literal>
14687+ </entry>
14688+ <entry><type>void</type></entry>
14689+ <entry>Obtain exclusive transaction level advisory lock</entry>
14690+ </row>
14691+ <row>
14692+ <entry>
14693+ <literal><function>pg_advisory_xact_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
14694+ </entry>
14695+ <entry><type>void</type></entry>
14696+ <entry>Obtain exclusive transaction level advisory lock</entry>
14697+ </row>
14698+ <row>
14699+ <entry>
14700+ <literal><function>pg_advisory_xact_lock_shared(<parameter>key</> <type>bigint</>)</function></literal>
14701+ </entry>
14702+ <entry><type>void</type></entry>
14703+ <entry>Obtain shared transaction level advisory lock</entry>
14704+ </row>
14705+ <row>
14706+ <entry>
14707+ <literal><function>pg_advisory_xact_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
14708+ </entry>
14709+ <entry><type>void</type></entry>
14710+ <entry>Obtain shared advisory lock for the current transaction</entry>
1468314711 </row>
1468414712 <row>
1468514713 <entry>
1468614714 <literal><function>pg_try_advisory_lock(<parameter>key</> <type>bigint</>)</function></literal>
1468714715 </entry>
1468814716 <entry><type>boolean</type></entry>
14689- <entry>Obtain exclusive advisory lock if available</entry>
14717+ <entry>Obtain exclusive session level advisory lock if available</entry>
1469014718 </row>
1469114719 <row>
1469214720 <entry>
1469314721 <literal><function>pg_try_advisory_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
1469414722 </entry>
1469514723 <entry><type>boolean</type></entry>
14696- <entry>Obtain exclusive advisory lock if available</entry>
14724+ <entry>Obtain exclusive session level advisory lock if available</entry>
1469714725 </row>
1469814726 <row>
1469914727 <entry>
1470014728 <literal><function>pg_try_advisory_lock_shared(<parameter>key</> <type>bigint</>)</function></literal>
1470114729 </entry>
1470214730 <entry><type>boolean</type></entry>
14703- <entry>Obtain shared advisory lock if available</entry>
14731+ <entry>Obtain shared session level advisory lock if available</entry>
1470414732 </row>
1470514733 <row>
1470614734 <entry>
1470714735 <literal><function>pg_try_advisory_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
1470814736 </entry>
1470914737 <entry><type>boolean</type></entry>
14710- <entry>Obtain shared advisory lock if available</entry>
14738+ <entry>Obtain shared session level advisory lock if available</entry>
14739+ </row>
14740+ <row>
14741+ <entry>
14742+ <literal><function>pg_try_advisory_xact_lock(<parameter>key</> <type>bigint</>)</function></literal>
14743+ </entry>
14744+ <entry><type>boolean</type></entry>
14745+ <entry>Obtain exclusive transaction level advisory lock if available</entry>
14746+ </row>
14747+ <row>
14748+ <entry>
14749+ <literal><function>pg_try_advisory_xact_lock(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
14750+ </entry>
14751+ <entry><type>boolean</type></entry>
14752+ <entry>Obtain exclusive transaction level advisory lock if available</entry>
14753+ </row>
14754+ <row>
14755+ <entry>
14756+ <literal><function>pg_try_advisory_xact_lock_shared(<parameter>key</> <type>bigint</>)</function></literal>
14757+ </entry>
14758+ <entry><type>boolean</type></entry>
14759+ <entry>Obtain shared transaction level advisory lock if available</entry>
14760+ </row>
14761+ <row>
14762+ <entry>
14763+ <literal><function>pg_try_advisory_xact_lock_shared(<parameter>key1</> <type>int</>, <parameter>key2</> <type>int</>)</function></literal>
14764+ </entry>
14765+ <entry><type>boolean</type></entry>
14766+ <entry>Obtain shared transaction level advisory lock if available</entry>
1471114767 </row>
1471214768 </tbody>
1471314769 </tgroup>
@@ -14758,12 +14814,50 @@ SELECT (pg_stat_file('filename')).modification;
1475814814 a shared rather than an exclusive lock.
1475914815 </para>
1476014816
14817+ <indexterm>
14818+ <primary>pg_advisory_xact_lock</primary>
14819+ </indexterm>
14820+ <para>
14821+ <function>pg_advisory_xact_lock</> works the same as
14822+ <function>pg_advisory_lock</>, expect the lock is automatically released
14823+ at the end of the current transaction and can not be released explicitly.
14824+ </para>
14825+
14826+ <indexterm>
14827+ <primary>pg_advisory_xact_lock_shared</primary>
14828+ </indexterm>
14829+ <para>
14830+ <function>pg_advisory_xact_lock_shared</> works the same as
14831+ <function>pg_advisory_lock_shared</>, expect the lock is automatically released
14832+ at the end of the current transaction and can not be released explicitly.
14833+ </para>
14834+
14835+ <indexterm>
14836+ <primary>pg_try_advisory_xact_lock</primary>
14837+ </indexterm>
14838+ <para>
14839+ <function>pg_try_advisory_xact_lock</> works the same as
14840+ <function>pg_try_advisory_lock</>, expect the lock, if acquired,
14841+ is automatically released at the end of the current transaction and
14842+ can not be released explicitly.
14843+ </para>
14844+
14845+ <indexterm>
14846+ <primary>pg_try_advisory_xact_lock_shared</primary>
14847+ </indexterm>
14848+ <para>
14849+ <function>pg_try_advisory_xact_lock_shared</> works the same as
14850+ <function>pg_try_advisory_lock_shared</>, expect the lock, if acquired,
14851+ is automatically released at the end of the current transaction and
14852+ can not be released explicitly.
14853+ </para>
14854+
1476114855 <indexterm>
1476214856 <primary>pg_advisory_unlock</primary>
1476314857 </indexterm>
1476414858 <para>
1476514859 <function>pg_advisory_unlock</> will release a previously-acquired
14766- exclusive advisory lock. It
14860+ exclusive session level advisory lock. It
1476714861 returns <literal>true</> if the lock is successfully released.
1476814862 If the lock was not held, it will return <literal>false</>,
1476914863 and in addition, an SQL warning will be raised by the server.
@@ -14775,15 +14869,15 @@ SELECT (pg_stat_file('filename')).modification;
1477514869 <para>
1477614870 <function>pg_advisory_unlock_shared</> works the same as
1477714871 <function>pg_advisory_unlock</>,
14778- except it releases a shared advisory lock.
14872+ except it releases a shared session level advisory lock.
1477914873 </para>
1478014874
1478114875 <indexterm>
1478214876 <primary>pg_advisory_unlock_all</primary>
1478314877 </indexterm>
1478414878 <para>
14785- <function>pg_advisory_unlock_all</> will release all advisory locks
14786- held by the current session. (This function is implicitly invoked
14879+ <function>pg_advisory_unlock_all</> will release all session level advisory
14880+ locks held by the current session. (This function is implicitly invoked
1478714881 at session end, even if the client disconnects ungracefully.)
1478814882 </para>
1478914883
0 commit comments