BARRIER Function???

Moderator: NorbertKrupa

Post Reply
User avatar
becky
Intermediate
Intermediate
Posts: 118
Joined: Sat Apr 28, 2012 11:37 am

BARRIER Function???

Post by becky » Wed Oct 09, 2013 9:12 pm

Hey,

Anyone know what the barrier function does?

Code: Select all

dbadmin=> \df barrier
                         List of functions
 procedure_name | procedure_return_type | procedure_argument_types
----------------+-----------------------+--------------------------
 barrier        | Varchar               | Varchar, Varchar
(1 row)

Code: Select all

dbadmin=> select barrier('becky', 'becky');
 barrier
---------
 becky
(1 row)

dbadmin=> select barrier('becky', 'david');
 barrier
---------
 david
(1 row)

dbadmin=> select barrier('david', 'becky');
 barrier
---------
 becky
(1 row)
Seems kind of useless?
THANKS - BECKSTER

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: BARRIER Function???

Post by JimKnicely » Thu Oct 10, 2013 8:03 pm

I believe it has something to do with this:

http://en.wikipedia.org/wiki/Great_Barrier_Reef

Just kidding. I have no idea what the BARRIER function does :lol:
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: BARRIER Function???

Post by JimKnicely » Fri Oct 11, 2013 11:58 am

From a friend:

Barrier Function
  • inner system function for distributed transactions: http://postgres-xc.sourceforge.net/docs ... riers.html

    that will try all this (sequentially and will not cry - database lost):
    select init_barrier('foo', 0);
    select barrier('foo', 'bar');
    select barrier('bar', 'foo');
    select barrier('bar', 'foo');

    in Logs we can see select barrier('bar', 'foo');
    2013-10-11 13:12:55.497 Init Session:0x7f8b8c00f070 [Txn] <INFO> barrier.wait, enter(bar)
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “Vertica SQL Functions”