Skip to content

Функции wait_for_replication_replay и wait_till_master_shutsdown реализовать через for #47

Description

@andr-sokolov
$$
declare
  b bool;
begin
  for i in 0..retries loop
    select flush_location=pg_current_xlog_location() into b
      from pg_stat_replication;
    if b then
      return true;
    end if;

    perform pg_sleep(0.1);
    perform pg_stat_clear_snapshot();
  end loop;

  return false;
end;
$$ language plpgsql;```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions