lib/gitlab/database/load_balancing/load_balancer.rb
def primary_write_location
          read_write do |connection|
            row = connection
              .select_all('SELECT pg_current_xlog_insert_location()::text AS location')
              .first

            if row
              row['location']
            else
              raise 'Failed to determine the write location of the primary database'
            end
          end
        end
# Returns the transaction write location of the primary.
Returns the transaction write location of the primary.
Returns the transaction write location of the primary .
def primary_write_location
          read_write do |connection|
            row = connection
              .select_all('SELECT pg_current_xlog_insert_location()::text AS location')
              .first
            if row
              row['location']
            else
              raise 'Failed to determine the write location of the primary database'
            end
          end
        end
def primary_write_location read_write do | connection | row = connection . select_all ( 'SELECT pg_current_xlog_insert_location()::text AS location' ) . first if row row [ 'location' ] else raise 'Failed to determine the write location of the primary database' end end end
Returns the transaction write location of the primary.
Returns the transaction write location of the primary .