> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# What's New in v23.1

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

export const SearchLink = ({term, children}) => {
  const handleClick = e => {
    e.preventDefault();
    const searchButton = document.querySelector("button#search-bar-entry");
    if (!searchButton) return;
    searchButton.click();
    requestAnimationFrame(() => {
      const input = document.querySelector("input#search-input");
      if (!input) return;
      const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
      nativeInputValueSetter?.call(input, term);
      input.dispatchEvent(new Event("input", {
        bubbles: true
      }));
      input.dispatchEvent(new KeyboardEvent("keydown", {
        key: "Enter",
        bubbles: true
      }));
    });
  };
  return <a href="#" onClick={handleClick}>
      {children}
    </a>;
};

export const MarketoEmailForm = ({successMessage = "Thanks!"}) => {
  useEffect(() => {
    function initializeReleaseNotesSignup() {
      if (window.__cockroachReleaseNotesSignupInitialized) {
        if (window.__cockroachReleaseNotesRefresh) {
          window.__cockroachReleaseNotesRefresh();
        }
        return;
      }
      window.__cockroachReleaseNotesSignupInitialized = true;
      const MARKETO_BASE_URL = "https://go.cockroachlabs.com";
      const MARKETO_MUNCHKIN_ID = "350-QIN-827";
      const MARKETO_FORMS_SCRIPT = "https://go.cockroachlabs.com/js/forms2/js/forms2.min.js";
      const RELEASE_NOTES_FORM_ID = 1083;
      const EMAIL_ERROR = "Enter a valid email address.";
      const FORM_LOAD_ERROR = "Unable to load the release notes form. Disable content blockers and try again.";
      const LOCALHOST_ERROR = "Marketo rejects submissions from localhost. Test this form on a deployed preview URL.";
      const SUCCESS_MESSAGE = "Thanks!";
      const WIDGET_SELECTOR = "[data-release-notes-signup]";
      const FORM_MOUNT_ID = "cockroachReleaseNotesFormMount";
      const SUBMIT_FRAME_NAME = "cockroachReleaseNotesSubmitFrame";
      const widgetState = new WeakMap();
      let marketoScriptPromise;
      let marketoFormPromise;
      let activeWidget = null;
      function toSecureMarketoUrl(url) {
        if (typeof url !== "string") {
          return url;
        }
        return url.replace("http://go.cockroachlabs.com", "https://go.cockroachlabs.com");
      }
      function patchMarketoFrameTransport() {
        if (window.__cockroachReleaseNotesFrameTransportPatched || typeof HTMLIFrameElement === "undefined") {
          return;
        }
        const iframeProto = HTMLIFrameElement.prototype;
        const originalSetAttribute = iframeProto.setAttribute;
        iframeProto.setAttribute = function (name, value) {
          if (name === "src") {
            value = toSecureMarketoUrl(value);
          }
          return originalSetAttribute.call(this, name, value);
        };
        const srcDescriptor = Object.getOwnPropertyDescriptor(iframeProto, "src");
        if (srcDescriptor && typeof srcDescriptor.get === "function" && typeof srcDescriptor.set === "function") {
          try {
            Object.defineProperty(iframeProto, "src", {
              configurable: true,
              enumerable: srcDescriptor.enumerable,
              get: function () {
                return srcDescriptor.get.call(this);
              },
              set: function (value) {
                srcDescriptor.set.call(this, toSecureMarketoUrl(value));
              }
            });
          } catch (error) {}
        }
        window.__cockroachReleaseNotesFrameTransportPatched = true;
      }
      function getState(widget) {
        let state = widgetState.get(widget);
        if (!state) {
          state = {
            error: "",
            isSubmitted: false,
            isSubmitting: false,
            successMessage: widget.getAttribute("data-success-message") || SUCCESS_MESSAGE,
            submitTimeoutId: null
          };
          widgetState.set(widget, state);
        }
        return state;
      }
      function getElements(widget) {
        return {
          emailInput: widget.querySelector("[data-release-notes-email]"),
          error: widget.querySelector("[data-release-notes-error]"),
          errorText: widget.querySelector("[data-release-notes-error-text]"),
          submitButton: widget.querySelector("[data-release-notes-submit]"),
          success: widget.querySelector("[data-release-notes-success]"),
          successText: widget.querySelector("[data-release-notes-success-text]")
        };
      }
      function ensureFormMount() {
        let mount = document.getElementById(FORM_MOUNT_ID);
        if (mount) {
          return mount;
        }
        mount = document.createElement("div");
        mount.id = FORM_MOUNT_ID;
        mount.setAttribute("aria-hidden", "true");
        mount.style.display = "none";
        document.body.appendChild(mount);
        return mount;
      }
      function getDomForm(form) {
        const formElement = typeof form.getFormElem === "function" ? form.getFormElem() : null;
        return formElement && formElement[0] ? formElement[0] : formElement;
      }
      function mountMarketoForm(form) {
        const domForm = getDomForm(form);
        if (!domForm || domForm.isConnected) {
          return domForm;
        }
        ensureFormMount().appendChild(domForm);
        return domForm;
      }
      function applyFormValues(form, values) {
        if (typeof form.setValues === "function") {
          form.setValues(values);
          return;
        }
        if (typeof form.vals === "function") {
          form.vals(values);
        }
      }
      function ensureSubmitFrame() {
        let frame = document.querySelector('iframe[name="' + SUBMIT_FRAME_NAME + '"]');
        if (frame) {
          return frame;
        }
        frame = document.createElement("iframe");
        frame.name = SUBMIT_FRAME_NAME;
        frame.setAttribute("aria-hidden", "true");
        frame.tabIndex = -1;
        frame.style.display = "none";
        document.body.appendChild(frame);
        return frame;
      }
      function clearSubmitTimeout(widget) {
        const state = getState(widget);
        if (state.submitTimeoutId) {
          window.clearTimeout(state.submitTimeoutId);
          state.submitTimeoutId = null;
        }
      }
      function forceSecureMarketoFrame() {
        const frame = document.querySelector("#MktoForms2XDIframe");
        if (!frame) {
          return;
        }
        const currentSrc = frame.getAttribute("src") || frame.src;
        if (!currentSrc) {
          return;
        }
        const secureSrc = toSecureMarketoUrl(currentSrc);
        if (secureSrc !== currentSrc) {
          frame.setAttribute("src", secureSrc);
        }
      }
      function ensureSecureMarketoFrame() {
        patchMarketoFrameTransport();
        forceSecureMarketoFrame();
        if (window.__cockroachReleaseNotesFrameObserverInitialized || typeof MutationObserver === "undefined") {
          return;
        }
        const observer = new MutationObserver(function () {
          forceSecureMarketoFrame();
        });
        observer.observe(document.documentElement, {
          childList: true,
          subtree: true,
          attributes: true,
          attributeFilter: ["src"]
        });
        window.__cockroachReleaseNotesFrameObserverInitialized = true;
        window.__cockroachReleaseNotesFrameObserver = observer;
      }
      function render(widget) {
        if (!widget || !document.contains(widget)) {
          return;
        }
        const state = getState(widget);
        const elements = getElements(widget);
        if (elements.submitButton) {
          elements.submitButton.disabled = state.isSubmitting;
        }
        if (elements.emailInput) {
          elements.emailInput.setAttribute("aria-invalid", state.error ? "true" : "false");
        }
        if (elements.error) {
          elements.error.hidden = !state.error;
          elements.error.style.display = state.error ? "block" : "none";
        }
        if (elements.errorText) {
          elements.errorText.textContent = state.error;
        }
        if (elements.success) {
          elements.success.hidden = !state.isSubmitted;
          elements.success.style.display = state.isSubmitted ? "block" : "none";
        }
        if (elements.successText) {
          elements.successText.textContent = state.successMessage || SUCCESS_MESSAGE;
        }
      }
      function hideMarketoForm(form) {
        const formElement = form && typeof form.getFormElem === "function" ? form.getFormElem() : null;
        if (!formElement) {
          return;
        }
        if (typeof formElement.hide === "function") {
          formElement.hide();
          return;
        }
        if (formElement[0] && formElement[0].style) {
          formElement[0].style.display = "none";
          return;
        }
        if (formElement.style) {
          formElement.style.display = "none";
        }
      }
      function isValidEmail(value) {
        return (/^[^\s@]+@[^\s@]+\.[^\s@]+$/).test(value);
      }
      function isFormLoadError(error) {
        return Boolean(error && typeof error === "object" && (error.code === "marketo_load_failed" || error.code === "marketo_not_available" || error.code === "marketo_form_init_failed"));
      }
      function isLocalhost() {
        return window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1";
      }
      function loadMarketoForms() {
        ensureSecureMarketoFrame();
        if (window.MktoForms2) {
          return Promise.resolve(window.MktoForms2);
        }
        if (!marketoScriptPromise) {
          marketoScriptPromise = new Promise(function (resolve, reject) {
            function finalizeLoad() {
              if (window.MktoForms2) {
                forceSecureMarketoFrame();
                resolve(window.MktoForms2);
                return;
              }
              marketoScriptPromise = null;
              const error = new Error("MktoForms2 did not load.");
              error.code = "marketo_not_available";
              reject(error);
            }
            function handleError() {
              marketoScriptPromise = null;
              const error = new Error("Failed to load Marketo forms.");
              error.code = "marketo_load_failed";
              reject(error);
            }
            const existingScript = document.querySelector('script[src="' + MARKETO_FORMS_SCRIPT + '"]');
            if (existingScript) {
              existingScript.addEventListener("load", finalizeLoad, {
                once: true
              });
              existingScript.addEventListener("error", handleError, {
                once: true
              });
              return;
            }
            const script = document.createElement("script");
            script.src = MARKETO_FORMS_SCRIPT;
            script.async = true;
            script.addEventListener("load", finalizeLoad, {
              once: true
            });
            script.addEventListener("error", handleError, {
              once: true
            });
            document.body.appendChild(script);
          });
        }
        return marketoScriptPromise;
      }
      function attachFormCallbacks(form) {
        if (form.__releaseNotesCallbacksAttached) {
          return;
        }
        form.__releaseNotesCallbacksAttached = true;
        form.onSuccess(function () {
          if (!activeWidget || !document.contains(activeWidget)) {
            return false;
          }
          const state = getState(activeWidget);
          clearSubmitTimeout(activeWidget);
          state.isSubmitting = false;
          state.isSubmitted = true;
          state.error = "";
          state.successMessage = activeWidget.getAttribute("data-success-message") || SUCCESS_MESSAGE;
          render(activeWidget);
          return false;
        });
        form.onValidate(function (isValid) {
          if (isValid || !activeWidget || !document.contains(activeWidget)) {
            return;
          }
          const state = getState(activeWidget);
          clearSubmitTimeout(activeWidget);
          state.isSubmitting = false;
          state.error = EMAIL_ERROR;
          render(activeWidget);
        });
      }
      function ensureForm() {
        if (!marketoFormPromise) {
          marketoFormPromise = loadMarketoForms().then(function (MktoForms2) {
            const existingForm = typeof MktoForms2.getForm === "function" ? MktoForms2.getForm(RELEASE_NOTES_FORM_ID) : null;
            if (existingForm) {
              forceSecureMarketoFrame();
              mountMarketoForm(existingForm);
              hideMarketoForm(existingForm);
              attachFormCallbacks(existingForm);
              ensureSubmitFrame();
              return existingForm;
            }
            return new Promise(function (resolve, reject) {
              MktoForms2.loadForm(MARKETO_BASE_URL, MARKETO_MUNCHKIN_ID, RELEASE_NOTES_FORM_ID, function (form) {
                if (!form) {
                  const error = new Error("Marketo form failed to initialize.");
                  error.code = "marketo_form_init_failed";
                  reject(error);
                  return;
                }
                forceSecureMarketoFrame();
                mountMarketoForm(form);
                hideMarketoForm(form);
                attachFormCallbacks(form);
                ensureSubmitFrame();
                resolve(form);
              });
            });
          }).catch(function (error) {
            marketoFormPromise = null;
            throw error;
          });
        }
        return marketoFormPromise;
      }
      function handleEmailInput(target) {
        const widget = target.closest(WIDGET_SELECTOR);
        if (!widget) {
          return;
        }
        const state = getState(widget);
        if (!state.error) {
          return;
        }
        state.error = "";
        render(widget);
      }
      function handleSubmit(button) {
        const widget = button.closest(WIDGET_SELECTOR);
        if (!widget) {
          return;
        }
        const state = getState(widget);
        const elements = getElements(widget);
        if (!elements.emailInput) {
          return;
        }
        const email = elements.emailInput.value.trim();
        if (!email) {
          state.error = EMAIL_ERROR;
          render(widget);
          return;
        }
        state.error = "";
        state.isSubmitted = false;
        state.isSubmitting = true;
        state.successMessage = widget.getAttribute("data-success-message") || SUCCESS_MESSAGE;
        render(widget);
        if (!isValidEmail(email)) {
          state.isSubmitting = false;
          state.error = EMAIL_ERROR;
          render(widget);
          return;
        }
        if (isLocalhost()) {
          state.isSubmitting = false;
          state.error = LOCALHOST_ERROR;
          render(widget);
          return;
        }
        activeWidget = widget;
        ensureForm().then(function (form) {
          const formValues = {
            Email: email,
            Send_me_product_and_feature_updates__c: "TRUE",
            subscriptionProductUpdates: "TRUE",
            optin: "TRUE"
          };
          applyFormValues(form, formValues);
          if (typeof form.validate === "function" && !form.validate()) {
            state.isSubmitting = false;
            state.error = EMAIL_ERROR;
            render(widget);
            return;
          }
          clearSubmitTimeout(widget);
          state.submitTimeoutId = window.setTimeout(function () {
            state.isSubmitting = false;
            state.error = EMAIL_ERROR;
            render(widget);
          }, 10000);
          if (typeof form.submit !== "function") {
            throw new Error("marketo_submit_missing");
          }
          form.submit();
        }).catch(function (error) {
          clearSubmitTimeout(widget);
          state.isSubmitting = false;
          state.error = isFormLoadError(error) ? FORM_LOAD_ERROR : EMAIL_ERROR;
          render(widget);
        });
      }
      document.addEventListener("click", function (event) {
        const submitButton = event.target.closest("[data-release-notes-submit]");
        if (!submitButton) {
          return;
        }
        event.preventDefault();
        handleSubmit(submitButton);
      });
      document.addEventListener("input", function (event) {
        if (!(event.target instanceof HTMLInputElement) || !event.target.matches("[data-release-notes-email]")) {
          return;
        }
        handleEmailInput(event.target);
      });
      window.__cockroachReleaseNotesRefresh = function () {
        ensureSecureMarketoFrame();
        const widgets = document.querySelectorAll(WIDGET_SELECTOR);
        widgets.forEach(render);
        if (widgets.length > 0) {
          ensureForm().catch(function () {});
        }
      };
      window.__cockroachReleaseNotesRefresh();
    }
    initializeReleaseNotesSignup();
  }, []);
  return <div data-release-notes-signup data-success-message={successMessage} className="not-prose my-4 max-w-xl">
      <div className="flex flex-col gap-3 sm:flex-row sm:items-start">
        <input data-release-notes-email type="email" inputMode="email" autoComplete="email" placeholder="Email*" aria-label="Email" className="min-w-0 flex-1 rounded-2xl border border-gray-300 bg-white px-4 py-3 text-sm text-gray-900 shadow-sm outline-none transition focus:border-primary dark:border-gray-700 dark:bg-gray-950 dark:text-white" />
        <button data-release-notes-submit type="button" className="inline-flex items-center justify-center rounded-2xl bg-primary px-5 py-3 text-sm font-semibold text-white transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-70">
          Submit
        </button>
      </div>

      <div data-release-notes-error hidden className="mt-3 rounded-2xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-300">
        <span data-release-notes-error-text />
      </div>

      <div data-release-notes-success hidden className="mt-3 rounded-2xl border border-green-200 bg-green-50 px-4 py-3 text-sm font-medium text-green-800 dark:border-green-900/50 dark:bg-green-950/40 dark:text-green-200">
        <span data-release-notes-success-text>{successMessage}</span>
      </div>
    </div>;
};

CockroachDB v23.1 <InternalLink path="release-support-policy#support-types">(LTS)</InternalLink> is a required <InternalLink path="index#major-versions">Regular release</InternalLink>. This page contains a complete list of features and changes in v23.1.

* For a summary of the most significant changes in v23.1, refer to [Feature highlights](#feature-highlights).
* Before <InternalLink version="v23.1" path="upgrade-cockroach-version">upgrading to CockroachDB v23.1</InternalLink>, review the [backward-incompatible changes](#v23-1-0-backward-incompatible-changes), including [key cluster setting changes](#v23-1-0-cluster-settings) and [deprecations](#v23-1-0-deprecations); as well as newly identified [known limtiations](#v23-1-0-known-limitations).
* For details about the support window for this release type, review the <InternalLink path="release-support-policy">Release Support Policy</InternalLink>.
* For details about all supported releases, the release schedule, and licenses, refer to <InternalLink path="index">CockroachDB Releases Overview</InternalLink>.
* After downloading a supported CockroachDB binary, learn how to <InternalLink version="stable" path="install-cockroachdb">install CockroachDB</InternalLink> or <InternalLink version="stable" path="upgrade-cockroach-version">upgrade your cluster</InternalLink>.

Get future release notes emailed to you:

<MarketoEmailForm />

## v23.1.30

Release Date: December 12, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.linux-amd64.tgz">
          cockroach-v23.1.30.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.linux-amd64.tgz">
          cockroach-sql-v23.1.30.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.linux-arm64.tgz">
          cockroach-v23.1.30.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.linux-arm64.tgz">
          cockroach-sql-v23.1.30.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.darwin-10.9-amd64.tgz">
          cockroach-v23.1.30.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.30.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.darwin-11.0-arm64.tgz">
          cockroach-v23.1.30.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.30.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.windows-6.2-amd64.zip">
          cockroach-v23.1.30.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.30.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.30.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.30.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.30
```

### Security updates

* All cluster settings that accept strings are now fully redacted when transmitted as part of CockroachDB's diagnostics telemetry. The transmitted payload includes a record of modified cluster settings and their values when they are not strings. If you previously applied the mitigations in <InternalLink path="a133479">Technical Advisory 133479</InternalLink>, you can safely turn on diagnostic reporting via the `diagnostics.reporting.enabled` cluster setting without leaking sensitive cluster settings values.

### General changes

* `COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING` is no longer mentioned in the `cockroach demo` command.

### Bug fixes

* Fixed a bug where CockroachDB could encounter an internal error `interface conversion: coldata.Column is` in an edge case. The bug was present in v22.2.13+, v23.1.9+, and v23.2+.
* Fixed a bug that caused incorrect `NOT NULL` constraint violation errors on `UPSERT` and `INSERT... ON CONFLICT... DO UPDATE` statements when those statements updated an existing row and a subset of columns that did not include a `NOT NULL` column of the table. This bug had been present since at least v20.1.0.
* Fixed an unhandled error that could occur when using `REVOKE... ON SEQUENCE FROM... user` on an object that is not a sequence.
* Addressed a panic that could occur inside `CREATE TABLE AS` if sequence builtin expressions had invalid function overloads.
* Previously, when executing queries with index / lookup joins where ordering needed to be maintained, CockroachDB's behavior could lead to increased query latency, potentially by several orders of magnitude. This bug was introduced in v22.2, and is now fixed.
* Fixed a bug where `DROP CASCADE` would occasionally panic with an `un-dropped backref` message on partitioned tables.
* Reduced the duration of partitions in the gossip network when a node crashes. This eliminates false positives in the `ranges.unavailable` metric.

## v23.1.29

Release Date: November 18, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.linux-amd64.tgz">
          cockroach-v23.1.29.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.linux-amd64.tgz">
          cockroach-sql-v23.1.29.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.linux-arm64.tgz">
          cockroach-v23.1.29.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.linux-arm64.tgz">
          cockroach-sql-v23.1.29.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.darwin-10.9-amd64.tgz">
          cockroach-v23.1.29.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.29.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.darwin-11.0-arm64.tgz">
          cockroach-v23.1.29.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.29.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.windows-6.2-amd64.zip">
          cockroach-v23.1.29.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.29.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.29.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.29.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.29
```

### General changes

* Changed the license CockroachDB is distributed under to the new CockroachDB Software License (CSL).
* Attempting to install a second enterprise trial license on the same cluster will now fail.
* The cluster setting `diagnostics.reporting.enabled` is now ignored if the cluster has a Trial or Free license, or if the reporting job is unable to load any license at all.

### Enterprise edition changes

* A new `changefeed.total_ranges` metric has been added and can be used to monitor the number of ranges that are watched by changefeed aggregators. It shares the same polling interval as `changefeed.lagging_ranges`, which is controlled by the existing `changefeed.lagging_ranges_polling_interval` cluster setting.
* Allowed access to DB console APIs via JWT, which can be supplied as a Bearer token in the Authorization header.

### DB Console changes

* DB Console will reflect any throttling behavior from the cluster due to an expired license or missing telemetry data. Enterprise licenses are not affected.

### Bug fixes

* Fixed a bug introduced in v23.1 that can cause incorrect results when:
  1. The query contains a correlated subquery.
  2. The correlated subquery has a `GroupBy` or `DistinctOn` operator with an outer-column reference in its input.
  3. The correlated subquery is in the input of a `Select` or `Join` operator
  4. The `Select` or `Join` has a filter that sets the outer-column reference from (2) equal to a non-outer column in the input of the grouping operator.
  5. The grouping column set does not include the replacement column, and functionally determines the replacement column.
* The AWS endpoint and cloud custom HTTP client configuration are now considered when implicit authentication is used, whereas previously these were only considered when using explicit credentials.
* Fixed a bug that could cause spurious user permission errors when multiple databases shared a common schema with a routine referencing a table. The bug has existed since UDFs were introduced in v22.2.
* Fixed a rare bug where a lease transfer could lead to a `side-transport update saw closed timestamp regression` panic. The bug could occur when a node was overloaded and failing to heartbeat its node liveness record.
* Fixed an error that could happen if an aggregate function was used as the value in a `SET` command.
* Fixed a bug where a span stats request on a mixed version cluster resulted in a null pointer exception (NPE).
* Fixed a rare bug in which an update of a primary key column which is also the only column in a separate column family can sometimes fail to update the primary index. This bug has existed since v22.2. Requirements to hit the bug are:
  1. A table with multiple column families.
  2. A column family containing a single primary key column.
  3. That column family is not the first column family.
  4. That column family existed before its column was in the primary key.
  5. That column must be of type `FLOAT4/8`, `DECIMAL`, `JSON`, collated `STRING`, or `ARRAY`.
  6. An update changes that column from a composite value to a non-composite value.
* The `proretset` column of the `pg_catalog.pg_proc` table is now properly set to `true` for set-returning builtin functions.
* Fixed a bug in the query optimizer which could cause CockroachDB nodes to crash in rare cases. The bug could occur when a query contained a filter of the form `col IN (elem0, elem1,..., elemN)` such that `N` is very large, e.g. 1.6+ million, and when `col` exists in a hash-sharded index or exists in a table with an indexed, computed column dependent on `col`.
* Users with the admin role can now run `ALTER DEFAULT PRIVILEGES FOR target_role...` on any `target_role`. Previously, this could result in a privilege error, which is incorrect as admins are allowed to perform any operation.
* `REASSIGN OWNED BY` will now transfer ownership of the public schema. Previously, it would always skip over the public schema even if it was owned by the target role.
* Fixed a bug where backup schedules could advance a protected timestamp too early, which caused incremental backups to fail.

## v23.1.28

Release Date: October 10, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.linux-amd64.tgz">
          cockroach-v23.1.28.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.linux-amd64.tgz">
          cockroach-sql-v23.1.28.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.linux-arm64.tgz">
          cockroach-v23.1.28.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.linux-arm64.tgz">
          cockroach-sql-v23.1.28.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.darwin-10.9-amd64.tgz">
          cockroach-v23.1.28.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.28.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.darwin-11.0-arm64.tgz">
          cockroach-v23.1.28.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.28.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.windows-6.2-amd64.zip">
          cockroach-v23.1.28.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.28.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.28.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.28.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.28
```

### Security changes

* <InternalLink version="v23.1" path="show-jobs">`SHOW JOBS`</InternalLink>
  and its variants
  <InternalLink version="v23.1" path="show-jobs#show-changefeed-jobs">`SHOW CHANGEFEED JOB`</InternalLink>
  and
  <InternalLink version="v23.1" path="show-jobs#show-changefeed-jobs">`SHOW CHANGEFEED JOBS`</InternalLink>
  no longer expose user sensitive information like `client_key`.

### General changes

* Upgraded <InternalLink version="v23.1" path="architecture/distribution-layer#grpc">gRPC</InternalLink> to v1.56.3.

### Operational changes

* Added the `ranges.decommissioning` metric that represents the number of <InternalLink version="v23.1" path="architecture/glossary#range">ranges</InternalLink> which have a <InternalLink version="v23.1" path="architecture/glossary#replica">replica</InternalLink> on a <InternalLink version="v23.1" path="node-shutdown">decommissioning node</InternalLink>.

### DB Console changes

* DB Console will show an alert message when the <InternalLink version="v23.1" path="licensing-faqs">license</InternalLink> is expired or there are less than 15 days left before it expires.
* DB Console will show a notification alerting customers without an Enterprise <InternalLink version="v23.1" path="licensing-faqs">license</InternalLink> to upcoming license changes with a link to more information.

### Bug fixes

* Fixed a bug where the <InternalLink version="v23.1" path="with-storage-parameter#table-parameters">`schema_locked` table parameter</InternalLink> did not prevent a table from being referenced by a <InternalLink version="v23.1" path="foreign-key">foreign key</InternalLink>.
* Fixed a bug where the <InternalLink version="v23.1" path="session-variables">`require_explicit_primary_keys`</InternalLink> session variable would overly aggressively prevent all <InternalLink version="v23.1" path="create-table">`CREATE TABLE`</InternalLink> statements from working.
* Fixed a rare bug where a <InternalLink version="v23.1" path="architecture/replication-layer#epoch-based-leases-table-data">lease transfer</InternalLink> could lead to a `side-transport update saw closed timestamp regression` panic. The bug could occur when a node was <InternalLink version="v23.1" path="ui-overload-dashboard">overloaded</InternalLink> and failing to heartbeat its <InternalLink version="v23.1" path="cluster-setup-troubleshooting#node-liveness-issues">node liveness</InternalLink> record.
* Resolve a log message that read: `expiration of liveness record... is not greater than expiration of the previous lease... after liveness heartbeat`. This message is no longer possible.
* Fixed a potential memory leak in <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> using a <InternalLink version="v23.1" path="changefeed-sinks#cloud-storage-sink">cloud storage sink</InternalLink>. The memory leak could occur if both `changefeed.fast_gzip.enabled` and `changefeed.cloudstorage.async_flush.enabled` are `true` and the changefeed received an error while attempting to write to the cloud storage sink.

## v23.1.27

Release Date: October 3, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.linux-amd64.tgz">
          cockroach-v23.1.27.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.linux-amd64.tgz">
          cockroach-sql-v23.1.27.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.linux-arm64.tgz">
          cockroach-v23.1.27.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.linux-arm64.tgz">
          cockroach-sql-v23.1.27.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.darwin-10.9-amd64.tgz">
          cockroach-v23.1.27.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.27.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.darwin-11.0-arm64.tgz">
          cockroach-v23.1.27.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.27.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.windows-6.2-amd64.zip">
          cockroach-v23.1.27.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.27.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.27.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.27.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.27
```

### Bug fixes

* Fixed a rare bug where a <InternalLink version="v23.1" path="architecture/replication-layer#epoch-based-leases-table-data">lease transfer</InternalLink> could lead to a `side-transport update saw closed timestamp regression` panic. The bug could occur when a node was <InternalLink version="v23.1" path="ui-overload-dashboard">overloaded</InternalLink> and failing to heartbeat its <InternalLink version="v23.1" path="cluster-setup-troubleshooting#node-liveness-issues">node liveness</InternalLink> record.

## v23.1.26

Release Date: September 12, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.linux-amd64.tgz">
          cockroach-v23.1.26.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.linux-amd64.tgz">
          cockroach-sql-v23.1.26.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.linux-arm64.tgz">
          cockroach-v23.1.26.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.linux-arm64.tgz">
          cockroach-sql-v23.1.26.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.darwin-10.9-amd64.tgz">
          cockroach-v23.1.26.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.26.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.darwin-11.0-arm64.tgz">
          cockroach-v23.1.26.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.26.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.windows-6.2-amd64.zip">
          cockroach-v23.1.26.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.26.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.26.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.26.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.26
```

### Security updates

* For clusters using <InternalLink version="v23.1" path="sso-sql">Cluster SSO using JSON Web Tokens (JWTs)</InternalLink>, the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `server.jwt_authentication.issuers` can now take multiple values to support various kinds of providers and their mapped JWKS URI. You can set it to one of the following values, which are parsed by Go:
  1. A string that contains a single valid issuer URI. Example: `https://accounts.google.com`
  2. A string that contains a JSON array of valid issuer URIs. Example: `['example.com/adfs','https://accounts.google.com']`
  3. A string that contains a JSON map of valid issuer URIs to corresponding JWKS URIs and deserialized into a map of issuer URLs to corresponding JWKS URIs. A JSON map overrides the JWKS URI published in the issuer's `well-known/` endpoint. Example: `'{ "issuer_jwks_map": { "https://accounts.google.com": "https://www.googleapis.com/oauth2/v3/certs", "example.com/adfs": "https://example.com/adfs/discovery/keys" } }'`

     When `issuer_jwks_map` is set, the key set is fetched from the JWKS URI directly. Otherwise, when `JWKSAutoFetchEnabled` is set, the JWKS URI is fetched from the issuer's `well-known/` endpoint.

### Operational changes

* New <InternalLink version="v23.1" path="logging">structured logging events</InternalLink> in the `OPS` channel report broken connections and related transactions during node shutdown.
  * `node_shutdown_connection_timeout`: Logged if there are still open client connections after the timeout defined by `server.shutdown.connections.timeout` expires.
  * `node_shutdown_transaction_timeout`: Logged if there are still open transactions on those open client connections after the timeout defined by `server.shutdown.transactions.timeout` expires.

### Bug fixes

* Fixed a bug introduced in v23.1 in which output of <InternalLink version="v23.1" path="explain">`EXPLAIN (OPT, REDACT)`</InternalLink> of the following `CREATE` statements was not redacted:
  * `EXPLAIN (OPT, REDACT) CREATE TABLE`
  * `EXPLAIN (OPT, REDACT) CREATE VIEW`
  * `EXPLAIN (OPT, REDACT) CREATE FUNCTION`

* Fixed a bug where incorrect values could be produced for virtual <InternalLink version="v23.1" path="computed-columns">computed columns</InternalLink> in rare cases when the virtual column expression's type did not match the type of the virtual column.

* Fixed a bug where errors like `ERROR: column 'crdb_internal_idx_expr' does not exist` could be logged when accessing a table with an <InternalLink version="v23.1" path="expression-indexes">expression index</InternalLink> where the expression evaluates to an `ENUM` type. Example: `CREATE INDEX ON t ((col::an_enum))`

* Fixed a bug introduced in v23.1 where a <InternalLink version="v23.1" path="user-defined-functions">user-defined function's</InternalLink> return type's parameters could not be named when dropping a user-defined function or procedure.

* Fixed a slow-building memory leak when a cluster uses <InternalLink version="v23.1" path="gssapi_authentication">GSSAPI Kerberos authentication</InternalLink>.

## v23.1.25

Release Date: August 15, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.linux-amd64.tgz">
          cockroach-v23.1.25.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.linux-amd64.tgz">
          cockroach-sql-v23.1.25.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.linux-arm64.tgz">
          cockroach-v23.1.25.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.linux-arm64.tgz">
          cockroach-sql-v23.1.25.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.darwin-10.9-amd64.tgz">
          cockroach-v23.1.25.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.25.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.darwin-11.0-arm64.tgz">
          cockroach-v23.1.25.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.25.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.windows-6.2-amd64.zip">
          cockroach-v23.1.25.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.25.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.25.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.25.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.25
```

### Security updates

* Secrets are now sanitized from URLs before being written to unredacted <InternalLink version="v23.1" path="configure-logs">logs</InternalLink> when used in the following SQL statements:
  * <InternalLink version="v23.1" path="backup">`BACKUP`</InternalLink>
  * <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink>
  * <InternalLink version="v23.1" path="create-schedule-for-backup">`CREATE SCHEDULE FOR BACKUP`</InternalLink>
  * <InternalLink version="v23.1" path="alter-backup-schedule">`ALTER BACKUP SCHEDULE`</InternalLink>
  * <InternalLink version="v23.1" path="alter-backup">`ALTER BACKUP`</InternalLink>
  * <InternalLink version="v23.1" path="show-backup">`SHOW BACKUP`</InternalLink>
  * <InternalLink version="v23.1" path="create-changefeed">`CREATE CHANGEFEED`</InternalLink>
  * <InternalLink version="v23.1" path="create-schedule-for-changefeed">`CREATE SCHEDULE FOR CHANGEFEED`</InternalLink>
  * <InternalLink version="v23.1" path="alter-changefeed">`ALTER CHANGEFEED SET {sink}`</InternalLink>
  * <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink>
  * <InternalLink version="v23.1" path="export">`EXPORT`</InternalLink>
  * <InternalLink version="v23.1" path="create-external-connection">`CREATE EXTERNAL CONNECTION`</InternalLink>
  * <InternalLink version="v23.1" path="copy">`COPY`</InternalLink>

* The cluster setting <InternalLink version="v23.1" path="sso-sql#cluster-settings">`server.jwt_authentication.issuers`</InternalLink> can now take multiple values to support various kinds of providers and their mapped JWKS URIs. This can be set to one of the following values:
  * Simple string that Go can parse as a valid issuer URL: `'https://accounts.google.com'`.
  * String that can be parsed as a valid JSON array of issuer URLs list: `['example.com/adfs','https://accounts.google.com']`.
  * String that can be parsed as a valid JSON and deserialized into a map of issuer URLs to corresponding JWKS URIs. In the third case, CockroachDB will override the JWKS URI present in the issuer's well-known endpoint: `'{ "issuer_jwks_map": { "https://accounts.google.com": "https://www.googleapis.com/oauth2/v3/certs", "example.com/adfs": "https://example.com/adfs/discovery/keys" } }'`.

    When `issuer_jwks_map` is set, CockroachDB directly uses the JWKS URI to get the key set. In all other cases where <InternalLink version="v23.1" path="sso-sql#cluster-settings">`server.jwt_authentication.jwks_auto_fetch.enabled`</InternalLink> is set CockroachDB obtains the JWKS URI first from the issuer's well-known endpoint and then uses this endpoint.

### SQL language changes

* Added the `sql.auth.grant_option_inheritance.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. The default value is `true`, which results in behavior that matches the existing behavior of CockroachDB. When set to `false`, the <InternalLink version="v23.1" path="grant">`GRANT OPTION`</InternalLink> is not inherited via role membership, which will prevent the descendant roles from being able to grant the privilege to others. The privilege itself is still inherited via role membership.
* Added the `sql.auth.grant_option_for_owner.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. The default value is `true`, which results in behavior that matches the existing behavior of CockroachDB. When set to `false`, then the <InternalLink version="v23.1" path="grant">`GRANT OPTION`</InternalLink> is not implcitly given to the owner of an object. The object owner still implicitly has all privileges on the object, just not the ability to grant them to other users.

### DB Console changes

* The <InternalLink version="v23.1" path="ui-databases-page">Database</InternalLink> details and Table details pages in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> now display the correct `"stats last created"` value.

* The <InternalLink version="v23.1" path="ui-databases-page">Database</InternalLink> and Tables pages in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> will show a loading state while loading information for databases and tables including size and <InternalLink version="v23.1" path="architecture/glossary">range</InternalLink> counts.

* In the <InternalLink version="v23.1" path="ui-databases-page">Database</InternalLink> details page, the table name will no longer appear with quotes around the schema and table name.

* <InternalLink version="v23.1" path="alter-role">`ALTER ROLE`</InternalLink>
  events in the
  <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>
  event log now render correctly when the event does not contain any role options.

* Fixed a bug where the <InternalLink version="v23.1" path="ui-databases-page">Databases</InternalLink> page crashed if the range information was not available.

### Bug fixes

* Fixed a bug in which the <InternalLink version="v23.1" path="alter-table">`DISCARD`</InternalLink> statement was disallowed with <InternalLink version="v23.1" path="session-variables">`default_transaction_read_only = on`</InternalLink>.
* Fixed a bug where <InternalLink version="v23.1" path="alter-database#drop-region">`ALTER DATABASE... DROP REGION`</InternalLink> could fail if any tables under the given database have <InternalLink version="v23.1" path="expression-indexes">indexes on expressions</InternalLink>.
* Fixed a bug when <InternalLink version="v23.1" path="restore">restoring</InternalLink> a database with a <InternalLink version="v23.1" path="create-type#create-a-composite-data-type">composite type</InternalLink>.
* Fixed a bug when inputting <InternalLink version="v23.1" path="security-reference/authorization#default-roles">`public` role</InternalLink> as user name for <InternalLink version="v23.1" path="functions-and-operators">built-in compatibility functions</InternalLink>, such as `has_database_privilege` and `has_schema_privilege`.
* Fixed a bug where CockroachDB could incorrectly evaluate an <InternalLink version="v23.1" path="null-handling#nulls-and-simple-comparisons">`IS NOT NULL`</InternalLink> filter if it was applied to non- `NULL` tuples that had `NULL` elements, such as `(1, NULL)` or `(NULL, NULL)`. This bug has existed since v20.2.
* Fixed a bug where <InternalLink version="v23.1" path="create-table">`CREATE TABLE`</InternalLink> with <InternalLink version="v23.1" path="expression-indexes">index expressions</InternalLink> could hit undefined column errors on <InternalLink version="v23.1" path="transaction-retry-error-reference">transaction retries</InternalLink>.
* Fixed a bug that caused a memory leak when executing SQL statements with comments, for example, `SELECT /* comment */ 1;`. Memory owned by a SQL session would continue to grow as these types of statements were executed. The memory would only be released when closing the <InternalLink version="v23.1" path="show-sessions">SQL session</InternalLink>. This bug has been present since v23.1.
* Fixed a bug where <InternalLink version="v23.1" path="create-index">`CREATE INDEX IF NOT EXISTS`</InternalLink> would not correctly short-circuit if the given index already existed.
* Fixed a bug in syntax validation, in which the `DESCENDING` clause was not allowed for non-terminal columns of an <InternalLink version="v23.1" path="inverted-indexes">inverted index</InternalLink>. Only the last column of an inverted index should be prevented from being `DESCENDING`. This is now properly checked.
* Fixed a bug where an <InternalLink version="v23.1" path="indexes">index</InternalLink> could store a column in the primary index if that column had a mixed-case name.
* Fixed a memory leak that could occur when specifying a non-existent virtual cluster name in the connection string.
* Setting or dropping a default value on a <InternalLink version="v23.1" path="computed-columns">computed column</InternalLink> is now blocked, even for `NULL` defaults. Previously, setting or dropping a default value on a computed column was a no-op.

## v23.1.24

Release Date: July 18, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.linux-amd64.tgz">
          cockroach-v23.1.24.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.linux-amd64.tgz">
          cockroach-sql-v23.1.24.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.linux-arm64.tgz">
          cockroach-v23.1.24.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.linux-arm64.tgz">
          cockroach-sql-v23.1.24.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.darwin-10.9-amd64.tgz">
          cockroach-v23.1.24.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.24.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.darwin-11.0-arm64.tgz">
          cockroach-v23.1.24.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.24.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.windows-6.2-amd64.zip">
          cockroach-v23.1.24.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.24.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.24.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.24.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.24
```

### Enterprise edition changes

* <InternalLink version="v23.1" path="alter-changefeed">`ALTER CHANGEFEED`</InternalLink>
  no longer removes the CDC query when modifying
  <InternalLink version="v23.1" path="change-data-capture-overview">changefeed</InternalLink>
  properties.

### Operational changes

* Improved disk usage metric reporting over volumes that dynamically change their size over the life of the `cockroach` process.
* Removed `crdb_internal.cluster_execution_insights.txt` and `crdb_internal.cluster_txn_execution_insights.txt` from the <InternalLink version="v23.1" path="cockroach-debug-zip">`debug zip`</InternalLink>. These files contained cluster-wide insights for statements and transactions. Users can still rely on the per-node execution insights in `crdb_internal.node_execution_insights.txt` and `crdb_internal.node_txn_execution_insights.txt`.
* Some debugging-only information about physical plans is no longer collected in the `system.job_info` table for changefeeds, because it has the potential to grow very large.

### Bug fixes

* Fixed handling in the <InternalLink version="v23.1" path="online-schema-changes">declarative schema changer</InternalLink> when columns are included in the `STORING()` clause of <InternalLink version="v23.1" path="create-index">`CREATE INDEX`</InternalLink>. CockroachDB now checks if the column is virtual up-front, and properly detects when a column is already handled by an existing index when the column name has `UTF-8` characters.
* Fixed a bug where a change to a <InternalLink version="v23.1" path="create-type">user-defined type (UDT)</InternalLink> could cause queries against tables using that type to fail with an error message like: `histogram.go:694: span must be fully contained in the bucket`. The change to the user-defined type could occur either directly from an \[ `ALTER TYPE` ]\([https://www.cockroachlabs.com/docs/v23.1/alter-type.html](https://www.cockroachlabs.com/docs/v23.1/alter-type.html) statement or indirectly from an <InternalLink version="v23.1" path="alter-database#add-region">`ALTER DATABASE... ADD REGION`</InternalLink> or <InternalLink version="v23.1" path="alter-database#drop-region">`ALTER DATABASE... DROP REGION`</InternalLink> statement, which implicitly modifies the `crdb_internal_region` UDT. This bug had existed since UDTs were introduced in v20.2.
* Fixed an issue where <InternalLink version="v23.1" path="alter-table#add-column">adding a column</InternalLink> with a default value of an empty array would not succeed.
* <InternalLink version="v23.1" path="alter-table#add-constraint">`ALTER TABLE... ADD CONSTRAINT UNIQUE`</InternalLink>
  will now fail with a well-formed error message and code `42601` if a statement tries to add a unique constraint on an
  expression.
* Fixed a bug in v24.1, v23.2, and v23.1 where using <InternalLink version="v23.1" path="cluster-settings">`changefeed.aggregator.flush_jitter`</InternalLink> with <InternalLink version="v23.1" path="create-changefeed">`min_checkpoint_frequency`</InternalLink> set to zero could cause panics.
* Fixed a bug in which constant `LIKE` patterns containing certain sequences of backslashes did not become constrained scans. This bug has been present since v21.1.13 when support for building constrained scans from `LIKE` patterns containing backslashes was added.
* Fixed a bug that could cause calling a routine to return an unexpected `function... does not exist` error. The bug is triggered when the routine is called twice using the exact same SQL query, and either: (a) the routine has polymorphic arguments, or: (b) in between the two calls, the routine is replaced by a routine with the same name and different parameters. This bug had existed since alpha versions of v23.1.
* Fixed the statistics estimation code in the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> so it does not use the empty histograms produced if histogram collection has been disabled during statistics collection due to excessive memory utilization. Now the optimizer will rely on distinct counts instead of the empty histograms and should produce better plans as a result. This bug had existed since v22.1.

### Contributors

This release includes 56 merged PRs by 27 authors.

## v23.1.23

Release Date: June 20, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.linux-amd64.tgz">
          cockroach-v23.1.23.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.linux-amd64.tgz">
          cockroach-sql-v23.1.23.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.linux-arm64.tgz">
          cockroach-v23.1.23.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.linux-arm64.tgz">
          cockroach-sql-v23.1.23.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.darwin-10.9-amd64.tgz">
          cockroach-v23.1.23.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.23.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.darwin-11.0-arm64.tgz">
          cockroach-v23.1.23.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.23.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.windows-6.2-amd64.zip">
          cockroach-v23.1.23.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.23.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.23.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.23.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.23
```

### Enterprise edition changes

* Fixed a bug that was present since v22.2 where <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> with long-running <InternalLink version="v23.1" path="create-changefeed">initial scans</InternalLink> might incorrectly restore checkpoint job progress and drop events during <InternalLink version="v23.1" path="changefeed-messages#duplicate-messages">changefeed restarts</InternalLink> due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
  * The <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> `changefeed.frontier_checkpoint_frequency` and `changefeed.frontier_highwater_lag_checkpoint_threshold` were set low, which resulted in the initial scan taking many multiples of the configured frequency to complete.
  * There were multiple target tables with significant differences in row counts in one changefeed.
  * The changefeed target tables were large with many ranges.
  * The initial scan took a long time to complete (an hour or longer).
* Introduced the `changefeed.random_replica_selection.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> that changes the behavior of changefeed planning work distribution. When `changefeed.random_replica_selection.enabled` is set to `true`, <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> will evenly distribute their work across all <InternalLink version="v23.1" path="architecture/glossary#replica">replicas</InternalLink>, including <InternalLink version="v23.1" path="architecture/replication-layer#raft">followers</InternalLink>, regardless of <InternalLink version="v23.1" path="architecture/glossary#leaseholder">leaseholder</InternalLink> placement. `changefeed.random_replica_selection.enabled` is disabled by default.

### SQL language changes

* Introduced three new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> for controlling <InternalLink version="v23.1" path="show-statistics#display-forecasted-statistics">table statistics forecasting</InternalLink>:
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.min_observations`</InternalLink>
    is the minimum number of observed statistics required to produce a forecast.
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.min_goodness_of_fit`</InternalLink>
    is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.max_decrease`</InternalLink>
    is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior
    observation.
* Added a new <InternalLink version="v23.1" path="session-variables">session setting</InternalLink> `optimizer_use_improved_multi_column_selectivity_estimate`, which if enabled, causes the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> to use an improved selectivity estimate for multi-column predicates. This setting will default to `true` on v24.2 and later, and `false` on earlier versions.
* The <InternalLink version="v23.1" path="row-level-ttl">row-level TTL</InternalLink> setting <InternalLink version="v23.1" path="row-level-ttl#ttl-storage-parameters">`ttl_delete_rate_limit`</InternalLink> is now set to `100` by default, which sets the rate limit for deleting expired rows to `100`.
* CockroachDB no longer limits precision when converting <InternalLink version="v23.1" path="architecture/glossary#data-types">spatial data types</InternalLink> to <InternalLink version="v23.1" path="jsonb">JSON</InternalLink>.

### Operational changes

* * The `client_authentication_ok` and `client_session_end` events are now logged to the <InternalLink version="v23.1" path="logging-use-cases#sessions">`SESSIONS` log channel</InternalLink> unconditionally. Previously, these would only be logged if the `server.auth_log.sql_sessions.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> was set to `true`. All other `SESSIONS` log messages are still only logged if `server.auth_log.sql_sessions.enabled` or `server.auth_log.sql_connections.enabled` are set to `true`. To not show `client_authentication_ok` and `client_session_end` events, disable the `SESSIONS` log channel entirely.

### DB Console changes

* Viewing the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-results">**SQL Activity**</InternalLink> sorted by `% of Runtime` now correctly sorts entries by the runtime amount.
* The <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> favicon and other image files now render properly.

### Bug fixes

* Fixed a bug where a failed <InternalLink version="v23.1" path="restore">restore</InternalLink> job could leave the system in a state where re-attempting the restore was not possible without manual intervention.

* <InternalLink version="v23.1" path="ui-databases-page#index-recommendations">Index recommendations</InternalLink>
  in the
  <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>
  will now function properly for indexes on tables or columns whose names contain quotation marks or whitespace. For
  example: `CREATE INDEX ON "my table" ("my col");`.

* Fixed a bug introduced in v23.1 where <InternalLink version="v23.1" path="authentication#client-authentication">client certificate authentication</InternalLink> combined with <InternalLink version="v23.1" path="sso-sql#identity-map-configuration">identity maps</InternalLink> ( `server.identity_map.configuration` ) did not work. For the feature to work correctly, the client must specify a valid database user in the <InternalLink version="v23.1" path="connection-parameters">connection string</InternalLink>.

* Statistics forecasts of zero rows can cause suboptimal <InternalLink version="v23.1" path="cost-based-optimizer">query plans</InternalLink>. Forecasting will now avoid predicting zero rows for most downward-trending statistics.

* Fixed a bug where <InternalLink version="v23.1" path="drop-role">`DROP ROLE`</InternalLink> and <InternalLink version="v23.1" path="drop-user">`DROP USER`</InternalLink> could leave references behind inside <InternalLink version="v23.1" path="create-type">`TYPE`s</InternalLink>, which could prevent <InternalLink version="v23.1" path="show-grants">`SHOW GRANTS`</InternalLink> from working.

* Scattering a range with a replication factor of 1 now no longer erroneously up-replicates the range to two replicas. Leases will also no longer thrash between nodes when perturbed with a replication factor of 1.

* Fixed a bug where, if the `ttl_row_stats_poll_interval` storage parameter was non-zero for a table with <InternalLink version="v23.1" path="row-level-ttl">row-level TTL</InternalLink> enabled, the queries issued to update row statistics could block the job from completing. Now, if the job completes, these statistics queries are cancelled. This means that the `jobs.row_level_ttl.total_rows` and `jobs.row_level_ttl.total_expired_rows` metrics will report `0` if the job finishes before the row stats queries complete.

* Fixed a bug where the `results_buffer_size` <InternalLink version="v23.1" path="session-variables">session variable</InternalLink> could not be configured by using the "options" query parameter in the connection string, but only as a top-level query parameter. Now, `results_buffer_size` can be configured in either part of the connection string. This variable still cannot be changed with the <InternalLink version="v23.1" path="set-vars">`SET`</InternalLink> command after the session begins.

* <InternalLink version="v23.1" path="show-types">`SHOW TYPES`</InternalLink>
  now includes user-defined
  <InternalLink version="v23.1" path="create-type#create-a-composite-data-type">composite types</InternalLink>
  . `SHOW TYPES` previously omitted composite types, which were added in v23.1.0.

* Fixed a bug where a change to a <InternalLink version="v23.1" path="create-type">user-defined type</InternalLink> could cause queries against tables using that type to fail with the error `histogram.go:694: span must be fully contained in the bucket`. The change to the user-defined type could come directly from an <InternalLink version="v23.1" path="alter-type">`ALTER TYPE`</InternalLink> statement, or indirectly from an <InternalLink version="v23.1" path="alter-database#add-region">`ALTER DATABASE ADD REGION`</InternalLink> or <InternalLink version="v23.1" path="alter-database#drop-region">`DROP REGION`</InternalLink> statement (which implicitly change the `crdb_internal_region` type). This bug was present since user-defined types were introduced in v20.2.

### Performance improvements

* More efficient <InternalLink version="v23.1" path="cost-based-optimizer">query plans</InternalLink> are now generated for queries with text similarity filters, for example, `text_col % 'foobar'`. These plans are generated if the `optimizer_use_trigram_similarity_optimization` <InternalLink version="v23.1" path="session-variables">session setting</InternalLink> is enabled. It is disabled by default.
* Added a new <InternalLink version="v23.1" path="session-variables">session setting</InternalLink> `optimizer_use_improved_zigzag_join_costing`. When enabled and when the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `enable_zigzag_join` is also enabled, the cost of zigzag joins is updated such that a zigzag join will be chosen over a scan only if it produces fewer rows than a scan.
* Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> from choosing a suboptimal query plan due to over-estimating the selectivity of a multi-column predicate.

### Contributors

This release includes 48 merged PRs by 23 authors.

## v23.1.22

Release Date: May 23, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.linux-amd64.tgz">
          cockroach-v23.1.22.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.linux-amd64.tgz">
          cockroach-sql-v23.1.22.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.linux-arm64.tgz">
          cockroach-v23.1.22.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.linux-arm64.tgz">
          cockroach-sql-v23.1.22.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.darwin-10.9-amd64.tgz">
          cockroach-v23.1.22.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.22.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.darwin-11.0-arm64.tgz">
          cockroach-v23.1.22.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.22.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.windows-6.2-amd64.zip">
          cockroach-v23.1.22.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.22.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.22.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.22.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.22
```

### Enterprise edition changes

* Fixed a bug that was present since v22.2 where <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> with long-running <InternalLink version="v23.1" path="create-changefeed">initial scans</InternalLink> might incorrectly restore checkpoint job progress and drop events during <InternalLink version="v23.1" path="changefeed-messages#duplicate-messages">changefeed restarts</InternalLink> due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
  * The `changefeed.shutdown_checkpoint.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> was enabled.
  * The cluster settings `changefeed.frontier_checkpoint_frequency` and `low changefeed.frontier_highwater_lag_checkpoint_threshold` were set low, which resulted in the initial scan taking many multiples of the configured frequency to complete.
  * There were multiple target tables with significant differences in row counts in one changefeed.
  * The changefeed target tables were large with many ranges.
  * The initial scan took a long time to complete (an hour or longer).

### SQL language changes

* Updated the <InternalLink version="v23.1" path="show-grants">`SHOW GRANTS`</InternalLink> responses to display the `object_type` and `object_name`, which has replaced the `relation_name` column.
* Added <InternalLink version="v23.1" path="create-external-connection">external connection</InternalLink> granted privileges to the <InternalLink version="v23.1" path="show-grants">`SHOW GRANTS`</InternalLink> command.
* Introduced three new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> for controlling table statistics forecasting:
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.min_observations`</InternalLink>
    is the minimum number of observed statistics required to produce a forecast.
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.min_goodness_of_fit`</InternalLink>
    is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.max_decrease`</InternalLink>
    is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior
    observation.
* Added a new <InternalLink version="v23.1" path="session-variables">session setting</InternalLink> `optimizer_use_improved_multi_column_selectivity_estimate`, which if enabled, causes the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> to use an improved selectivity estimate for multi-column predicates. This setting will default to `true` on v24.2 and later, and `false` on earlier versions.

### Command-line changes

* Changed the default `debug compact` maximum compaction concurrency to the number of processors, and added a `--max-concurrency` flag for overriding the new default.

### Bug fixes

* Fixed a bug where a <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> of a backup that itself contained a table created by the `RESTORE` of a table with an in-progress <InternalLink version="v23.1" path="import-into">`IMPORT INTO`</InternalLink> would fail to restore all rows.
* Fixed a bug where <InternalLink version="v23.1" path="authentication#client-authentication">client certificate authentication</InternalLink> combined with <InternalLink version="v23.1" path="sso-sql#identity-map-configuration">identity maps</InternalLink> ( `server.identity_map.configuration` ) did not work. For the feature to work correctly, the client must specify a valid database user in the <InternalLink version="v23.1" path="connection-parameters">connection string</InternalLink>.
* Fixed a bug where the <InternalLink version="v23.1" path="architecture/sql-layer#query-execution">row-based execution engine</InternalLink> could drop a <InternalLink version="v23.1" path="limit-offset">`LIMIT`</InternalLink> clause when there was an <InternalLink version="v23.1" path="order-by">`ORDER BY`</InternalLink> clause, and the ordering was partially provided by an input operator. For example, this bug could occur with an ordering such as `ORDER BY a, b` when the scanned index was only ordered on column `a`. The impact of this bug was that more rows may have been returned than specified by the `LIMIT` clause. This bug is only present when not using the <InternalLink version="v23.1" path="architecture/sql-layer#vectorized-query-execution">vectorized execution engine</InternalLink>. That is, when running with `SET vectorize = off;`. This bug has existed since CockroachDB v22.1.
* Statistics forecasts of zero rows can cause suboptimal <InternalLink version="v23.1" path="cost-based-optimizer">query plans</InternalLink>. Forecasting will now avoid predicting zero rows for most downward-trending statistics.
* Fixed a bug in the DB Console's <InternalLink version="v23.1" path="ui-custom-chart-debug-page">**Custom Chart**</InternalLink> tool where store-level metrics were displayed only for the first store ID associated with the node. Now data is displayed for all stores present on a node, and a single time series is shown for each store, rather than an aggregated value for all of the node's stores. This allows finer-grained monitoring of store-level metrics.
* Fixed a bug where a <InternalLink version="v23.1" path="show-jobs">job</InternalLink> would fail if it reported an out-of-bound progress fraction. The error is now logged and no longer causes the job to fail.
* Fixed a bug where, in certain cases, using virtual tables such as `crdb_internal.system_jobs` could result in the internal error `attempting to append refresh spans after the tracked timestamp has moved forward`.

### Performance improvements

* More efficient <InternalLink version="v23.1" path="cost-based-optimizer">query plans</InternalLink> are now generated for queries with text similarity filters, for example, `text_col % 'foobar'`. These plans are generated if the `optimizer_use_trigram_similarity_optimization` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> is enabled. It is disabled by default.
* The <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> now costs `distinct-on` operators more accurately. It may produce more efficient query plans in some cases.
* Added a new <InternalLink version="v23.1" path="session-variables">session setting</InternalLink> `optimizer_use_improved_zigzag_join_costing`. When enabled and when the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `enable_zigzag_join` is also enabled, the cost of zigzag joins is updated such that a zigzag join will be chosen over a scan only if it produces fewer rows than a scan.
* Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> from choosing a bad query plan due to over-estimating the selectivity of a multi-column predicate.
* Improved the efficiency of error handling in the <InternalLink version="v23.1" path="vectorized-execution">vectorized execution engine</InternalLink> to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts.

### Contributors

This release includes 51 merged PRs by 23 authors.

## v23.1.21

Release Date: May 7, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.linux-amd64.tgz">
          cockroach-v23.1.21.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.linux-amd64.tgz">
          cockroach-sql-v23.1.21.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.linux-arm64.tgz">
          cockroach-v23.1.21.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.linux-arm64.tgz">
          cockroach-sql-v23.1.21.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.darwin-10.9-amd64.tgz">
          cockroach-v23.1.21.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.21.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.darwin-11.0-arm64.tgz">
          cockroach-v23.1.21.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.21.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.windows-6.2-amd64.zip">
          cockroach-v23.1.21.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.21.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.21.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.21.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.21
```

### SQL language changes

* The `FORCE_INVERTED_INDEX` hint causes the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> to prefer a query plan scan over any <InternalLink version="v23.1" path="inverted-indexes">inverted index</InternalLink> of the hinted table. An error is emitted if no such query plan can be generated.
* Introduced three new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> for controlling <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">table statistics</InternalLink> forecasting:
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.min_observations`</InternalLink>
    is the minimum number of observed statistics required to produce a forecast.
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.min_goodness_of_fit`</InternalLink>
    is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
  * <InternalLink version="v23.1" path="cluster-settings">`sql.stats.forecasts.max_decrease`</InternalLink>
    is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior
    observation.
* Added a <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> `optimizer_use_improved_multi_column_selectivity_estimate`, which if enabled, causes the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> to use an improved selectivity estimate for multi-column predicates. This setting will default to `true` on v24.2 and later, and `false` on prior versions.

### Operational changes

* A minimum <InternalLink version="v23.1" path="architecture/replication-layer#raft">Raft scheduler</InternalLink> concurrency is now enforced per <InternalLink version="v23.1" path="architecture/storage-layer#overview">store</InternalLink> so that nodes with many stores do not spread workers too thinly. This helps to avoid high scheduler latency across replicas on a store when load is imbalanced.

### Bug fixes

* Fixed a bug introduced in v22.2.9 that could cause a slow memory leak that can accumulate when opening many new connections.
* <InternalLink version="v23.1" path="create-sequence">Sequence</InternalLink>
  options for `NO MINVALUE` and `NO MAXVALUE` now match [PostgreSQL
  behavior](https://www.postgresql.org/docs/current/sql-createsequence). Sequence `MINVALUE` and `MAXVALUE` now
  automatically adjust to the bounds of a new integer type in
  <InternalLink version="v23.1" path="alter-sequence">`ALTER SEQUENCE... AS`</InternalLink>
  , matching PostgreSQL behavior.
* Fixed a bug where the <InternalLink version="v23.1" path="ui-statements-page#charts">timeseries graphs shown on the **SQL Activity Statement Fingerprint** page</InternalLink> in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> were not rendering properly. This involved fixing a bug related to setting the time range of the charts.
* Fixed a bug where CockroachDB could incorrectly evaluate `IN` expressions that had `INT2` or `INT4` type on the left side, and values on the right side that were outside the range of the left side. The bug had been present since at least v21.1.
* Previously, on long-running <InternalLink version="v23.1" path="show-sessions">sessions</InternalLink> that issue many (hundreds of thousands or more) <InternalLink version="v23.1" path="transactions">transactions</InternalLink>, CockroachDB's internal memory accounting system, the limit for which is configured via the <InternalLink version="v23.1" path="cockroach-start#general">`--max-sql-memory` flag</InternalLink> could leak. This bug, in turn, could result in the error message `"root: memory budget exceeded"` for other queries. The bug was present in v23.1.17 and is now fixed.
* Reintroduced <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.auth.modify_cluster_setting_applies_to_all.enabled` so that mixed-version clusters can migrate off of this setting, which is deprecated in favor of the privilege <InternalLink version="v23.1" path="set-cluster-setting#required-privileges">`MODIFYSQLCLUSTERSETTING`</InternalLink>.
* Fixed a bug where a <InternalLink version="v23.1" path="grant">`GRANT... ON ALL TABLES`</InternalLink> statement could fail if sequences existed and they did not support a privilege (e.g., `BACKUP` ).
* Fixed a bug where <InternalLink version="v23.1" path="authentication#client-authentication">client certificate authentication</InternalLink> combined with <InternalLink version="v23.1" path="sso-sql#identity-map-configuration">identity maps</InternalLink> ( `server.identity_map.configuration` ) did not work. For the feature to work correctly, the client must specify a valid database user in the <InternalLink version="v23.1" path="connection-parameters">connection string</InternalLink>. This bug had been present since v23.1.
* Statistics forecasts of zero rows can cause suboptimal <InternalLink version="v23.1" path="cost-based-optimizer">query plans</InternalLink>. Forecasting will now avoid predicting zero rows for most downward-trending statistics.

### Performance improvements

* More efficient <InternalLink version="v23.1" path="cost-based-optimizer">query plans</InternalLink> are now generated for queries with text similarity filters, for example, `text_col % 'foobar'`. These plans are generated if the `optimizer_use_trigram_similarity_optimization` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> is enabled. It is disabled by default.
* Added a new <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> `optimizer_use_improved_zigzag_join_costing`. When enabled, the cost of <InternalLink version="v23.1" path="cost-based-optimizer#zigzag-joins">zigzag joins</InternalLink> is updated so zigzag joins will only be chosen over scans if the zigzag joins produce fewer rows. This change only applies if the session variable `enable_zigzag_join` is also `on`.
* Improved the selectivity estimation of multi-column filters by the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> when the multi-column distinct count is high. This avoids cases where CockroachDB significantly over-estimates the selectivity of a multi-column predicate and as a result can prevent the optimizer from choosing a bad query plan.

### Contributors

This release includes 59 merged PRs by 26 authors.

## v23.1.20

Release Date: May 1, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.linux-amd64.tgz">
          cockroach-v23.1.20.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.linux-amd64.tgz">
          cockroach-sql-v23.1.20.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.linux-arm64.tgz">
          cockroach-v23.1.20.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.linux-arm64.tgz">
          cockroach-sql-v23.1.20.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.darwin-10.9-amd64.tgz">
          cockroach-v23.1.20.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.20.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.darwin-11.0-arm64.tgz">
          cockroach-v23.1.20.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.20.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.windows-6.2-amd64.zip">
          cockroach-v23.1.20.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.20.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.20.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.20.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.20
```

### SQL language changes

* Added a <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> `optimizer_use_improved_multi_column_selectivity_estimate`, which if enabled, causes the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> to use an improved selectivity estimate for multi-column predicates. This setting will default to `true` on versions 24.2+, and `false` on prior versions.
* Added three new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> for controlling <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">optimizer table statistics</InternalLink> forecasting:
  1. `sql.stats.forecasts.min_observations` is the minimum number of observed statistics required to produce a forecast.
  2. `sql.stats.forecasts.min_goodness_of_fit` is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
  3. `sql.stats.forecasts.max_decrease` is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation.

### Bug fixes

* Statistics forecasts of zero rows by <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">the optimizer</InternalLink> can cause bad plans. This commit changes forecasting to avoid predicting zero rows for most downward-trending statistics.
* A <InternalLink version="v23.1" path="show-jobs">job</InternalLink> will now <InternalLink version="v23.1" path="logging#ops">log</InternalLink> rather than fail if it reports an out-of bound progress fraction.

### Performance improvements

* Added a new <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> `optimizer_use_improved_zigzag_join_costing`. When enabled, the cost of <InternalLink version="v23.1" path="cost-based-optimizer#zigzag-joins">zigzag joins</InternalLink> is updated so zigzag joins will only be chosen over scans if the zigzag joins produce fewer rows. This change only applies if the session variable `enable_zigzag_join` is also `on`.
* Improved the selectivity estimation of multi-column filters by the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> when the multi-column distinct count is high. This avoids cases where CockroachDB significantly over-estimates the selectivity of a multi-column predicate and as a result can prevent the optimizer from choosing a bad query plan.

### Contributors

This release includes 5 merged PRs by 5 authors.

## v23.1.19

Release Date: April 18, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.linux-amd64.tgz">
          cockroach-v23.1.19.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.linux-amd64.tgz">
          cockroach-sql-v23.1.19.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.linux-arm64.tgz">
          cockroach-v23.1.19.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.linux-arm64.tgz">
          cockroach-sql-v23.1.19.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.darwin-10.9-amd64.tgz">
          cockroach-v23.1.19.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.19.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.darwin-11.0-arm64.tgz">
          cockroach-v23.1.19.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.19.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.windows-6.2-amd64.zip">
          cockroach-v23.1.19.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.19.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.19.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.19.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.19
```

### Bug fixes

* Reintroduced <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.auth.modify_cluster_setting_applies_to_all.enabled` so that mixed-version clusters can migrate off of this setting, which is deprecated in favor of the privilege <InternalLink version="v23.1" path="set-cluster-setting#required-privileges">`MODIFYSQLCLUSTERSETTING`</InternalLink>.

## v23.1.18

Release Date: April 9, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.linux-amd64.tgz">
          cockroach-v23.1.18.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.linux-amd64.tgz">
          cockroach-sql-v23.1.18.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.linux-arm64.tgz">
          cockroach-v23.1.18.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.linux-arm64.tgz">
          cockroach-sql-v23.1.18.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.darwin-10.9-amd64.tgz">
          cockroach-v23.1.18.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.18.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.darwin-11.0-arm64.tgz">
          cockroach-v23.1.18.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.18.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.windows-6.2-amd64.zip">
          cockroach-v23.1.18.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.18.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.18.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.18.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.18
```

### SQL language changes

* Fixed an oversight where CockroachDB was allowing mutation statements (such as <InternalLink version="v23.1" path="update">`UPDATE`</InternalLink> or <InternalLink version="v23.1" path="delete">`DELETE`</InternalLink> ) and locking statements (such as <InternalLink version="v23.1" path="select-for-update">`SELECT... FOR UPDATE`</InternalLink> ) in implicit single-statement <InternalLink version="v23.1" path="transactions">transactions</InternalLink> using <InternalLink version="v23.1" path="as-of-system-time">`AS OF SYSTEM TIME`</InternalLink>.

### Operational changes

* The `admission.kv.bulk_only.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>, when set to `true`, only skips store-level <InternalLink version="v23.1" path="admission-control">admission control</InternalLink> for normal priority work, and continues to subject the work to CPU admission control.

### DB Console changes

* Resolved an issue where clusters with multiple <InternalLink version="v23.1" path="cockroach-start#store">stores</InternalLink> per node could list inaccurate region/node information on the <InternalLink version="v23.1" path="ui-databases-page">Databases Page</InternalLink>.
* Fixed a bug where the <InternalLink version="v23.1" path="ui-statements-page#charts">timeseries graphs shown on the **SQL Activity Statement Fingerprint** page</InternalLink> in <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> were not rendering properly. This involved fixing a bug related to setting the time range of the charts.

### Bug fixes

* Previously, on long-running <InternalLink version="v23.1" path="show-sessions">sessions</InternalLink> that issue many (hundreds of thousands or more) <InternalLink version="v23.1" path="transactions">transactions</InternalLink>, CockroachDB's internal memory accounting system, the limit for which is configured via the <InternalLink version="v23.1" path="cockroach-start#general">`--max-sql-memory` flag</InternalLink> ), could leak. This bug, in turn, could result in the error message `"root: memory budget exceeded"` for other queries. The bug was present in v23.1.17 and is now fixed.
* Fix a bug where running <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> on certain <InternalLink version="v23.1" path="backup-and-restore-overview">backups</InternalLink> would open a very large number of connections to the <InternalLink version="v23.1" path="use-cloud-storage">backup storage provider</InternalLink>.
* A user with the `VIEWACTIVITYREDACTED` <InternalLink version="v23.1" path="security-reference/authorization#managing-privileges">privilege</InternalLink> can no longer see constants inside of queries that originate from other <InternalLink version="v23.1" path="security-reference/authorization#roles">users</InternalLink> in the <InternalLink version="v23.1" path="show-sessions">`SHOW SESSIONS`</InternalLink> result. Previously, this redaction did not occur.
* Previously, the <InternalLink version="v23.1" path="show-statements#aliases">`SHOW QUERIES`</InternalLink> and <InternalLink version="v23.1" path="show-statements">`SHOW STATEMENTS`</InternalLink> required the user to have the `VIEWACTIVITY` or `VIEWACTIVITYREDACTED` <InternalLink version="v23.1" path="security-reference/authorization#managing-privileges">privilege</InternalLink>. However, a user should always be able to view their own queries, even without these privileges. This is now fixed.
* Fixed a bug in which it was possible to `SET transaction_read_only = false` during an <InternalLink version="v23.1" path="as-of-system-time">`AS OF SYSTEM TIME`</InternalLink> transaction.
* Fixed a slow memory leak that could accumulate when opening many new <InternalLink version="v23.1" path="connection-pooling">connections</InternalLink>. The bug was present in v22.2.9+ and v23.1+.
* Users will no longer see <InternalLink version="v23.1" path="views">views</InternalLink> displayed on the <InternalLink version="v23.1" path="ui-databases-page">**Databases** page</InternalLink> in <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>. Previously, views would be listed with no information, only displaying errors.

### Performance improvements

* Enabled the <InternalLink version="v23.1" path="admission-control">admission control</InternalLink> CPU limiter for <InternalLink version="v23.1" path="row-level-ttl">row-level TTL</InternalLink> to reduce latency impact from CPU-intensive scans issued as part of <InternalLink version="v23.1" path="row-level-ttl#view-scheduled-ttl-jobs">row-level TTL jobs</InternalLink>.

### Contributors

This release includes 45 merged PRs by 27 authors.

## v23.1.17

Release Date: March 19, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.linux-amd64.tgz">
          cockroach-v23.1.17.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.linux-amd64.tgz">
          cockroach-sql-v23.1.17.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.linux-arm64.tgz">
          cockroach-v23.1.17.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.linux-arm64.tgz">
          cockroach-sql-v23.1.17.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.darwin-10.9-amd64.tgz">
          cockroach-v23.1.17.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.17.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.darwin-11.0-arm64.tgz">
          cockroach-v23.1.17.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.17.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.windows-6.2-amd64.zip">
          cockroach-v23.1.17.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.17.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.17.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.17.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.17
```

### Security updates

* A user with the <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">`VIEWACTIVITY` privilege</InternalLink> can now request a statement bundle from the <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> in the DB Console or with the internal builtin function `crdb_internal.requests_statement_bundle`.

* Clusters using <InternalLink version="v23.1" path="sso-sql">Cluster Single Sign-on (SSO) with JSON web tokens (JWTs)</InternalLink> can now optionally fetch signing keys from configured issuers instead of configuring static signing keys for each issuer. When the new <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `server.jwt_authentication.jwks_auto_fetch.enabled` is set to `true`, signing keys are automatically fetched from the issuer using metadata published in its OpenID configuration. In this case, static signing keys in `server.jwt_authentication.jwks` are ignored. When automatic fetching is enabled, there may be a slight increase in network latency for each JWT authentication request, proportional to the latency between the cluster and the issuer's endpoint.

* <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>
  cookies are marked `Secure` for the browser when the cluster is running in secure mode.

* The <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> `session` cookie is now marked `HttpOnly` to prevent it from being read by any Javascript code.

### SQL language changes

* The new [cluster setting](https://cockroachlabs.com/docs/v23.1/cluster-settings) `server.max_open_transactions_per_gateway`, when set to a non-negative value, prevents users without the <InternalLink version="v23.1" path="security-reference/authorization#admin-role">`admin` role</InternalLink> from executing a query if more than this number of <InternalLink version="v23.1" path="transactions">transactions</InternalLink> are open on the current <InternalLink version="v23.1" path="architecture/life-of-a-distributed-transaction#gateway">gateway node</InternalLink>.
* Added support for <InternalLink version="v23.1" path="table-expressions#force-index-selection">index hinting</InternalLink> with <InternalLink version="v23.1" path="insert">`INSERT`</InternalLink> and <InternalLink version="v23.1" path="upsert">`UPSERT`</InternalLink> statements. This allows `INSERT... ON CONFLICT` and `UPSERT` queries to use index hints in the same way as <InternalLink version="v23.1" path="update">`UPDATE`</InternalLink> and <InternalLink version="v23.1" path="delete">`DELETE`</InternalLink> statements.

### Operational changes

* You can now pass the `--include-range-info` flag when <InternalLink version="v23.1" path="cockroach-debug-zip">generating a diagnostic bundle</InternalLink> to include problem ranges.
* In unredacted diagnostic bundles, two columns have been added to the `crdb_internal.transaction_contention_events` table:
  * `waiting_stmt_query`: the query of the statement that is waiting to run.
  * `blocking_txn_queries_unordered`: an unordered list of the blocking transaction's queries.

### DB Console changes

* The <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> now always shows the entire selected period, instead of only the period that contains data.
* The <InternalLink version="v23.1" path="ui-overload-dashboard">**Overload Dashboard**</InternalLink> page now includes two additional graphs:
  * **Elastic CPU Utilization**: Shows the actual CPU used for elastic work compared with the configured limit.
  * **Elastic CPU Exhausted Duration Per Second**: Shows how much time, in milliseconds, that elastic work has been subject to CPU exhaustion.

### Bug fixes

* Fixed a bug where creating a <InternalLink version="v23.1" path="change-data-capture-overview">changefeed</InternalLink> that targeted tables with a zero-scale <InternalLink version="v23.1" path="decimal">`DECIMAL(n)`</InternalLink> column, `format='avro'`, and `diff` would cause a panic.

* Fixed a bug where a <InternalLink version="v23.1" path="change-data-capture-overview">changefeed</InternalLink> could omit events in rare cases, logging the error `cdc ux violation: detected timestamp... that is less or equal to the local frontier`. This could happen in the following scenario:
  1. A <InternalLink version="v23.1" path="create-and-configure-changefeeds#enable-rangefeeds">rangefeed</InternalLink> runs on a follower <InternalLink version="v23.1" path="architecture/glossary#cockroachdb-architecture-terms">replica</InternalLink> that lags significantly behind the <InternalLink version="v23.1" path="architecture/glossary#cockroachdb-architecture-terms">leaseholder</InternalLink>.
  2. A transaction commits and removes its <InternalLink version="v23.1" path="architecture/transaction-layer#transaction-records">transaction record</InternalLink> before its <InternalLink version="v23.1" path="architecture/transaction-layer#writing">intent</InternalLink> resolution is applied on the follower.
  3. The follower's <InternalLink version="v23.1" path="architecture/transaction-layer#closed-timestamps">closed timestamp</InternalLink> has advanced past the transaction commit timestamp.
  4. The rangefeed attempts to push the transaction to a new timestamp (at least 10 seconds after the transaction began).
  5. This may cause the rangefeed to prematurely emit a checkpoint before emitting writes at lower timestamps, which in turn may cause the <InternalLink version="v23.1" path="change-data-capture-overview">changefeed</InternalLink> to drop these events entirely, never emitting them.

* Fixed a bug introduced in v22.2 where queries issued by <InternalLink version="v23.1" path="row-level-ttl#view-scheduled-ttl-jobs">TTL jobs</InternalLink> did not use optimal plans.

* Fixed a bug introduced in v23.1.0 where a <InternalLink version="v23.1" path="node-shutdown?filters=decommission#decommission-the-node">decommissioning</InternalLink> replica that is part of a mis-replicated range could get stuck on a rebalance operation that was falsely determined to be unsafe.

* Fixed a bug introduced in v22.2 where adding multiple columns with <InternalLink version="v23.1" path="unique">`UNIQUE` constraints</InternalLink> in a single statement could result in the error `secondary index for backfill contains physical column not present in source primary index`.

* Fixed a bug where an `unable to get CPU capacity` error could be logged every 10 seconds when running outside of a CPU `cgroup`.

* Fixed a bug where an <InternalLink version="v23.1" path="show-jobs#show-automatic-jobs">`AUTO CREATE STATS` job</InternalLink> could cause an internal system table to grow, and this could cause slow queries related to the job system.

* Fixed a bug that caused a confusing error when a sequence name allocated by <InternalLink version="v23.1" path="serial">`SERIAL`</InternalLink> conflicted with an existing type name.

* Fixed a bug where an <InternalLink version="v23.1" path="alter-table#alter-primary-key">`ALTER PRIMARY KEY`</InternalLink> query could fail with the error `non-nullable column {x} with no value! Index scanned..` when validating a recreated <InternalLink version="v23.1" path="indexes">secondary index</InternalLink>.

* Fixed a bug introduced in v23.1 that could cause the internal error `attempting to append refresh spans after the tracked timestamp has moved forward` to be logged in some cases when using virtual tables such as`crdb_internal.system_jobs`.

* Fixed a bug in the `crdb_internal.leases` table where a deadlock in the leasing system could cause a node to become unavailable.

* Fixed a bug introduced in v23.1.15 where a <InternalLink version="v23.1" path="create-and-configure-changefeeds#enable-rangefeeds">rangefeed</InternalLink>-resolved timestamp could get stuck after a <InternalLink version="v23.1" path="architecture/distribution-layer#range-merges">range merge</InternalLink> if the range cache thinks the barrier spans multiple ranges. The log message `pushing old intents failed: range barrier failed, range split` is constantly emitted.

* Fixed a rare panic that could happen during a <InternalLink version="v23.1" path="import">`pg_dump` import</InternalLink> that contains a subquery in one of its arguments, such as a function like `SELECT addgeometrycolumn(...)`. Now, attempting to import a `pg_dump` with a function that has a subquery in one of its arguments results in an error rather than a panic.

* Fixed a bug in the <InternalLink version="v23.1" path="changefeed-sinks#webhook-sink">webhook sink</InternalLink> where the `http` request body may not be initialized on retries, resulting in the error `http: ContentLength=... with Body length 0`.

* Fixed a bug where some files were not closed when inspecting backup metadata during <InternalLink version="v23.1" path="backup">`BACKUP`</InternalLink> and <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> operations.

* Fixed a bug that could cause internal errors to be logged when executing an <InternalLink version="v23.1" path="export">`EXPORT`</InternalLink> statement.

* Fixed a bug where a <InternalLink version="v23.1" path="online-schema-changes">schema change</InternalLink> with a large number of descriptors could perform a <InternalLink version="v23.1" path="show-full-table-scans">full table scan</InternalLink> on the `system.leases` table.

* Fixed a bug introduced in v22.1.0 that could cause the `sql.txns.open.internal` and `sql.statements.active.internal` gauge metrics never to be updated, leading to an incorrect count of the number of transactions and statements executed by operations internal to CockroachDB. These metrics do not include operations executed by external SQL clients.

* Fixed a bug introduced in v22.2.9 that could cause a slow memory leak that can accumulate when opening many new connections.

### Contributors

This release includes 94 merged PRs by 33 authors.

## v23.1.16

Release Date: February 27, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.linux-amd64.tgz">
          cockroach-v23.1.16.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.linux-amd64.tgz">
          cockroach-sql-v23.1.16.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.linux-arm64.tgz">
          cockroach-v23.1.16.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.linux-arm64.tgz">
          cockroach-sql-v23.1.16.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.darwin-10.9-amd64.tgz">
          cockroach-v23.1.16.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.16.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.darwin-11.0-arm64.tgz">
          cockroach-v23.1.16.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.16.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.windows-6.2-amd64.zip">
          cockroach-v23.1.16.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.16.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.16.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.16.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.16
```

### Bug fixes

* Fixed a bug where <InternalLink version="v23.1" path="create-and-configure-changefeeds#enable-rangefeeds">rangefeed</InternalLink> resolved timestamps could get stuck, continually emitting the <InternalLink version="v23.1" path="logging">log message</InternalLink> `"pushing old intents failed: range barrier failed, range split"`, typically following a <InternalLink version="v23.1" path="architecture/distribution-layer#range-merges">range merge</InternalLink>. This bug was introduced in v23.1.15.

### Contributors

This release includes 2 merged PRs by 2 authors.

## v23.1.15

Release Date: February 20, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.linux-amd64.tgz">
          cockroach-v23.1.15.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.linux-amd64.tgz">
          cockroach-sql-v23.1.15.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.linux-arm64.tgz">
          cockroach-v23.1.15.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.linux-arm64.tgz">
          cockroach-sql-v23.1.15.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.darwin-10.9-amd64.tgz">
          cockroach-v23.1.15.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.15.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.darwin-11.0-arm64.tgz">
          cockroach-v23.1.15.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.15.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.windows-6.2-amd64.zip">
          cockroach-v23.1.15.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.15.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.15.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.15.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.15
```

### Security updates

* The <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> `session` cookie is now marked `HttpOnly` to prevent it from being read by any Javascript code and is marked `Secure` by the browser when the cluster operates in secure mode.

### Bug fixes

* Fixed a bug where <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> that targeted schema-locked tables could fail due to an old high-water timestamp being incorrectly persisted.

* Fixed a bug where creating a <InternalLink version="v23.1" path="change-data-capture-overview">changefeed</InternalLink> that targeted tables with a `DECIMAL(n)` column (that is, zero-scale <InternalLink version="v23.1" path="decimal">`DECIMAL`</InternalLink> column), `format='avro'`, and `diff` would cause a panic.

* Fixed a bug that could cause a <InternalLink version="v23.1" path="create-changefeed">`CREATE CHANGEFEED WITH {key_column}`</InternalLink> statement to retry forever.

* Fixed a bug that prevented database <InternalLink version="v23.1" path="restore">restore</InternalLink> when the database contained a view or routine that referenced a user-defined type in the body string. For views, this bug was introduced in v20.2 when UDTs were introduced. For routines, this bug was introduced in v22.2 when UDFs were introduced.

* Fixed a durability issue in the Raft log storage mechanism due to improper synchronization of filesystem metadata, potentially leading to the loss of specific write operations ( `AddSSTable` ), notably utilized by operations such as `RESTORE`. This vulnerability was exposed only under conditions of power failure or operating system crashes, potentially causing CockroachDB to enter a crash loop upon restart. In extreme scenarios, such as a simultaneous power outage or crash across multiple nodes, it could result in an irrecoverable quorum loss.

* Fixed an issue in Raft log truncation that had the potential to cause crash loops and irretrievable quorum loss, especially in the rare but severe scenario where all replicas concurrently enter a crash loop. This issue emerged under conditions where the cluster was processing a bulk write operation (such as schema changes, imports, or restores), while a log truncation command was active, and the CockroachDB process experienced a crash.

* Fixed the total runtime value referenced in SQL stats, resolving the bug where the <InternalLink version="v23.1" path="ui-overview">Console</InternalLink> erroneously displayed percentages over 100%.

* Fixed an issue where the values for the current and past hour in the top Activity table were calculated incorrectly, causing a missing data issue in SQL stats and, consequently, on the <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity</InternalLink> page.

* Fixed a bug where CockroachDB would erroneously return an error if an empty search path parameter was encountered during search path setting.

* Fixed a bug in the <InternalLink version="v23.1" path="row-level-ttl">Row-Level TTL</InternalLink> job that would cause it to skip expired rows if the primary key of the table included columns of the collated string type. This bug was present since the initial release of row-level TTL in v22.2.0.

* Fixed a bug that could cause <InternalLink version="v23.1" path="delete">`DELETE`</InternalLink> queries sent by the <InternalLink version="v23.1" path="row-level-ttl">Row-Level TTL</InternalLink> job to use a secondary index rather than the primary index to find the rows to delete. This could lead to some `DELETE` operations taking a much longer time than they should. This bug was present since v22.2.0.

* Fixed a bug where concurrent <InternalLink version="v23.1" path="grant">`GRANT`</InternalLink> statements can cause deadlocks.

* Reduced the impact of bulk deletions ( <InternalLink version="v23.1" path="drop-table">`DROP TABLE`</InternalLink>, <InternalLink version="v23.1" path="truncate">`TRUNCATE`</InternalLink>, or replica removals) on foreground traffic by altering storage engine compaction priorities.

* Resolved an issue where DML operations would fail during the creation of a hash-sharded index, resulting in an error stating column `crdb_internal_val_shard_16` does not exist. This bug was present since v23.1.0.

* <InternalLink version="v23.1" path="show-jobs#show-automatic-jobs">`AUTO CREATE STATS`</InternalLink>
  jobs no longer lead to growth in an internal system table resulting in slower job-system related queries.

* <InternalLink version="v23.1" path="alter-table#alter-primary-key">`ALTER PRIMARY KEY`</InternalLink> no longer fail with an `non-nullable column <x> with no value! Index scanned..` error when validating recreated secondary indexes.

* Fixed a bug where CockroachDB could encounter an error `unable to encode table key: *tree.DTSQuery` when operating on columns of <InternalLink version="v23.1" path="tsquery">`TSQuery`</InternalLink> type in some contexts (e.g. when collecting table statistics or when performing a `DISTINCT` operation). The bug has been present since 23.1 when support for TSQuery type was added.

* Fixed a bug where in some cases CockroachDB could incorrectly evaluate queries that scanned an inverted index and had a `WHERE` filter in which two sides of the `AND` expression had "similar" expressions (e.g. `ARRAY['str1'] <@ col AND (ARRAY['str1'] && col OR...)` ). The bug has been present since pre-22.2 version.

* CockroachDB now correctly logs the top 5 hot ranges per cluster instead of per node.

* Fixed a bug where a <InternalLink version="v23.1" path="change-data-capture-overview">changefeed</InternalLink> could omit events in rare cases, logging the error `cdc ux violation: detected timestamp... that is less or equal to the local frontier`. This can happen if a <InternalLink version="v23.1" path="create-and-configure-changefeeds#enable-rangefeeds">rangefeed</InternalLink> runs on a follower replica that lags significantly behind the leaseholder, a transaction commits and removes its transaction record before its intent resolution is applied on the follower, the follower's closed timestamp has advanced past the transaction commit timestamp, and the rangefeed attempts to push the transaction to a new timestamp (at least 10 seconds after the transaction began). This may cause the rangefeed to prematurely emit a checkpoint before emitting writes at lower timestamps, which in turn may cause the changefeed to drop these events entirely, never emitting them.

### Contributors

This release includes 96 merged PRs by 39 authors. We would like to thank the following contributors from the CockroachDB community:

* Nikolai Vladimirov (first-time contributor)

## v23.1.14

Release Date: January 17, 2024

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.linux-amd64.tgz">
          cockroach-v23.1.14.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.linux-amd64.tgz">
          cockroach-sql-v23.1.14.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.linux-arm64.tgz">
          cockroach-v23.1.14.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.linux-arm64.tgz">
          cockroach-sql-v23.1.14.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.darwin-10.9-amd64.tgz">
          cockroach-v23.1.14.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.14.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.darwin-11.0-arm64.tgz">
          cockroach-v23.1.14.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.14.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.windows-6.2-amd64.zip">
          cockroach-v23.1.14.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.14.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.14.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.14.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.14
```

### SQL language changes

* CockroachDB now supports <InternalLink version="v23.1" path="import-into">importing into</InternalLink> a table that has columns typed as arrays of user-defined types (such as enums). Tables that use multiple user-defined types with the same name but different schemas are still unsupported.
* Added a new field, `StmtPosInTxn`, to the `CommonSQLExecDetails` (included in SQL audit logs, SQL execution logs, and telemetry events) to represent the statement's index (position) in the transaction. The first statement's `StmtPosInTxn` is `1`.

### Operational changes

* Updated the <InternalLink version="v23.1" path="cluster-settings#settings">`changefeed.lagging_ranges_threshold`</InternalLink> and <InternalLink version="v23.1" path="cluster-settings#settings">`changefeed.lagging_ranges_polling_interval`</InternalLink> cluster settings to be public in v23.1.

### DB Console changes

* The <InternalLink version="v23.1" path="ui-cluster-overview-page">**Cluster Overview** page</InternalLink> now correctly renders the background color for email signups, fixing an issue where it was difficult to read the text.

* Updated the **CPU Time** label to **SQL CPU Time** on the <InternalLink version="v23.1" path="ui-overview-dashboard">Overview page</InternalLink> and clarified the tooltip.

* Fixed an issue where the following `AggHistogram`-powered metrics reported quantiles incorrectly in the <InternalLink version="v23.1" path="ui-overview-dashboard">Overview page</InternalLink>. The list of affected metrics is:
  * `changefeed.message_size_hist`
  * `changefeed.parallel_io_queue_nanos`
  * `changefeed.sink_batch_hist_nanos`
  * `changefeed.flush_hist_nanos`
  * `changefeed.commit_latency`
  * `changefeed.admit_latency`
  * `jobs.row_level_ttl.span_total_duration`
  * `jobs.row_level_ttl.select_duration`
  * `jobs.row_level_ttl.delete_duration`

    This bug affected only DB Console dashboards and not the Prometheus-compatible endpoint `/_status/vars`.

* In the **SQL Activity Transaction Details** page, you can now view a transaction fingerprint ID across multiple applications by passing a comma-separated encoded string of transaction fingerprint IDs in the `appNames` URL search parameter.

### Bug fixes

* Fixed a bug in in the TimeScale component's **Now** button behavior that could prevent charts from updating after a custom time range was selected.

* Fixed a bug where an active replication report update could get stuck in a retry loop on clusters with over 10000 ranges, which would prevent a node from shutting down cleanly.

* Fixed a nil pointer dereference bug in the error handling for `GetFiles`.

* Fixed a bug that prevented the **SQL Activity** page from showing internal statements when the `sql.stats.response.show_internal.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> was set to `true`.

* Fixed a bug that could cause a discrepancy between computed statistics and the stored value for statics when a delete was rolled back.

* Fixed a bug introduced in v23.1 that could cause an internal error Previously, CockroachDB could encounter an internal error when using a prepared statement using the `text` format with a user-defined composite type.

* Fixed a bug that would cause a <InternalLink version="v23.1" path="sql-grammar">prepared statement</InternalLink> to fail if it references an enum as well as a table that has undergone a schema change.

* Fixed a bug that could cause finalization during a major-version upgrade to contend with descriptor lease renewals on a large cluster. Descriptor lease renewals now always have a lower priority than finalization.

* <InternalLink version="v23.1" path="backup">Backups</InternalLink>
  now evenly distribute their work across all replicas, including followers, regardless of leaseholder placement.

* Fixed a bug that could cause replica processing in store queues to get stuck if a the replica's ID has changed.

* Fixed an bug introduced in v22.2 that could lead to stuck queries or inaccurate results when using lookup <InternalLink version="v23.1" path="joins">joins</InternalLink> involving equality columns and multiple ranges.

* Fixed a bug in the declarative schema changer that could cause <InternalLink version="v23.1" path="create-index">`CREATE INDEX`</InternalLink> with expressions to fail on materialized <InternalLink version="v23.1" path="views">views</InternalLink>.

* Fixed a bug that could cause an inaccorate "too few columns" error for a query that used `ANY {array}` syntax with a subquery.

* Fixed a bug that could cause a "too few/many columns" errors for a query that used an `IN` or `NOT IN` clause with a non-trivial right operand, such as a subquery (rather than a constant tuple).

* Fixed a bug introduced in v22.2 that could cause errors or inaccurate results when performing a lookup or index <InternalLink version="v23.1" path="joins">join</InternalLink> on a table with three or more column families.

* Fixed a bug that could cause an internal error or a panic while attempting to forecast statistics on a numeric column.

* Fixed a bug when issuing a <InternalLink version="v23.1" path="begin-transaction">`BEGIN`</InternalLink> statement where incorrect `Age` field could be logged in the statement log. This bug could also cause statements to incorrectly appear in the slow query log.

* Fixed a bug in the SQL Statistics UI where the runtime was incorrectly calculated. This bug could cause recorded values to appear to exceed 100%.

* Fixed a bug that could cause a `CREATE CHANGEFEED WITH {key_column}` statement to retry forever.

### Performance improvements

* Reduced query planning time significantly for some queries that join multiple tables.

### Contributors

This release includes 128 merged PRs by 42 authors.

## v23.1.13

Release Date: December 11, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.linux-amd64.tgz">
          cockroach-v23.1.13.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.linux-amd64.tgz">
          cockroach-sql-v23.1.13.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.linux-arm64.tgz">
          cockroach-v23.1.13.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.linux-arm64.tgz">
          cockroach-sql-v23.1.13.linux-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.darwin-10.9-amd64.tgz">
          cockroach-v23.1.13.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.13.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.darwin-11.0-arm64.tgz">
          cockroach-v23.1.13.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.13.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.windows-6.2-amd64.zip">
          cockroach-v23.1.13.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.13.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.13.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.13.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image, both Intel and ARM images are **generally available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.13
```

### SQL language changes

* A new option for the <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> syntax, `strip_localities`, has been added. This can be used to strip the <InternalLink version="v23.1" path="alter-table#set-locality">locality information</InternalLink> from a backup when there are mismatched <InternalLink version="v23.1" path="multiregion-overview#cluster-regions">cluster regions</InternalLink> between the backup's cluster and the target cluster. The following are behaviors that will most likely not be encountered with the specific use case that this patch provides, but are documented nonetheless:
  * Adding a <InternalLink version="v23.1" path="alter-database#set-primary-region">primary region</InternalLink> to a regionless restore (with or without <InternalLink version="v23.1" path="table-localities#regional-by-row-tables">regional by row table(s)</InternalLink> ) will not work out-of-the-box, but does produce an accurate message instructing a user to <InternalLink version="v23.1" path="drop-type">`DROP TYPE {database}.public.crdb_internal_region;`</InternalLink> (and for cluster restores, <InternalLink version="v23.1" path="alter-database#remove-a-replication-zone">`ALTER DATABASE {database} CONFIGURE ZONE DISCARD;`</InternalLink> ).
  * Restoring a cluster/database/table with a <InternalLink version="v23.1" path="table-localities#regional-by-row-tables">regional by row table</InternalLink> will not work out-of-the box. In particular, when performing writes, the <InternalLink version="v23.1" path="alter-table">`crdb_region` column</InternalLink> needs to specify the region of the new row(s) being written to the table. The user will need to alter said column and set a default that makes sense, along with discarding the <InternalLink version="v23.1" path="configure-replication-zones">zone configuration</InternalLink> (this latter is due to the fact that the zone config holds all outdated info related to the <InternalLink version="v23.1" path="partitioning">partitions</InternalLink>, <InternalLink version="v23.1" path="constraints">constraints</InternalLink>, etc.). These are due to a conflict with the `crdb_region` column already being present in the regionless restore. This column specifies each row's home region and is a prefix to the table's primary key. Stripping localities does not touch this column as it would be an expensive operation that includes rewriting the entire table.
* The <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> option `strip_localities` has been renamed to `remove_regions`.
* You can no longer perform a <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> with the `remove_regions` option if the object being restored contains a <InternalLink version="v23.1" path="table-localities#regional-by-row-tables">regional by row table</InternalLink>.
* Added a <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink> `jsonb_array_to_string_array` that converts a <InternalLink version="v23.1" path="jsonb">JSONB</InternalLink> array to a string array.
* Updated the <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink> `jsonb_array_to_string_array` to return <InternalLink version="v23.1" path="null-handling">*NULL*</InternalLink> objects. Previously, they were removed from the output.
* Fixed the <InternalLink version="v23.1" path="monitoring-and-alerting#sql-activity-pages">**SQL Activity** page</InternalLink> update job to avoid conflicts on update, reduce the amount of data cached to just what the overview page requires, and fix the correctness of the top queries.

### Operational changes

* Added <InternalLink version="v23.1" path="metrics">metrics</InternalLink> for <InternalLink version="v23.1" path="architecture/replication-layer#raft">Raft</InternalLink> proposals and reproposals, specifically:
  * `raft.commands.proposed`: commands proposed to Raft by <InternalLink version="v23.1" path="architecture/overview">leaseholders</InternalLink>. (Note that this metric includes both of the reproposed metrics below.)
  * `raft.commands.reproposed.unchanged`: commands retried/reproposed to Raft because they take too long to apply (so they might be dropped).
  * `raft.commands.reproposed.new-lai`: commands retried/reproposed to Raft because they were committed to Raft out of order (failed the LAI (lease applied index) or <InternalLink version="v23.1" path="architecture/transaction-layer#closed-timestamps">closed timestamp</InternalLink> check).
* Added a new <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `kv.gc.sticky_hint.enabled` that helps expedite <InternalLink version="v23.1" path="architecture/storage-layer#garbage-collection">garbage collection</InternalLink> after range deletions, such as when a SQL table or index is dropped. This setting is disabled by default.

### DB Console changes

* <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>
  instances proxied at different subpaths that use
  <InternalLink version="v23.1" path="cockroachcloud/configure-cloud-org-sso#oidc">OIDC</InternalLink>
  will now point to the correct relative path when attempting to use OIDC login.

### Bug fixes

* Fixed a bug where the `pg_attribute` could have sparsely populated `attnum` s since dropped columns were not included. Previously, the attribute number generated inside `pg_attribute` could be sparse because there would be gaps after columns were dropped. This could be problematic for ORMs since this would mean that attribute numbers could be sparse, and they may not be designed to handle such gaps. To address this, this patch adds dropped synthetic columns into the `pg_attribute` table, which allows these tools to work correctly.
* Fixed a bug that could prevent <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> from working if it was performed during a <InternalLink version="v23.1" path="upgrade-cockroach-version">cluster upgrade</InternalLink>.
* Fixed a bug where queries with the `st_union` <InternalLink version="v23.1" path="functions-and-operators#aggregate-functions">aggregate function</InternalLink> could produce incorrect results in some cases due to the <InternalLink version="v23.1" path="cost-based-optimizer">query optimizer</InternalLink> performing invalid optimizations. This bug has been present since the `st_union` function was introduced in v20.2.0.
* A warning for <InternalLink path="a99561">Technical Advisory 99561</InternalLink> could incorrectly surface when <InternalLink version="v23.1" path="drop-index">dropping secondary indexes</InternalLink> that store <InternalLink version="v23.1" path="primary-key">primary key</InternalLink> columns. This is now fixed.
* Fixed a bug where creating a <InternalLink version="v23.1" path="trigram-indexes">trigram index</InternalLink> and later displaying it via <InternalLink version="v23.1" path="show-create">`SHOW CREATE TABLE`</InternalLink>, would not show the opclass for this trigram index.
* Fixed a bug introduced in v22.2 where CockroachDB could incorrectly evaluate <InternalLink version="v23.1" path="joins">lookup and index joins</InternalLink> into tables with at least 3 <InternalLink version="v23.1" path="column-families">column families</InternalLink> in some cases (either a `non-nullable column with no value` internal error would occur, or the query would return incorrect results).
* Fixed a bug that could occasionally cause <InternalLink version="v23.1" path="online-schema-changes">schema change jobs</InternalLink> (e.g., table/index drops) to appear stuck in state "waiting for MVCC GC" for much longer than expected. This fix only applies to future schema changes. Existing stuck jobs can be processed by manually force-enqueueing the relevant <InternalLink version="v23.1" path="architecture/overview">ranges</InternalLink> in the MVCC GC queue under the <InternalLink version="v23.1" path="ui-debug-pages">DB Console's **Advanced Debug** page</InternalLink>.
* Fixed a bug that could cause internal errors or panics while attempting to forecast <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">statistics</InternalLink> on a numeric column.
* Fixed a bug where <InternalLink version="v23.1" path="alter-table#alter-primary-key">`ALTER PRIMARY KEY`</InternalLink> would incorrectly disable <InternalLink version="v23.1" path="indexes">secondary indexes</InternalLink> while new secondary indexes were being backfilled when using the <InternalLink version="v23.1" path="online-schema-changes">declarative schema changer</InternalLink>.
* Previously, when executing queries with <InternalLink version="v23.1" path="joins">index / lookup joins</InternalLink> when the ordering needs to be maintained, CockroachDB could in some cases inadvertently increase query latency, possibly by 1 or 2 orders of magnitude. This bug was introduced in v22.2 and is now fixed.
* Fixed a bug where the <InternalLink version="v23.1" path="show-statistics">`SHOW STATISTICS`</InternalLink> command would incorrectly require the user to have the <InternalLink version="v23.1" path="security-reference/authorization#admin-role">admin role</InternalLink>. It was intended to only require the user to have any privilege on the table being inspected.
* Fixed a bug that could cause a query plan to skip scanning rows from the local region when performing a <InternalLink version="v23.1" path="joins">lookup join</InternalLink> with a <InternalLink version="v23.1" path="table-localities#regional-by-row-tables">`REGIONAL BY ROW`</InternalLink> table as the input.
* Fixed a bug that could cause <InternalLink version="v23.1" path="alter-database#add-region">`ALTER DATABASE... ADD/DROP REGION`</InternalLink> to hang if node localities were changed after regions were added.

### Performance improvements

* Addressed a performance regression that could happen when the <InternalLink version="v23.1" path="online-schema-changes">declarative schema changer</InternalLink> is being used to <InternalLink version="v23.1" path="create-index">create an index</InternalLink> with a concurrent workload.
* Added an off-by-default <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>, `kv.dist_sender.follower_reads_unhealthy.enabled`, which when enabled will prevent failed requests from being issued on followers that are <InternalLink version="v23.1" path="node-shutdown#draining">draining</InternalLink>, <InternalLink version="v23.1" path="node-shutdown?filters=decommission">decommissioning</InternalLink>, or otherwise unhealthy. This will prevent <InternalLink version="v23.1" path="follower-reads">follower reads</InternalLink> against nodes in such states. This prevents latency spikes if those nodes later go offline.
* <InternalLink version="v23.1" path="cost-based-optimizer">Query planning</InternalLink>
  time has been reduced significantly for some queries in which many tables are
  <InternalLink version="v23.1" path="joins">joined</InternalLink>
  .

### Contributors

This release includes 118 merged PRs by 42 authors.

## v23.1.12

Release Date: November 13, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.linux-amd64.tgz">
          cockroach-v23.1.12.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.linux-amd64.tgz">
          cockroach-sql-v23.1.12.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.linux-arm64.tgz">
          cockroach-v23.1.12.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.linux-arm64.tgz">
          cockroach-sql-v23.1.12.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.darwin-10.9-amd64.tgz">
          cockroach-v23.1.12.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.12.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.darwin-11.0-arm64.tgz">
          cockroach-v23.1.12.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.12.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.windows-6.2-amd64.zip">
          cockroach-v23.1.12.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.12.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.12.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.12.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.12
```

### Security updates

* The `SIGHUP` signal now clears the cached expiration times for <InternalLink version="v23.1" path="cockroach-cert#how-security-certificates-work">client certificates</InternalLink> that are reported by the `security.certificate.expiration.client` metric.
* SQL commands that were previously limited to the `admin` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system privilege</InternalLink> can now be used by users with the `VIEWCLUSTERMETADATA` or `REPAIRCLUSTERMETADATA` system privilege, depending on whether the operation is read-only or modifies state.

### General changes

* The maximum permitted value of the `COCKROACH_RPC_INITIAL_WINDOW_SIZE` environment variable has been increased to `64MB`. By increasing this environment variable, in conjunction with tuning OS-level maximum TCP window size, you can increase the throughput that <InternalLink version="v23.1" path="architecture/replication-layer#raft">Raft replication</InternalLink> can sustain over high latency network links.
* Updated Go version to 1.19.13.

### SQL language changes

* New datetime built-ins ( `make_date`, `make_timestamp`, and `make_timestamptz` ) have been added, allowing for the creation of timestamps, timestamps with time zones, and dates. In addition, `date_trunc` now allows for a timestamp to be truncated in a specified timezone (to a specified precision).
* New system privileges `CREATEROLE`, `CREATELOGIN`, `CREATEDB`, and `CONTROLJOB` have been introduced. Each is analogous to its existing <InternalLink version="v23.1" path="create-user#role-options">role option</InternalLink> counterpart but can additionally be inherited through role membership.,,,
* <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink>
  can now be passed a `WITH EXECUTION LOCALITY` option similar to `BACKUP` to restrict execution of the job to nodes
  with matching localities.
* The `statement_activity` and `transaction_activity` table column `execution_total_cluster_seconds` is now accurate. The `combinedstmts` endpoint returns the correct value for the `StmtsTotalRuntimeSecs` and `TxnsTotalRuntimeSecs` properties.
* The `discard` <InternalLink version="v23.1" path="logging-overview">log message</InternalLink> is now limited to once per minute by default. The message now includes both the number of transactions and the number of statements that were discarded.

### Operational changes

* The <InternalLink version="v23.1" path="cockroach-debug-zip">`cockroach debug zip`</InternalLink> command now has an option to omit goroutine stack dumps. This impacts the creation of `nodes/*/stacks.txt` and `nodes/*/stacks_with_labels.txt` within debug ZIP bundles. Users can opt to exclude these goroutine stacks by using the `--include-goroutine-stacks=false` flag. Fetching stack traces for all goroutines is a "stop-the-world" operation, which can momentarily but significantly increase SQL service latency. Any periodic goroutine dumps previously taken on the node will still be included in `nodes/*/goroutines/*.txt.gz`, since they have already been generated and don't require any stop-the-world operations.
* Requests for database details or table details from the UI, or usages of `SHOW RANGES WITH DETAILS` are no longer subject to errors if the number of requested spans is too large.
* Added a new <InternalLink version="v23.1" path="metrics">metric</InternalLink> `changefeed.lagging_ranges` that shows the number of <InternalLink version="v23.1" path="architecture/overview">ranges</InternalLink> which are behind in changefeeds. This metric can be used with the <InternalLink version="v23.1" path="create-changefeed#options">`metrics_label` changefeed option</InternalLink>. The calculation of this metric is controlled by two new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink>: (1) `lagging_ranges_threshold`, with a default of 3 minutes, is the amount of time a range needs to be behind to be considered lagging, and (2) `lagging_ranges_polling_interval`, with a default of 1 minute, controls how often the lagging ranges calculation is done. Note that polling adds latency to the metric being updated. For example, if a range falls behind by 3 minutes, the metric may not update until an additional minute afterwards. Also note that ranges undergoing an initial scan for longer than the threshold are considered to be lagging. Starting a changefeed with an initial scan on a large table will likely increment the metric for each range in the table. However, as ranges complete the initial scan, the number of lagging ranges will decrease.
* The <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> now constructs client-side requests using relative URLs instead of absolute ones. This enables proxying of the DB Console at arbitrary subpaths.
* Added a new <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `server.http.base_path` that controls the redirection of the browser after successful login with <InternalLink version="v23.1" path="sso-db-console">OIDC SSO</InternalLink>. Most users do not need to modify this setting. However, it is helpful in cases where CockroachDB is running behind a load balancer or proxy that serves CockroachDB under a subpath, such as `https:// <hostname>/crdb/`. In those cases, it is necessary for the browser to redirect to `/ crdb` after login instead of `/`, which has always been the hard-coded default.

### DB Console changes

* Non-admin users can now view the <InternalLink version="v23.1" path="ui-databases-page">**Database**, **Database Details**, and **Database table** pages</InternalLink>.
* The <InternalLink version="v23.1" path="ui-sql-dashboard#sql-connection-rate">SQL Connection Rate metric</InternalLink> on the <InternalLink version="v23.1" path="ui-sql-dashboard">SQL Dashboard</InternalLink> is downsampled using the MAX function instead of SUM. This improves situations where zooming out would cause the connection rate to increase for downsampled data.
* Fixed a bug in DB Console's <InternalLink version="v23.1" path="cockroachcloud/statements-page#diagnostics">Statement Diagnostic page</InternalLink> that could cause the page to crash if the response was larger than 50 KB. The page now keeps pulling results until no maximum size errors are encountered.
* Fixed an error on the <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity page</InternalLink> when there was a workload, and then the workload stopped so that no queries ran against the database in the last hour.
* The <InternalLink version="v23.1" path="ui-jobs-page">**Jobs** table</InternalLink> will now correctly display timestamps for creation, last modified, and the completed time fields.
* The `Reset Sql Stats` button is now visible to users with the admin role on the DB Console.
* Reduced memory usage in <InternalLink version="v23.1" path="cockroachcloud/statements-page">SQL activity</InternalLink> jobs.

### Bug fixes

* The new backup option `updates_cluster_monitoring_metrics` tracks the timestamp of the last backup failure due to a KMS error. This option is disabled by default.
* Fixed a bug where vectorized `COPY FROM` could produce a plan with more than one RenderNodes, when only zero or one should be allowed. This could result in multiple render nodes in a table with a hash sharded primary key.
* Fixed a bug that caused CockroachDB to stop collecting new statistics about <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprint-page">Statement fingerprints</InternalLink> and <InternalLink version="v23.1" path="ui-transactions-page">Transaction fingerprints</InternalLink>.
* Fixed a bug where, internally, printing a 0 decimal with a very low exponent uses excessive memory. The <InternalLink version="v23.1" path="decimal">DECIMAL</InternalLink> type type is not impacted, but `crdb_internal` functions may be.
* Fixed a bug where executing the <InternalLink version="v23.1" path="export#export-a-table-into-parquet">`EXPORT INTO PARQUET`</InternalLink> statement could cause an <InternalLink version="v23.1" path="cluster-setup-troubleshooting#out-of-memory-oom-crash">out-of-memory crash (OOM)</InternalLink>. Now, if memory is exceeded, the `EXPORT INTO PARQUET` statement returns an error. If you see an error related to memory, retry the `EXPORT INTO PARQUET` statement using a smaller value for the <InternalLink version="v23.1" path="export#export-options">`chunk_rows` option</InternalLink>. Cockroach Labs <InternalLink version="v23.1" path="export-data-with-changefeeds">recommends using changefeeds to export data</InternalLink> because they provide better performance for growing workloads. Additionally, changefeeds <InternalLink version="v23.1" path="show-jobs">operate as jobs</InternalLink>, which offer <InternalLink version="v23.1" path="monitor-and-debug-changefeeds">observability</InternalLink> and <InternalLink version="v23.1" path="create-and-configure-changefeeds">job management</InternalLink>.
* Added limited `statement_statistics` to the `debug.zip` output.
* Fixed a nil dereference panic during node startup that could be caused by an incorrect initialization order.
* Fixed a bug where the <InternalLink version="v23.1" path="begin-transaction">`BEGIN` statement</InternalLink> incorrectly displayed a transaction ID in telemetry logs. It now correctly shows no transaction ID, since there is no open transaction when `BEGIN` is executed.
* Fixed a bug that could cause a transaction performing multiple parallel foreign key checks to return a `concurrent txn use detected` error.
* Fixed a bug where dependencies on sequences from tables would be reported with the wrong value for the `classid` column in the `pg_catalog.pg_depend` table.
* Fixed edge cases in decimal and float evaluation for division operators. `'NaN'::DECIMAL / 0` will now return `NaN` instead of a division-by-zero error, and `0 / 'inf'::DECIMAL` will return `0` instead of `0E-2019`.
* Fixed a DB Console issue where the `DROP_UNUSED` index recommendations produced by the table details page produced an invalid `DROP INDEX` statement.
* Executing two <InternalLink version="v23.1" path="alter-range#configure-zone">`ALTER RANGE default CONFIGURE ZONE`</InternalLink> statements on the same line no longer triggers an error.
* Removed a buggy TTL descriptor repair. Previously, upgrading from v22.2.x to 23.1.9 incorrectly removed <InternalLink version="v23.1" path="row-level-ttl#ttl-storage-parameters">TTL storage parameters</InternalLink> from tables (visible via <InternalLink version="v23.1" path="show-create">`SHOW CREATE TABLE <ttl-table>`</InternalLink> ) while attempting to repair table descriptors. A node that attempts to run the TTL <InternalLink version="v23.1" path="show-jobs">job</InternalLink> could crash due to a panic caused by the missing TTL storage parameters. Clusters currently on v22.2.x should **not** be upgraded to v23.1.9, but should move directly to v23.1.10 or later. For more information, refer to <InternalLink path="a110363">Technical Advisory 110363</InternalLink>.
* Fixed a performance regression when disabling `sql.metrics.statement_details.enabled`, which caused execution stats to be collected for all queries instead of the default 1% of queries.
* `cockroach debug pebble` commands now work correctly with encrypted stores which don't use the default `cockroach-data` path, and you no longer need to pass the `--store` option.
* The <InternalLink version="v23.1" path="cockroachcloud/databases-page">**Database** pages</InternalLink> no longer displays `undefined` regions or outdated node information.
* Fixed a bug where `RESET (ttl_expire_after)` could incorrectly remove `ttl_expiration_expression`.
* Fixed a bug where an <InternalLink version="v23.1" path="alter-table#add-constraint">`ALTER TABLE... ADD CONSTRAINT CHECK...`</InternalLink> statement with a user-defined function (UDF) in the `CHECK` could cause a validation error.
* Fixed a bug where `CREATE INDEX` for <InternalLink version="v23.1" path="partial-indexes">partial indexes</InternalLink> could fail with `ERROR: duplicate key value violates unique constraint` if concurrent inserts happened simultaneously.
* Fixed a bug where a <InternalLink version="v23.1" path="create-table">`CREATE TABLE`</InternalLink> command with an `IDENTITY` column did not properly propagate the type of the column into the sequence.
* Fixed a bug where the `format_type` built-in did not honor `typemod` information for array types, leading to incorrect output.
* Fixed compaction behavior to prevent rapid sublevel growth when removing replicas from a store, such as during decommissioning.
* Fixed a bug that could occur when the <InternalLink version="v23.1" path="postgresql-compatibility#multiple-active-portals">multiple active portals</InternalLink> execution mode (Preview) was enabled to evaluate queries such as lookup joins. The bug could result in an internal error like `unexpected 40960 leftover bytes` if the portal was not fully consumed.
* External connection URLs now accept the scheme `azure-blob` for connections to Azure Blob Storage and the scheme `azure-kms` for connections to Azure KMS. For backward compatibility, schemes `azure` and `azure-storage` schemes continue to work for connections to Azure Blob Storage.
* Fixed a bug where changing the setting `server.telemetry.hot_ranges_stats.interval` had no effect.
* Added a check for values before using `mean` on the DB Console <InternalLink version="v23.1" path="ui-statements-page">Plan Details page</InternalLink>, fixing a crash.
* Fixed a bug where dependencies on sequences from tables would be reported with the wrong value for the `classid` column in the `pg_catalog.pg_depend` table.
* Fixed a bug where `atttypmod` in `pg_attribute` was not populated for <InternalLink version="v23.1" path="timestamp">`TIMESTAMP`</InternalLink> / <InternalLink version="v23.1" path="interval">`INTERVAL`</InternalLink> types, which meant that ORMs could not know the precision of these types properly.
* Fixed a bug in the DB Console <InternalLink version="v23.1" path="ui-insights-page">Transaction Insight Details</InternalLink> page, which showed contention details of other transactions. Now, CockroachDB will only surface contention details for the current transaction.
* Fixed a bug where `indoption` inside `pg_index` was not properly encoded. Clients were unable to decode it as `int2vector`.
* RPC failures on writes now use the parallel commit protocol and execute in parallel to the commit operation. This change prevents incorrect retryable failures and `transaction unexpectedly committed` assertions by detecting when writes cannot be retried idempotently, instead returning an `AmbiguousResultError`.
* Fixed a bug that prevented the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> from honoring the `statement_timeout` session setting when generating constrained index scans for queries with large `IN` lists or `= ANY` predicates on multiple index key columns. This bug could cause an Out-of-Memory (OOM) condition on the node.
* Fixed a bug that caused internal errors during query optimization in rare cases. The bug has been present since version v2.1.11, but it is more likely to occur in version v21.2.0 and later, though it is still rare. The bug only presents when a query contains `min` and `max` <InternalLink version="v23.1" path="functions-and-operators#aggregate-functions">aggregate functions</InternalLink>
* Fixed a bug where a lookup or index join on a table with at least three column families could be evaluated incorrectly, leading to a "non-nullable column with no value" error or incorrect query results. The bug was introduced in v22.2.
* Fixed a bug that could cause internal errors or panics while attempting to forecast statistics on a numeric column.

### Performance improvements

* Queries that compare collated strings now use less memory and may execute faster.
* Reduced the impact of high-concurrency blind writes to the same key on goroutine scheduling latency.

### Contributors

This release includes 207 merged PRs by 64 authors.

## v23.1.11

Release Date: October 2, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.linux-amd64.tgz">
          cockroach-v23.1.11.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.linux-amd64.tgz">
          cockroach-sql-v23.1.11.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.linux-arm64.tgz">
          cockroach-v23.1.11.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.linux-arm64.tgz">
          cockroach-sql-v23.1.11.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.darwin-10.9-amd64.tgz">
          cockroach-v23.1.11.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.11.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.darwin-11.0-arm64.tgz">
          cockroach-v23.1.11.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.11.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.windows-6.2-amd64.zip">
          cockroach-v23.1.11.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.11.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.11.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.11.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.11
```

### SQL language changes

* Added a new syntax to <InternalLink version="v23.1" path="show-default-privileges">`SHOW DEFAULT PRIVILEGES`</InternalLink>, `SHOW DEFAULT PRIVILEGES FOR GRANTEE <grantee>` that shows the default privileges that a grantee received.
* The admin API <InternalLink version="v23.1" path="cluster-api">database details</InternalLink> endpoint now returns authoritative range statistics.
* Added the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.stats.limit_table_size.enabled`, which controls whether or not CockroachDB enforces the row limit set by `sql.stats.persisted_rows.max` in the `system.statement_statistics` and `system.transaction_statistics` tables.
* Optimized the `sql-stats-compaction` <InternalLink version="v23.1" path="show-jobs">job</InternalLink> 's <InternalLink version="v23.1" path="delete">delete query</InternalLink> to avoid a <InternalLink version="v23.1" path="sql-tuning-with-explain#issue-full-table-scans">full scan</InternalLink>. This helps avoid a <InternalLink version="v23.1" path="common-errors#restart-transaction">transaction retry error</InternalLink>, which can cause the job to fail.
* Fixed an issue where the UI was missing query text and details when looking at the <InternalLink version="v23.1" path="ui-sql-dashboard#transactions">SQL activity transactions page</InternalLink> if there were more than 500 transactions or statements. The `crdb_internal.statement_activity` table now includes all statements for a transaction that are in the `crdb_internal.transaction_activity` table.
* Added the `VIEWSYSTEMTABLE` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system privilege</InternalLink>. Users with this privilege have <InternalLink version="v23.1" path="selection-queries">`SELECT`</InternalLink> privileges for all tables in the `system` database.
* The `oidvectortypes` <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink> has been implemented, which can format an `oidvector`.
* The internal persisted <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">statistics</InternalLink> table max size check is now done once an hour instead of every 10 minutes. This reduces the risk of serialization errors on the statistics tables.
* Introspection queries will now show the internal `node` user as the owner of tables in <InternalLink version="v23.1" path="pg-catalog">`pg_catalog`</InternalLink> and <InternalLink version="v23.1" path="information-schema">`information_schema`</InternalLink>. Previously, the owner was shown as `admin`, but that was inaccurate since users with the <InternalLink version="v23.1" path="security-reference/authorization#admin-role">`admin` role</InternalLink> could not modify these tables in any way.

### Operational changes

* Added the `kv.enqueue_in_replicate_queue_on_span_config_update.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. When set to `true`, <InternalLink version="v23.1" path="cockroach-start#store">stores</InternalLink> in the cluster will enqueue <InternalLink version="v23.1" path="architecture/overview">replicas</InternalLink> for <InternalLink version="v23.1" path="architecture/replication-layer">replication changes</InternalLink> upon receiving config updates that could affect the replica. This setting is off by default. Enabling this setting speeds up how quickly config-triggered replication changes begin, but adds additional CPU overhead. The overhead scales with the number of leaseholders.

* Added a new <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> named `server.hot_ranges_request.node.timeout`, with a default value of 5 minutes. The setting controls the maximum amount of time that a <InternalLink version="v23.1" path="ui-hot-ranges-page">hot ranges request</InternalLink> will spend waiting for a node to provide a response. Set it to `0` to disable timeouts.

* Span stats requests will return a partial result if the request encounters any errors. Errors that would have previously terminated the request are now included in the response.

* <InternalLink version="v23.1" path="backup">`BACKUP`</InternalLink>
  now skips contacting the ranges for tables on which
  <InternalLink version="v23.1" path="alter-table">`exclude_data_from_backup`</InternalLink>
  is set, and can thus succeed even if an excluded table is unavailable.

* The <InternalLink version="v23.1" path="architecture/distribution-layer#grpc">RPC</InternalLink> dial and heartbeat timeouts can now be configured via the environment variables `COCKROACH_RPC_DIAL_TIMEOUT` (default 2x `COCKROACH_NETWORK_TIMEOUT` or 2x2=4 seconds) and `COCKROACH_RPC_HEARTBEAT_TIMEOUT` (default 3x `COCKROACH_NETWORK_TIMEOUT` or 3x2=6 seconds). This allows configuring these values independently of `COCKROACH_NETWORK_TIMEOUT`.

* The default <InternalLink version="v23.1" path="architecture/distribution-layer#grpc">gRPC</InternalLink> server-side send timeout has been increased from 2 seconds to 4 seconds (1x to 2x of `COCKROACH_NETWORK_TIMEOUT` ), to avoid spurious connection failures in certain scenarios. This can be controlled via the new environment variable `COCKROACH_RPC_SERVER_TIMEOUT`.

* Added a new gauge <InternalLink version="v23.1" path="metrics">metric</InternalLink> `sql.schema.invalid_objects`. This gauge is periodically updated based on the schedule set by the `sql.schema.telemetry.recurrence` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. When the metric is updated, it counts the number of schema objects ( <InternalLink version="v23.1" path="create-table">tables</InternalLink>, <InternalLink version="v23.1" path="create-type">types</InternalLink>, <InternalLink version="v23.1" path="create-schema">schemas</InternalLink>, <InternalLink version="v23.1" path="create-database">databases</InternalLink>, and <InternalLink version="v23.1" path="user-defined-functions">functions</InternalLink> ) that are in an invalid state according to CockroachDB's internal validation checks. This metric is expected to be zero ( `0` ) in a healthy cluster. If it is not zero, it indicates that there is a problem that must be repaired.

* Added two new <InternalLink version="v23.1" path="monitor-and-debug-changefeeds#recommended-changefeed-metrics-to-track">changefeed metrics</InternalLink>: `changefeed.checkpoint_progress` is similar to `changefeed.max_behind_nanos`, but it also supports <InternalLink version="v23.1" path="monitor-and-debug-changefeeds#using-changefeed-metrics-labels">metrics labels</InternalLink>. `changefeed.aggregator_progress` tracks the progress of individual aggregators (the lowest timestamp for which all aggregators with the label have emitted all values they're responsible for).

### Command-line changes

* Removed the command `\demo recommission` from <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink>. It had been obsolete and non-functional since v20.2.

### DB Console changes

* Users without the `VIEWCLUSTERSETTINGS` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">permission</InternalLink>, but with the `VIEWACTIVITY` or `VIEWACTIVITYREDACTED` permissions, can now see <InternalLink version="v23.1" path="ui-databases-page#index-recommendations">index recommendations</InternalLink>.
* CockroachDB will now show a warning when the time period selected on the <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity page</InternalLink> is older than the oldest data available.

### Bug fixes

* Fixed a buggy TTL descriptor repair by removing it. Previously, upgrading from v22.2.x to 23.1.9 incorrectly removed <InternalLink version="v23.1" path="row-level-ttl#ttl-storage-parameters">TTL storage params</InternalLink> from tables (visible via <InternalLink version="v23.1" path="show-create">`SHOW CREATE TABLE <ttl-table>`</InternalLink> ) while attempting to repair table descriptors. This resulted in the node that attempts to run the TTL <InternalLink version="v23.1" path="show-jobs">job</InternalLink> crashing due to a panic caused by the missing TTL storage parameters. Clusters currently on v22.2.x should **not** be upgraded to v23.1.9 and should be upgraded directly to v23.1.10 or later. For more information, see <InternalLink path="a110363">Technical Advisory 110363</InternalLink>.
* Users with the `VIEWACTIVITY` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">privilege</InternalLink> should be able to see other users' sessions from both the <InternalLink version="v23.1" path="cockroach-sql">CLI</InternalLink> and the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>.
* Fixed errors on the <InternalLink version="v23.1" path="ui-sessions-page">**Sessions** page</InternalLink> in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> when a session's memory usage is zero bytes.
* Fixed a bug in <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> whereby `\demo add` could sometimes crash with an error " `index out of range [...] with length...` ". This bug was introduced in v19.x.
* Fixed a bug whereby the command `\demo decommission` in <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> could sometime leave the demo cluster in a broken state. This bug was introduced in v20.2.
* Fixed a bug in the <InternalLink version="v23.1" path="indexes">index</InternalLink> recommendations provided in the <InternalLink version="v23.1" path="explain">`EXPLAIN`</InternalLink> output where <InternalLink version="v23.1" path="alter-index">`ALTER INDEX... VISIBLE`</InternalLink> index recommendations may suggest making the wrong index visible when there are multiple invisible indexes in a table.
* Fixed a bug that could cause a query with <InternalLink version="v23.1" path="limit-offset">`LIMIT`</InternalLink> and <InternalLink version="v23.1" path="order-by">`ORDER BY`</InternalLink> to return results in the wrong order. This bug could cause incorrect results as well if the `LIMIT` was nested within an outer query, e.g. under another `LIMIT`. This bug had existed since before v22.2.
* Fixed a bug with <InternalLink version="v23.1" path="collate">collated string</InternalLink> type checking with nested <InternalLink version="v23.1" path="scalar-expressions#simple-case-expressions">case expressions</InternalLink> where an inner case had no explicit collated type.
* Fixed a bug where <InternalLink version="v23.1" path="release-savepoint">`RELEASE SAVEPOINT`</InternalLink> could incorrectly emit the message `"cannot publish new versions for descriptors"` instead of a <InternalLink version="v23.1" path="common-errors#restart-transaction">retryable error</InternalLink> to applications.
* Fixed a bug that could cause CPU usage to increase over time.
* Fixed a bug introduced in v22.1 that could cause a <InternalLink version="v23.1" path="joins">join</InternalLink> to infinite-loop in rare cases when (1) the join filter is not an equality and (2) no columns from the left input are returned.
* Users with the `VIEWACTIVITY` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">permission</InternalLink> can now view correct values for the current timezone in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>.
* Fixed a bug present since v23.1.0 that would cause queries on the `pg_catalog.pg_statistic_ext` table to fail if a table was dropped recently. This bug also caused the `\d` <InternalLink version="v23.1" path="cockroach-sql">CLI</InternalLink> shortcut to encounter errors.
* Fixed a bug where `pg_attribute` and `pg_attrdef` did not properly return results for generated columns.
* The <InternalLink version="v23.1" path="ui-insights-page#schema-insights-tab">Schema Insights</InternalLink> view should hit request timeouts less frequently, if at all.
* Fixed a bug that caused nodes to crash when attempting to `EXECUTE` a prepared statement with an argument that referenced a <InternalLink version="v23.1" path="user-defined-functions">user-defined function</InternalLink>. This bug was present since user-defined functions were introduced in v22.2.
* Fixed a bug so the filter on the <InternalLink version="v23.1" path="ui-statements-page">Statements Page</InternalLink> works when the app name is an empty string (represented as 'unset').
* Fixed a bug where a `SpanStatsRequest` would return post-replicated MVCC stats, which was causing incorrect output in <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES... WITH DETAILS`</InternalLink>. Now, a `SpanStatsRequest` returns the logical MVCC stats for the requested span.
* Fixed an issue with <InternalLink version="v23.1" path="ui-sql-dashboard">the "full scan" filter in the UI</InternalLink>, where the filter was not returning any results.
* Going to the <InternalLink version="v23.1" path="ui-transactions-page#transaction-details-page">Transaction Details Page</InternalLink> from <InternalLink version="v23.1" path="ui-insights-page#high-contention">Workload Insights > High Contention</InternalLink> is fixed. Previously, the link would not show any results.
* Fixed the column names on the <InternalLink version="v23.1" path="selection-queries">`SELECT` queries</InternalLink> against the tables `crdb_internal.node_txn_execution_insights` and `crdb_internal.cluster_txn_execution_insights` during the <InternalLink version="v23.1" path="cockroach-debug-zip">creation of debug.zip files</InternalLink>.
* Fixed a bug that could cause some rows to be silently skipped during <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink> when a node failed.
* Fixed a bug in <InternalLink version="v23.1" path="spatial-data-overview">geospatial queries</InternalLink> where more rows could be returned by the query than expected. This could happen when a query filter of the form `ST_Distance(geog1, geog2) > constant` or `ST_MaxDistance(geom1, geom2) > constant`, where the operator was one of `>`, `<`, `>=`, `<=`, or a filter of the form `ST_Distance(geog1, geog2, false) = 0` would sometimes mistakenly evaluate to `true` when one or both of the inputs was `NULL` or an empty <InternalLink version="v23.1" path="architecture/glossary#geography">geography</InternalLink> or <InternalLink version="v23.1" path="architecture/glossary#geometry">geometry</InternalLink>.
* Fixed an issue where a <InternalLink version="v23.1" path="architecture/distribution-layer#range-splits">split</InternalLink> can be called on an invalid key that's in the form of `someValidKey.Next()` during <InternalLink version="v23.1" path="restore">restore</InternalLink>. This split key can land in the middle of a row with <InternalLink version="v23.1" path="column-families">column families</InternalLink>, and thus result in failing SQL queries when querying the restored table.
* Fixed an issue where a <InternalLink version="v23.1" path="architecture/distribution-layer#range-splits">split</InternalLink> can be called on an invalid key that's in the form of `someValidKey.Next()` during <InternalLink version="v23.1" path="restore">restore</InternalLink> with the `bulkio.restore.use_simple_import_spans` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> set to `true`. This split key can land in the middle of a row with <InternalLink version="v23.1" path="column-families">column families</InternalLink>, and thus result in failing SQL queries when querying the restored table.
* The `difference` <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink> had its return type incorrectly set to <InternalLink version="v23.1" path="string">`string`</InternalLink> instead of <InternalLink version="v23.1" path="int">`integer`</InternalLink>.
* Fixed a bug where dependencies on <InternalLink version="v23.1" path="show-sequences">sequences</InternalLink> from <InternalLink version="v23.1" path="show-tables">tables</InternalLink> would be reported with the wrong value for the `classid` column in the <InternalLink version="v23.1" path="pg-catalog">`pg_catalog.pg_depend` table</InternalLink>.
* Fixed a bug that could cause a <InternalLink version="v23.1" path="transactions">transaction</InternalLink> performing multiple parallel <InternalLink version="v23.1" path="foreign-key">foreign key</InternalLink> checks to return a `concurrent txn use detected` error.
* Various observability pages in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> no longer crash when they encounter zeros (e.g., a session with no memory allocated).

### Performance improvements

* Improved the cost of resolving a user-defined <InternalLink version="v23.1" path="enum">enum</InternalLink> type that has many values.
* Queries that access the <InternalLink version="v23.1" path="pg-catalog">`pg_catalog`</InternalLink> and <InternalLink version="v23.1" path="information-schema">`information_schema`</InternalLink> that perform introspection on other tables in those schemas are now significantly faster.

### Contributors

This release includes 204 merged PRs by 63 authors.

## v23.1.10

Release Date: September 18, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.linux-amd64.tgz">
          cockroach-v23.1.10.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.linux-amd64.tgz">
          cockroach-sql-v23.1.10.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.linux-arm64.tgz">
          cockroach-v23.1.10.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.linux-arm64.tgz">
          cockroach-sql-v23.1.10.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.darwin-10.9-amd64.tgz">
          cockroach-v23.1.10.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.10.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.darwin-11.0-arm64.tgz">
          cockroach-v23.1.10.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.10.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.windows-6.2-amd64.zip">
          cockroach-v23.1.10.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.10.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.10.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.10.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.10
```

### Bug fixes

* Removed buggy <InternalLink version="v23.1" path="row-level-ttl">TTL</InternalLink> descriptor repair. In v23.1.9, upgrading from v22.2 to v23.1.9 incorrectly removed TTL storage parameters from tables (visible by running `SHOW CREATE TABLE <ttl-table>;` ) while attempting to repair the table descriptors. This resulted in the node that attempted to run the TTL job crashing due to a panic caused by the missing TTL storage parameters. Clusters currently on v22.2 should upgrade to v23.1.10 and higher, **not** to v23.1.9.

### Contributors

This release includes 2 merged PRs by 2 authors.

## v23.1.9

Release Date: September 7, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.linux-amd64.tgz">
          cockroach-v23.1.9.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.linux-amd64.tgz">
          cockroach-sql-v23.1.9.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.linux-arm64.tgz">
          cockroach-v23.1.9.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.linux-arm64.tgz">
          cockroach-sql-v23.1.9.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.darwin-10.9-amd64.tgz">
          cockroach-v23.1.9.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.9.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.darwin-11.0-arm64.tgz">
          cockroach-v23.1.9.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.9.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.windows-6.2-amd64.zip">
          cockroach-v23.1.9.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.9.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.9.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.9.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.9
```

### General changes

* All <InternalLink version="v23.1" path="upgrade-cockroach-version">cluster version upgrades</InternalLink> perform a <InternalLink version="v23.1" path="system-catalogs">catalog</InternalLink> health check and repair upgrade step before proceeding to other upgrade steps.
* <InternalLink version="v23.1" path="upgrade-cockroach-version">Upgrading the cluster version</InternalLink>
  to a new release will not only check for descriptor and other
  <InternalLink version="v23.1" path="system-catalogs">catalog</InternalLink>
  corruptions, but will attempt to repair some of them on a best-effort basis. This should seamlessly get rid of all
  longstanding descriptor back-reference corruptions, which typically don't manifest themselves until a
  <InternalLink version="v23.1" path="online-schema-changes">schema change</InternalLink>
  or an upgrade are performed.

### Enterprise edition changes

* <InternalLink version="v23.1" path="create-and-configure-changefeeds">Changefeeds</InternalLink>
  should no longer fail when upgrading to
  <InternalLink version="v23.1" path="releases/v23.1#v23-1-5">v23.1.5</InternalLink>
  .
* Fixed an issue where <InternalLink version="v23.1" path="create-changefeed">changefeeds</InternalLink> emitting to a cloud sink with compression could experience resource leakage (memory and goroutines) when experiencing transient errors.
* Augmented the credentials lookup chain for the implicit authentication method in Azure storage and KMS to first look for credentials in a file before proceeding on to the rest of the chain specified in the `DefaultAzureCredential` class (env vars, Managed Identity, etc.). The path of this file is specified by the environment variable `COCKROACH_AZURE_APPLICATION_CREDENTIALS_FILE` and, if not empty, is expected to point to a file that provides the Azure Tenant ID, Client ID, and Client Secret that will be used to access the storage or KMS resource in the following YAML format: `azure_tenant_id: MY_TENANT_ID, azure_client_id: MY_CLIENT_ID, azure_client_secret: MY_CLIENT_SECRET`
* Fixed a rare <InternalLink version="v23.1" path="create-changefeed">changefeed</InternalLink> issue that was triggered when the parent database or types were dropped, and instead of exiting with a descriptive error message, the changefeed would observe the following opaque error instead: `value type is not BYTES: UNKNOWN`.
* Fixed a potential deadlock when running <InternalLink version="v23.1" path="create-changefeed">changefeeds</InternalLink> with the `end_time` option set.

### SQL language changes

* Added a `crdb_internal.reset_activity_tables` <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink> to allow users to reset the <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">statistics</InternalLink> in the `system.statement_activity` and `system.transaction_activity` tables. Users require <InternalLink version="v23.1" path="security-reference/authorization#admin-role">`admin`</InternalLink> to use this builtin.
* CockroachDB now reports <InternalLink version="v23.1" path="performance-best-practices-overview#transaction-contention">contention</InternalLink> time encountered while executing the mutation statements ( <InternalLink version="v23.1" path="insert">`INSERT`</InternalLink>, <InternalLink version="v23.1" path="upsert">`UPSERT`</InternalLink>, <InternalLink version="v23.1" path="update">`UPDATE`</InternalLink>, and <InternalLink version="v23.1" path="delete">`DELETE`</InternalLink> ) when run via <InternalLink version="v23.1" path="explain-analyze">`EXPLAIN ANALYZE`</InternalLink>.
* Fixed a bug in <InternalLink version="v23.1" path="copy">`COPY CSV WITH HEADER`</InternalLink> that was first introduced in <InternalLink version="v23.1" path="releases/v23.1">v23.1</InternalLink>. On previous versions of CockroachDB, a workaround is to disable <InternalLink version="v23.1" path="vectorized-execution">vectorized</InternalLink> `COPY` by setting the `vectorize` <InternalLink version="v23.1" path="set-vars#supported-variables">session variable</InternalLink> to `false` or to remove the header row from the `COPY` data.
* Added a new boolean <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.telemetry.query_sampling.internal.enabled`. If `true`, internal app queries will be reported to telemetry when query sampling to telemetry is enabled.
* The `SHOW QUERIES` and <InternalLink version="v23.1" path="show-sessions">`SHOW SESSIONS`</InternalLink> commands will now display timestamps using the session's timezone setting.
* Added the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.stats.limit_table_size.enabled`, which controls whether or not we enforce the row limit set by the `sql.stats.persisted_rows.max` cluster setting in the `system.statement_statistics` and `system.transaction_statistics` tables.
* Optimized the `sql-stats-compaction` <InternalLink version="v23.1" path="show-jobs">job</InternalLink> 's <InternalLink version="v23.1" path="delete">delete query</InternalLink> to avoid a <InternalLink version="v23.1" path="sql-tuning-with-explain#issue-full-table-scans">full scan</InternalLink>. This helps avoid a <InternalLink version="v23.1" path="common-errors#restart-transaction">transaction retry error</InternalLink> which can cause the job to fail.
* Introspection queries will now show the internal `node` user as the owner of tables in <InternalLink version="v23.1" path="pg-catalog">`pg_catalog`</InternalLink> and <InternalLink version="v23.1" path="information-schema">`information_schema`</InternalLink>. Previously, the owner was shown as `admin`, but that was inaccurate since users with <InternalLink version="v23.1" path="security-reference/authorization#admin-role">the `admin` role</InternalLink> could not modify these tables in any way.

### Operational changes

* Added two new <InternalLink version="v23.1" path="metrics">metrics</InternalLink> to monitor <InternalLink version="v23.1" path="configure-replication-zones">lease range preference</InternalLink> conformance: `leases.preferences.violating` indicates the number of valid leases a <InternalLink version="v23.1" path="cockroach-start#store">store</InternalLink> owns that satisfy none of the preferences applied; `leases.preferences.less-preferred` indicates the number of valid leases a store owns that satisfy some of the preferences applied, but not the first preference.
* Added the `kv.enqueue_in_replicate_queue_on_span_config_update.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting.</InternalLink>. When set to `true`, <InternalLink version="v23.1" path="cockroach-start#store">stores</InternalLink> in the cluster will enqueue <InternalLink version="v23.1" path="architecture/overview">replicas</InternalLink> for <InternalLink version="v23.1" path="architecture/replication-layer">replication changes</InternalLink> upon receiving config updates which could affect the replica. This setting is off by default. Enabling this setting speeds up how quickly config-triggered replication changes begin, but adds additional CPU overhead. The overhead scales with the number of leaseholders.
* The RPC dial and heartbeat timeouts can now be configured via the following environment variables: `COCKROACH_RPC_DIAL_TIMEOUT`, which defaults to 2x the value of `COCKROACH_NETWORK_TIMEOUT`; `COCKROACH_RPC_HEARTBEAT_TIMEOUT`, which defaults to 3x `COCKROACH_NETWORK_TIMEOUT`. This allows configuring these values independently of <InternalLink version="v23.1" path="architecture/distribution-layer#grpc">`COCKROACH_NETWORK_TIMEOUT`</InternalLink>, which defaults to 2s.
* The default gRPC server-side send timeout has been increased from 2 seconds to 4 seconds (that is, from 1x to 2x the default value of <InternalLink version="v23.1" path="architecture/distribution-layer#grpc">`COCKROACH_NETWORK_TIMEOUT`</InternalLink> ), to avoid spurious connection failures in certain scenarios. This can be controlled via the new environment variable `COCKROACH_RPC_SERVER_TIMEOUT`.
* Added a new gauge <InternalLink version="v23.1" path="metrics">metric</InternalLink> `sql.schema.invalid_objects`. This gauge is periodically updated based on the schedule set by the `sql.schema.telemetry.recurrence` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. When the metric is updated, it counts the number of schema objects ( <InternalLink version="v23.1" path="create-table">tables</InternalLink>, <InternalLink version="v23.1" path="create-type">types</InternalLink>, <InternalLink version="v23.1" path="create-schema">schemas</InternalLink>, <InternalLink version="v23.1" path="create-database">databases</InternalLink>, and <InternalLink version="v23.1" path="user-defined-functions">functions</InternalLink> ) that are in an invalid state according to CockroachDB's internal validation checks. This metric is expected to be zero ( `0` ) in a healthy cluster. If it is not zero, it indicates that there is a problem that must be repaired.
* The <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `kv.allocator.lease_rebalance_threshold` can now be used to control the minimum fraction away from the mean a <InternalLink version="v23.1" path="cockroach-start#store">store's</InternalLink> lease count before it is considered for lease transfers. The default setting is 0.05.
* On Linux/ARM64, 16k page sizes are now used in jemalloc. This allows Linux/ARM64 users with 16k pages to run `cockroach`.

### DB Console changes

* The generic DB Console "unexpected error" message now includes details about the actual error, along with other context to make it easier to root cause.
* Fixed a bug where the <InternalLink version="v23.1" path="ui-jobs-page">job details page</InternalLink> would flicker between the job details and a loading animation when a job was still executing.
* Added a timescale label to the **Diagnostics** tab of the <InternalLink version="v23.1" path="ui-statements-page">Statement Details page</InternalLink>. Users are now able to see the time window for which the <InternalLink version="v23.1" path="explain-analyze#explain-analyze-debug">statement diagnostics</InternalLink> are displayed.
* Fixed the options selection in the **Sort** dropdown on the <InternalLink version="v23.1" path="ui-network-latency-page">Network Latency page</InternalLink>.
* Search is performed on all ID fields of the **Transaction Executions** and **Statement Executions** views on the <InternalLink version="v23.1" path="ui-insights-page">Insights Page</InternalLink>.
* Enabled the `Now` option on the time picker that appears on several pages of the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>.

### Bug fixes

* Fixed a bug where the **node** and **regions** columns on the <InternalLink version="v23.1" path="ui-databases-page">Databases Page</InternalLink> did not properly render. This column is shown for clusters with more than 1 node.
* Fixed an internal error when using <InternalLink version="v23.1" path="explain#types-option">`EXPLAIN (TYPES)`</InternalLink> on a <InternalLink version="v23.1" path="delete">`DELETE FROM... USING... RETURNING`</InternalLink> statement. This error was introduced in v23.1.0.
* Fixed a bug which manifested itself in error messages containing "failed to drop all of the relevant elements" when executing DDL statements with the declarative <InternalLink version="v23.1" path="online-schema-changes">schema changer</InternalLink>. What this really means is that there's a concurrent schema change that is ongoing. Instead we now behave as expected and wait for it to finish.
* Fixed a panic executing <InternalLink version="v23.1" path="create-table-as">`CREATE AS`</InternalLink> with `pg_catalog.pg_prepared_statements` as a source. For example: <InternalLink version="v23.1" path="create-table-as">`CREATE TABLE t AS SELECT * FROM pg_catalog.pg_prepared_statements`</InternalLink>; <InternalLink version="v23.1" path="create-view">`CREATE MATERIALIZED VIEW v AS SELECT * FROM pg_catalog.pg_prepared_statements`</InternalLink>.
* Fixed a panic executing <InternalLink version="v23.1" path="create-table-as">`CREATE AS`</InternalLink> with `pg_catalog.cursors` as a source. For example: <InternalLink version="v23.1" path="create-table-as">`CREATE TABLE t AS SELECT * FROM pg_catalog.pg_cursors`</InternalLink>; <InternalLink version="v23.1" path="create-view">`CREATE MATERIALIZED VIEW v AS SELECT * FROM pg_catalog.pg_cursors`</InternalLink>.
* Fixed a panic executing <InternalLink version="v23.1" path="create-table-as">`CREATE AS`</InternalLink> with `crdb_internal.create_statements` as a source. For example: <InternalLink version="v23.1" path="create-table-as">`CREATE TABLE t AS SELECT * FROM crdb_internal.create_statements`</InternalLink>; <InternalLink version="v23.1" path="create-view">`CREATE MATERIALIZED VIEW v AS SELECT * FROM crdb_internal.create_statements`</InternalLink>.
* Fixed a bug where the <InternalLink version="v23.1" path="ui-key-visualizer">Key Visualizer</InternalLink> was crashing with an "invalid conversion to int" message.
* Fixed a bug in the declarative <InternalLink version="v23.1" path="online-schema-changes">schema changer</InternalLink> where adding a <InternalLink version="v23.1" path="foreign-key">foreign key</InternalLink> or setting a column to `NOT NULL` with a non-existent column produced an assertion error instead of the proper pgcode.
* <InternalLink version="v23.1" path="show-schemas">`SHOW SCHEMAS FROM db_name`</InternalLink>
  will no longer incorrectly show schemas from the current database when the current database has a schema named
  `db_name`.
* Fixed a bug in <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> row count estimates of a scan from a partitioned <InternalLink version="v23.1" path="partial-indexes">partial index</InternalLink>, which may cause an underestimated row count or a panic if the row count goes to zero.
* Fixed a bug where a <InternalLink version="v23.1" path="transactions#transaction-retries">transaction retry</InternalLink> during the backfill of the `job_type` column in the <InternalLink version="v23.1" path="show-jobs">jobs table</InternalLink> could result in some job records with no `job_type` value.
* Fixed a bug where some <InternalLink version="v23.1" path="indexes">secondary indexes</InternalLink> would incorrectly be treated internally as <InternalLink version="v23.1" path="primary-key">primary indexes</InternalLink>, which could cause some <InternalLink version="v23.1" path="online-schema-changes">schema change</InternalLink> operations to fail. The bug could occur if <InternalLink version="v23.1" path="alter-table#alter-primary-key">`ALTER TABLE... ALTER PRIMARY KEY`</InternalLink> was used on CockroachDB <InternalLink version="v23.1" path="releases/v21.1">v21.1</InternalLink> or earlier, and the cluster was upgraded.
* In the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>, selecting a database filter from the filters menu in the <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity Page</InternalLink> should function as expected. This fixes a bug where the filter would break and not show any results when the results were retrieved from the statement activity table instead of the persisted table.
* The statement tag for <InternalLink version="v23.1" path="show-sequences">`SHOW SEQUENCES`</InternalLink> is now corrected to be `SHOW SEQUENCES` instead of <InternalLink version="v23.1" path="show-schemas">`SHOW SCHEMAS`</InternalLink>.
* Fixed a rare bug in which some uploads via <InternalLink version="v23.1" path="cockroach-userfile-upload">`cockroach userfile upload`</InternalLink> would silently upload incorrect data.
* Under prolonged unavailability (such as loss of <InternalLink version="v23.1" path="architecture/overview">quorum</InternalLink> ), affected <InternalLink version="v23.1" path="architecture/overview">ranges</InternalLink> would exhibit <InternalLink version="v23.1" path="architecture/replication-layer#raft-logs">Raft log</InternalLink> growth that was quadratic as a function of the duration of the outage. Now this growth is approximately linear instead.
* Fixed a bug on the <InternalLink version="v23.1" path="metrics">**Metrics**</InternalLink> page that was causing it to not update automatically on rolling window options.
* Blocked dropping of <InternalLink version="v23.1" path="indexes">indexes</InternalLink> impacted by <InternalLink path="a99561">Technical Advisory 99561</InternalLink> if dropping those indexes could cause data loss to occur.
* <InternalLink version="v23.1" path="cockroach-debug-zip">Debug zips</InternalLink>
  are now properly showing the information from
  <InternalLink version="v23.1" path="crdb-internal">`crdb_internal.cluster_settings`</InternalLink>
  . The file `crdb_internal.cluster_settings.txt` in debug zips was empty due to this bug on CockroachDB
  <InternalLink version="v23.1" path="releases/v23.1#v23-1-5">v23.1.5</InternalLink>
  (which was the only version affected).
* A bug has been fixed that caused internal errors instead of user errors when queries contained labelled <InternalLink version="v23.1" path="scalar-expressions#tuple-constructors">tuples</InternalLink> with a different number of elements and labels, e.g., `(ROW(1, 2) AS a)`. This bug had been present since CockroachDB <InternalLink version="v23.1" path="releases/v23.1">v23.1.0</InternalLink>.
* Fixed a failing <InternalLink version="v23.1" path="online-schema-changes">schema change</InternalLink> <InternalLink version="v23.1" path="show-jobs">job</InternalLink> when <InternalLink version="v23.1" path="create-table-as">CREATE TABLE AS</InternalLink> or <InternalLink version="v23.1" path="create-view">`CREATE MATERIALIZED VIEW AS`</InternalLink> sources from a `SHOW` command as in the following examples:
  * `CREATE TABLE t AS SELECT * FROM [SHOW CREATE TABLE tbl];`
  * `CREATE TABLE t AS SELECT * FROM [SHOW INDEXES FROM tbl];`
  * `CREATE TABLE t AS SELECT * FROM [SHOW COLUMNS FROM tbl];`
  * `CREATE TABLE t AS SELECT * FROM [SHOW CONSTRAINTS FROM tbl];`
  * `CREATE TABLE t AS SELECT * FROM [SHOW PARTITIONS FROM TABLE tbl];`
  * `CREATE TABLE t AS SELECT * FROM [SHOW PARTITIONS FROM INDEX tbl@tbl_pkey];`
* Index recommendations in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> no longer use the fully qualified name of a table to create an index name, allowing the creating of <InternalLink version="v23.1" path="indexes">indexes</InternalLink> directly from the DB Console to work.
* Fixed a bug where <InternalLink version="v23.1" path="show-grants">`SHOW GRANTS`</InternalLink> could fail if any objects were offline, which can happen during a <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink>.
* The `pg_get_serial_sequence` <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink> can now handle mixed-case names correctly.
* Fixed a bug with the "SQL statement diagnostic request" <InternalLink version="v23.1" path="cluster-api">HTTP API</InternalLink> that would affect CockroachDB Serverless clusters was fixed. This bug had existed since CockroachDB <InternalLink version="v23.1" path="releases/v22.1">v22.1</InternalLink>.
* Fixed a bug where under rare circumstances, a <InternalLink version="v23.1" path="architecture/replication-layer">replication</InternalLink> change could get stuck when proposed near lease/leadership changes (and likely under overload), and the <InternalLink version="v23.1" path="architecture/replication-layer#per-replica-circuit-breakers">replica circuit breakers</InternalLink> could trip.
* Fixed a bug in upstream `etcd-io/raft` which could result in pulling unlimited amount of logs into memory, and lead to out-of-memory errors. Now the log scan has a limited memory footprint.
* Fixed a bug where, in rare circumstances, a [replication](https://cockroachlabs.com/docs/v23.1/architecture/replication-layer) could get stuck when proposed near lease or leadership changes, especially under overload, and the \[replica circuit breakers]\( [../v23.1](https://cockroachlabs.com/docs/v23.1/architecture/replication-layer#per-replica-circuit-breakers) could trip. A previous attempt to fix this issue has been reverted in favor of this fix.
* Fixed a bug in the SQL syntax for <InternalLink version="v23.1" path="create-table-as">`CREATE TABLE AS`</InternalLink> <InternalLink version="v23.1" path="online-schema-changes">schema change</InternalLink> <InternalLink version="v23.1" path="show-jobs">job</InternalLink> description.
* Fixed an internal error in <InternalLink version="v23.1" path="update">`UPDATE`</InternalLink>, <InternalLink version="v23.1" path="upsert">`UPSERT`</InternalLink>, <InternalLink version="v23.1" path="insert">`INSERT`</InternalLink>, or <InternalLink version="v23.1" path="delete">`DELETE`</InternalLink> statements run concurrently with <InternalLink version="v23.1" path="alter-table#add-column">`ALTER TABLE... ADD COLUMN`</InternalLink> of a <InternalLink version="v23.1" path="computed-columns">virtual computed column</InternalLink> on the same table.
* Fixed a bug that caused internal errors when using <InternalLink version="v23.1" path="create-type">user-defined types</InternalLink> in <InternalLink version="v23.1" path="views">views</InternalLink> and <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink> that have <InternalLink version="v23.1" path="subqueries">subqueries</InternalLink>. This bug was present when using views since version v21.2. It was present when using user-defined functions since <InternalLink version="v23.1" path="releases/v23.1">v23.1</InternalLink>.
* The timeout duration when loading the <InternalLink version="v23.1" path="ui-hot-ranges-page">**Hot Ranges** page</InternalLink> has been increased to 30 minutes.
* Fixed the SQL syntax for <InternalLink version="v23.1" path="views#materialized-views">`CREATE MATERIALIZED VIEW AS`</InternalLink> <InternalLink version="v23.1" path="online-schema-changes">schema change</InternalLink> <InternalLink version="v23.1" path="show-jobs">job</InternalLink> descriptions.
* Reduced <InternalLink version="v23.1" path="performance-best-practices-overview#transaction-contention">contention</InternalLink> on the `system.statement_statistics` table which has caused the <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">SQL statistics</InternalLink> compaction <InternalLink version="v23.1" path="show-jobs">job</InternalLink> to fail.
* The `ST_ClosestPoint` <InternalLink version="v23.1" path="functions-and-operators">spatial function</InternalLink> previously did not preserve the correct <InternalLink version="v23.1" path="srid-4326">SRID</InternalLink> when comparing two different <InternalLink version="v23.1" path="point">points</InternalLink>. This is now resolved.
* CockroachDB would previously crash when evaluating the `ST_AsEncodedPolyline` <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink> on a <InternalLink version="v23.1" path="geometrycollection">`GEOMETRYCOLLECTION` geometry type</InternalLink>. The bug was introduced before CockroachDB <InternalLink version="v23.1" path="releases/v22.1">v22.1</InternalLink> and is now fixed.
* Fixed a bug where dropping an <InternalLink version="v23.1" path="indexes">index</InternalLink> could end up failing or cleaning <InternalLink version="v23.1" path="foreign-key">foreign keys</InternalLink> (when `CASCADE` is specified) on other tables referencing the target table with this index.
* Fixed a bug where CockroachDB would return an error when using <InternalLink version="v23.1" path="show-range-for-row">`SHOW RANGE... FOR ROW...`</InternalLink> in a <InternalLink version="v23.1" path="create-table-as">`CREATE TABLE AS`</InternalLink> construct.
* Cloud buckets containing <InternalLink version="v23.1" path="backup">backups</InternalLink> can now be copied via AWS DataSync and other third-party services which insert empty objects with a trailing `/`. Previously, <InternalLink version="v23.1" path="restore">restore</InternalLink> would fail with the following error message: `read LATEST path: path does not contain a completed latest backup: NoSuchKey`.
* Fixed a bug where <InternalLink version="v23.1" path="alter-table#drop-column">`DROP COLUMN CASCADE`</InternalLink> involving a <InternalLink version="v23.1" path="primary-key">primary key</InternalLink> column could end up hanging.
* Fixed a nil pointer dereference caused by a race condition when using the `to_char` <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink>.
* Since <InternalLink version="v23.1" path="releases/v22.2">v22.2.0</InternalLink>, using a PTP clock device (enabled by the <InternalLink version="v23.1" path="cockroach-start">`--clock-device` flag</InternalLink> ) would generate timestamps in the far future. It now generates the correct time. This could cause nodes to crash due to incorrect timestamps, or in the worst case irreversibly advance the cluster's <InternalLink version="v23.1" path="architecture/transaction-layer#time-and-hybrid-logical-clocks">HLC clock</InternalLink> into the far future.
* Previously, CockroachDB, when planning expressions containing many sub-expressions (e.g., deeply-nested `AND` / `OR` structures), would use memory quadratic in the number of sub-expressions. In the worst cases (thousands of sub-expressions), this could lead to <InternalLink version="v23.1" path="cluster-setup-troubleshooting#out-of-memory-oom-crash">OOMs</InternalLink>. The bug had been present since at least <InternalLink version="v23.1" path="releases/v22.1">v22.1</InternalLink> and has now been fixed.
* When losing a <InternalLink version="v23.1" path="architecture/overview">leaseholder</InternalLink> and using <InternalLink version="v23.1" path="configure-replication-zones">lease preferences</InternalLink>, the lease can be acquired by any other <InternalLink version="v23.1" path="architecture/overview">replica</InternalLink> (regardless of lease preferences) in order to restore availability as soon as possible. The new leaseholder will now immediately check if it violates the lease preferences, and attempt to transfer the lease to a replica that satisfies the preferences if possible.
* Fixed the <InternalLink version="v23.1" path="online-schema-changes">schema changer</InternalLink> <InternalLink version="v23.1" path="show-jobs">job</InternalLink> when <InternalLink version="v23.1" path="create-table-as">`CREATE AS`</InternalLink> sources from <InternalLink version="v23.1" path="show-create#show-the-create-function-statement-for-a-function">`SHOW CREATE FUNCTION`</InternalLink>, e.g.: `CREATE TABLE t AS SELECT * FROM [SHOW CREATE FUNCTION f]`.
* Added cancel checking to <InternalLink version="v23.1" path="indexes">index</InternalLink> constraint initialization code to allow queries to timeout during <InternalLink version="v23.1" path="cost-based-optimizer">query optimization</InternalLink> if analyzing predicates to constrain an index starts using too many resources. Example of setting a timeout using the <InternalLink version="v23.1" path="set-vars">`statement_timeout` session setting</InternalLink>: `SET statement_timeout='5.0s';`
* Previously, CockroachDB could encounter an internal error `unexpected non-zero bytes limit for txnKVStreamer` when evaluating <InternalLink version="v23.1" path="cost-based-optimizer#locality-optimized-search-in-multi-region-clusters">locality-optimized</InternalLink> lookup <InternalLink version="v23.1" path="joins">joins</InternalLink> in case it had to perform the remote regions' lookup. The bug was introduced in <InternalLink version="v23.1" path="releases/v22.2">v22.2</InternalLink> and is now fixed. A temporary workaround can be accomplished without upgrading by setting the `streamer_enabled` <InternalLink version="v23.1" path="session-variables">session variable</InternalLink>: `SET streamer_enabled = false;`.
* Fixed a spurious error `no data source matches prefix` that could occur during <InternalLink version="v23.1" path="cost-based-optimizer">planning for a query</InternalLink> with `DISTINCT ON` and <InternalLink version="v23.1" path="order-by">`ORDER BY ASC NULLS LAST`</InternalLink> or `ORDER BY DESC NULLS FIRST`.
* Fixed an <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> costing bug introduced in <InternalLink version="v23.1" path="releases/v23.1">v23.1</InternalLink> that could cause a query involving two or more <InternalLink version="v23.1" path="joins">joins</InternalLink> with <InternalLink version="v23.1" path="table-localities#regional-by-row-tables">`REGIONAL BY ROW`</InternalLink> tables to not pick the most optimal <InternalLink version="v23.1" path="joins#lookup-joins">lookup joins</InternalLink>.
* Fixed an <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> costing bug introduced in <InternalLink version="v23.1" path="releases/v23.1">v23.1</InternalLink> that could cause a query whose best-cost query plan is a string of <InternalLink version="v23.1" path="joins#lookup-joins">lookup joins</InternalLink> with <InternalLink version="v23.1" path="table-localities#regional-by-row-tables">`REGIONAL BY ROW`</InternalLink> tables, one after the other in sequence, to not pick the most optimal join plan.
* Previously, using <InternalLink version="v23.1" path="import-into">`IMPORT INTO`</InternalLink> for `DELIMITED DATA` or MySQL imports would error with `column... does not exist` if it was importing into a <InternalLink version="v23.1" path="collate">collated string</InternalLink> column. This is now fixed.
* Fixed a bug introduced in <InternalLink version="v23.1" path="releases/v23.1">v23.1</InternalLink> that could cause the precision of some values to be incorrectly truncated for a query with a correlated <InternalLink version="v23.1" path="subqueries">subquery</InternalLink> and an equality between a column from the subquery and the outer query. This applies to types that are "equivalent" but have different precision levels, e.g., <InternalLink version="v23.1" path="decimal">`DECIMAL(10, 0)`</InternalLink> vs `DECIMAL(10, 2)` or `NAME` vs <InternalLink version="v23.1" path="string">`CHAR`</InternalLink>.
* Fixed a bug where <InternalLink version="v23.1" path="begin-transaction">`BEGIN`</InternalLink>, <InternalLink version="v23.1" path="commit-transaction">`COMMIT`</InternalLink>, <InternalLink version="v23.1" path="set-vars">`SET`</InternalLink>, <InternalLink version="v23.1" path="rollback-transaction">`ROLLBACK`</InternalLink>, and <InternalLink version="v23.1" path="savepoint">`SAVEPOINT`</InternalLink> statements would not be written to the <InternalLink version="v23.1" path="logging-overview#logging-destinations">execution</InternalLink> or <InternalLink version="v23.1" path="sql-audit-logging">audit logs</InternalLink>.
* Fixed a bug where a session migration performed by `SHOW TRANSFER STATE` would not handle prepared statements that used the <InternalLink version="v23.1" path="as-of-system-time">`AS OF SYSTEM TIME` clause</InternalLink>. Users who encountered this bug would see errors such as `expected 1 or 0 for number of format codes, got N`. This bug was present since <InternalLink version="v23.1" path="releases/v22.2">v22.2.0</InternalLink>.
* Fixed errors on the <InternalLink version="v23.1" path="ui-sessions-page">**Sessions** page</InternalLink> in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> when a session's memory usage is zero bytes.
* Fixed a bug introduced in <InternalLink version="v23.1" path="releases/v22.1">v22.1</InternalLink> that could cause a <InternalLink version="v23.1" path="joins">join</InternalLink> to infinite-loop in rare cases when (1) the join filter is not an equality and (2) no columns from the left input are returned.
* Fixed an issue with the full scan filter on the <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> where the filter was always evaluating to false, even if a full scan had occurred.
* Fixed a bug that could cause CPU usage to increase over time.
* Fixed a bug that could cause some rows to be silently skipped during <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink> when a node's import worker failed.
* Fixed a bug in <InternalLink version="v23.1" path="spatial-data-overview">geospatial</InternalLink> queries, where a query filter of the form `ST_Distance(geog1, geog2) > constant`, or `ST_MaxDistance(geom1, geom2) > constant`, where the operator is one of `>`, `<`, `>=`, `<=`, or a filter of the form `ST_Distance(geog1, geog2, false) = 0` may mistakenly evaluate to `true` when one or both of the inputs is `NULL` or an empty <InternalLink version="v23.1" path="architecture/glossary#geography">geography</InternalLink> or <InternalLink version="v23.1" path="architecture/glossary#geometry">geometry</InternalLink>. More rows could be returned by the query than expected.
* Fixed an issue where a <InternalLink version="v23.1" path="architecture/distribution-layer#range-splits">split</InternalLink> can be called on an invalid key that's in the form of `someValidKey.Next()` during <InternalLink version="v23.1" path="restore">restore</InternalLink>. This split key can land in the middle of a row with <InternalLink version="v23.1" path="column-families">column families</InternalLink>, and thus result in failing SQL queries when querying the restored table.
* Fixed an issue where a <InternalLink version="v23.1" path="architecture/distribution-layer#range-splits">split</InternalLink> can be called on an invalid key that's in the form of `someValidKey.Next()` during <InternalLink version="v23.1" path="restore">restore</InternalLink> with the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `bulkio.restore.use_simple_import_spans=true`. This split key can land in the middle of a row with <InternalLink version="v23.1" path="column-families">column families</InternalLink>, and thus result in failing SQL queries when querying the restored table.
* Fixed a bug that caused a flood of requests to refresh <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> on the <InternalLink version="v23.1" path="ui-debug-pages#configuration">Advanced Debug page</InternalLink>. If a user would like to see the effect of a modified cluster setting in <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>, a page reload is now required.

### Performance improvements

* <InternalLink version="v23.1" path="backup-and-restore-overview">Backups</InternalLink>
  no longer perform work proportional to the number of pending
  <InternalLink version="v23.1" path="architecture/transaction-layer#write-intents">write intents</InternalLink>
  that they encounter, so they are more than 100x faster when encountering long-running, bulk writing transactions.

* Queries that access <InternalLink version="v23.1" path="pg-catalog">`pg_catalog`</InternalLink> and <InternalLink version="v23.1" path="information-schema">`information_schema`</InternalLink> that perform introspection on other tables in those schemas are now significantly faster.

### Contributors

This release includes 378 merged PRs by 67 authors.

## v23.1.8

Release Date: August 7, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.linux-amd64.tgz">
          cockroach-v23.1.8.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.linux-amd64.tgz">
          cockroach-sql-v23.1.8.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.linux-arm64.tgz">
          cockroach-v23.1.8.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.linux-arm64.tgz">
          cockroach-sql-v23.1.8.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.darwin-10.9-amd64.tgz">
          cockroach-v23.1.8.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.8.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.darwin-11.0-arm64.tgz">
          cockroach-v23.1.8.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.8.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.windows-6.2-amd64.zip">
          cockroach-v23.1.8.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.8.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.8.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.8.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.8
```

### Enterprise edition changes

* <InternalLink version="v23.1" path="cloud-storage-authentication?filters=azure#azure-blob-storage-implicit-authentication">Azure Blob Storage credentials for implicit authentication</InternalLink>
  can now be stored in a file with the following YAML format:

  ```yaml theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  azure_tenant_id: {MY_TENANT_ID},
  azure_client_id: {MY_CLIENT_ID},
  azure_client_secret: {MY_CLIENT_SECRET}
  ```

  Set the environment variable `COCKROACH_AZURE_APPLICATION_CREDENTIALS_FILE` to the path of the file. The implicit authentication method first attempts to authenticate using credentials in the file before attempting to authenticate using any other credentials specified in the [`DefaultAzureCredential` class](https://learn.microsoft.com/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet), such as environment variables and Managed Identity. These credentials can also be used for <InternalLink version="v23.1" path="take-and-restore-encrypted-backups#use-key-management-service">encrypted backups</InternalLink>.

### Bug fixes

* Fixed a bug where <InternalLink version="v23.1" path="drop-index">`DROP INDEX... CASCADE`</InternalLink> could drop unrelated <InternalLink version="v23.1" path="foreign-key">foreign key constraints</InternalLink>. For example, if `DROP INDEX... CASCADE` was executed on a unique index for a `Table A`, and if a `Table B` had a foreign key reference to `Table A`, unrelated outbound foreign key constraints on `Table B` would be dropped.
* Fixed a bug that would result in corruption of <InternalLink version="v23.1" path="security-reference/encryption#encryption-at-rest">encrypted data at rest on a cluster node</InternalLink>. If a node with this corrupted state was restarted, the node could fail to rejoin the cluster. If multiple nodes encountered this bug at the same time during roll out, the cluster could lose <InternalLink version="v23.1" path="architecture/replication-layer#overview">quorum</InternalLink>. For more information, refer to <InternalLink path="a106617">Technical Advisory 106617</InternalLink>.

### Contributors

This release includes 5 merged PRs by 5 authors.

## v23.1.7

Release Date: July 31, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.linux-amd64.tgz">
          cockroach-v23.1.7.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.linux-amd64.tgz">
          cockroach-sql-v23.1.7.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.linux-arm64.tgz">
          cockroach-v23.1.7.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.linux-arm64.tgz">
          cockroach-sql-v23.1.7.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.darwin-10.9-amd64.tgz">
          cockroach-v23.1.7.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.7.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.darwin-11.0-arm64.tgz">
          cockroach-v23.1.7.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.7.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.windows-6.2-amd64.zip">
          cockroach-v23.1.7.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.7.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.7.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.7.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.7
```

### SQL language changes

* Added the `crdb_internal.reset_activity_tables` <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink> to allow users to reset the statistics in the `system.{statement|transaction}_activity` tables. Users require the <InternalLink version="v23.1" path="security-reference/authorization#admin-role">`admin` role</InternalLink> to use this built-in function.
* Added the `sql.telemetry.query_sampling.internal.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>, which is `false` by default. If set to `true`, internal app queries will be reported to <InternalLink version="v23.1" path="logging#telemetry">telemetry</InternalLink> when query sampling to telemetry is <InternalLink version="v23.1" path="configure-logs">enabled</InternalLink>.

### DB Console changes

* Added a timescale label to the <InternalLink version="v23.1" path="ui-statements-page#diagnostics">**Diagnostics** tab</InternalLink> of the <InternalLink version="v23.1" path="ui-statements-page">**Statement Details** page</InternalLink>. The time window for the statement diagnostics is now displayed.
* Increased the timeout duration for loading the <InternalLink version="v23.1" path="ui-hot-ranges-page">**Hot Ranges** page</InternalLink> to 30 minutes.

### Bug fixes

* The **Regions/Nodes** column on the <InternalLink version="v23.1" path="ui-databases-page">**Database** and **Database Details** pages</InternalLink> will now render properly. This column displays for clusters with more than 1 node.
* Fixed a bug where the <InternalLink version="v23.1" path="ui-jobs-page#job-details">**Job Details** page</InternalLink> would flicker between the job details and a loading animation while a job is still executing.
* Fixed a bug where the <InternalLink version="v23.1" path="ui-key-visualizer">**Key Visualizer** page</InternalLink> would crash due to an invalid conversion to `int` error.
* Fixed a bug that caused an infinite re-render on the <InternalLink version="v23.1" path="ui-key-visualizer">**Key Visualizer** page</InternalLink> when a custom time period was selected.
* Fixed a bug on the **SQL Activity**, <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> where the database filter would not return results even when statements existed for the selected database. This is now fixed so that selecting a database filter from the filters menu on the <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> will function as expected.
* Fixed a bug where the <InternalLink version="v23.1" path="ui-overview-dashboard">**Metrics** page</InternalLink> was not updating automatically on rolling window options.
* Fixed a bug where <InternalLink version="v23.1" path="ui-statements-page#diagnostics">statement diagnostics</InternalLink> on the <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> were not always showing. This is now fixed with statement diagnostics displaying for the correct time period.
* Fixed a bug where the **Sort** dropdown on the <InternalLink version="v23.1" path="ui-network-latency-page">**Network Latency** page</InternalLink> would not persist the selected value because a page reload was triggered.
* Fixed a bug where the index recommendation on the <InternalLink version="v23.1" path="ui-insights-page">**Insights** page</InternalLink> would use the fully qualified table name to create an index name, which would cause an error due to the invalid syntax. Indexes can now be created directly from the DB Console without encountering this error.
* Fixed a bug where <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> would fail when upgrading to version [v23.1.5](#v23-1-5) because the job record did not have a `clusterID` field set.
* Fixed a bug where `UPDATE`, `UPSERT`, `DELETE` statements running concurrently with <InternalLink version="v23.1" path="alter-table#add-column">`ALTER TABLE..ADD COLUMN`</InternalLink> of a virtual computed column on the same table would fail.
* Fixed a bug where <InternalLink version="v23.1" path="show-jobs#show-automatic-jobs">SQL statistics compaction jobs</InternalLink> would fail. This is now fixed by reducing the contention on the `system.statement_statistics` table.
* Fixed a bug where running a <InternalLink version="v23.1" path="change-data-capture-overview">changefeed</InternalLink> that targets a table with a user-defined type column and with the <InternalLink version="v23.1" path="create-changefeed">`envelope` option</InternalLink> set to any value other than `wrapped` would cause a node panic due to a nil dereference.

### Contributors

This release includes 16 merged PRs by 11 authors.

## v23.1.6

Release Date: July 24, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.linux-amd64.tgz">
          cockroach-v23.1.6.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.linux-amd64.tgz">
          cockroach-sql-v23.1.6.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.linux-arm64.tgz">
          cockroach-v23.1.6.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.linux-arm64.tgz">
          cockroach-sql-v23.1.6.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.darwin-10.9-amd64.tgz">
          cockroach-v23.1.6.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.6.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.darwin-11.0-arm64.tgz">
          cockroach-v23.1.6.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.6.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.windows-6.2-amd64.zip">
          cockroach-v23.1.6.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.6.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.6.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.6.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.6
```

### Bug fixes

* Fixed a bug in v23.1.5 where <InternalLink version="v23.1" path="cockroach-debug-zip">debug zips</InternalLink> were empty in the `crdb_internal.cluster_settings.txt` file. Debug zips now properly show the information from `cluster_settings`.
* Fixed a bug where some primary indexes would incorrectly be treated internally as secondary indexes, which could cause schema change operations to fail. The bug could occur if <InternalLink version="v23.1" path="alter-table#alter-primary-key">`ALTER PRIMARY KEY`</InternalLink> was used on v21.1 or earlier, and the cluster was upgraded.
* Extended the `cockroach debug doctor` to detect <InternalLink version="v23.1" path="indexes">indexes</InternalLink> which could potentially lose data by being dropped when a column is stored inside them and added a check inside <InternalLink version="v23.1" path="drop-index">`DROP INDEX`</InternalLink> to prevent dropping indexes with this problem to avoid data loss.

### Contributors

This release includes 3 merged PRs by 15 authors.

## v23.1.5

Release Date: July 5, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.linux-amd64.tgz">
          cockroach-v23.1.5.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.linux-amd64.tgz">
          cockroach-sql-v23.1.5.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.linux-arm64.tgz">
          cockroach-v23.1.5.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.linux-arm64.tgz">
          cockroach-sql-v23.1.5.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.darwin-10.9-amd64.tgz">
          cockroach-v23.1.5.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.5.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.darwin-11.0-arm64.tgz">
          cockroach-v23.1.5.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.5.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.windows-6.2-amd64.zip">
          cockroach-v23.1.5.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.5.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.5.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.5.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.5
```

### Security updates

* The full set of TLS ciphers that was present in v22.1 have been included in the existing cipher suites list, which can be enabled with the `COCKROACH_TLS_ENABLE_OLD_CIPHER_SUITES` environment variable.

### Enterprise edition changes

* Added new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> in the `server.oidc_authentication.generate_cluster_sso_token` namespace that support using OIDC to generate a <InternalLink version="v23.1" path="sso-sql">JWT auth token for cluster SSO</InternalLink>.

### SQL language changes

* Improved the inline documentation and error messages related to <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink>.
* Inbound <InternalLink version="v23.1" path="foreign-key">foreign keys</InternalLink> on TTL tables are now allowed.
* Added the columns `default_value` and `origin` ( with the values `default`, `override`, `external-override` ) to the <InternalLink version="v23.1" path="show-cluster-setting">`SHOW CLUSTER SETTING`</InternalLink> command.
* Added the `VIEWACTIVITY` and `VIEWACTIVITYREDACTED` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system privileges</InternalLink> for the `crdb_internal.cluster_queries` and `crdb_internal.node_queries` <InternalLink version="v23.1" path="crdb-internal">tables</InternalLink>.
* Fixed the error message to be more understandable when attempting to create <InternalLink version="v23.1" path="user-defined-functions">UDFs</InternalLink> under a virtual or temporary schema.

### Command-line changes

* Running <InternalLink version="v23.1" path="cockroach-node#node-decommission">`cockroch node decommission <nodeID>`</InternalLink> for a node that has already been decommissioned will now exit with code 0, as had been the case in CockroachDB versions prior to v23.1.0.

### DB Console changes

* The <InternalLink version="v23.1" path="ui-hot-ranges-page#range-report">**Range Report** page</InternalLink> (route `/reports/range/:rangeID` ) shows the **Hot Ranges** menu item as highlighted in the left-side menu. The back button in the **Range Report** page redirects back to the **Hot Ranges** page.
* Added description to the tooltip for the `Idle` status only for the Active Transactions view. Excluded `Idle` status filter option for the Active Statements view.

### Bug fixes

* Added more precision to small percentage values on the percentage bars on the DB Console.

* Fixed a crash when using `DurationToNumber` with empty duration object on SQL Activity tables.

* `SpanStats` is no longer subject to stale information, and should be considered authoritative.

* Fixed a bug in MuxRangefeed implementation that may cause MuxRangefeed to become stuck if enough ranges encountered certain error concurrently.

* <InternalLink version="v23.1" path="show-jobs">`SHOW CHANGEFEED JOBS`</InternalLink>
  no longer fails on v22.2 and v23.1 mixed-version clusters.

* <InternalLink version="v23.1" path="grant">`GRANT SYSTEM ALL...`</InternalLink>
  no longer causes the grantee to be unable to log in. This was due to a bug where `ALL` would include the `NOSQLLOGIN`
  <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system privilege</InternalLink>
  . Since `NOSQLLOGIN` is the only "negative" privilege, it is now excluded from the `ALL` shorthand, and must be
  granted explicitly in order to restrict logins.

* CockroachDB previously could encounter `zero transaction timestamp in EvalContext` when evaluating the <InternalLink version="v23.1" path="copy">`COPY FROM`</InternalLink> command. The bug was introduced in v23.1.0 and is now fixed.

* Fixed the data fetching for the **Database** and **Table Details** pages. Prior to this change, some databases/tables could be permanently stuck in a loading state, causing their corresponding page to permanently show a spinner. This change fixes the data fetching for these pages to ensure all databases and tables are loaded correctly.

* Fixed a bug where <InternalLink version="v23.1" path="insert">`INSERT.. ON CONFLICT.. DO UPDATE`</InternalLink> queries incorrectly resulted in an "ambiguous column" error. The bug only presented if the target table had a computed column with an expression referencing a column with a `DEFAULT` value.

* On the **SQL Statistics** pages, a transaction query is now available as long as the statement fingerprints associated with the transaction also exist in the payload.

* Previously, CockroachDB would crash when evaluating <InternalLink version="v23.1" path="create-table">`CREATE TABLE.. AS or CREATE MATERIALIZED VIEW.. AS`</InternalLink> statements when the `AS` clause selected data from `crdb_internal.cluster_statement_statistics` or `crdb_internal.cluster_transaction_statistics` virtual tables. The bug has been present since at least v22.1 and is now fixed.

* Fixed a source of mutex contention within the storage engine that could increase tail latencies on high-CPU, high-throughput deployments.

* Fixed a bug where nodes could terminate with the following message: `server startup failed: cockroach server exited with error: ‹migration-job-find-already-completed›: key range id:X is unavailable: ‹failed to send RPC: no replica node information available via gossip for rX›`.

* Previously, cross-database type references were allowed through `CREATE TABLE...AS` statements if the source table was from another database and any of its columns was of a user-defined type. This introduced a bug where the source table could be dropped and the type could not be found for the CTAS table. This commit disallows such CTAS as a fix.

* CockroachDB can now automatically delete statistics for dropped tables from `system.table_statistics` table. However, out of caution, this mechanism is disabled by default on v23.1 releases.

* Fixed a race condition that can occur when multiple SQL servers are created simultaneously, causing simultaneous writes to an unprotected global variable used to configure a CCL audit logging feature.

* Previously, referencing a user-defined type in the body of a <InternalLink version="v23.1" path="user-defined-functions">user-defined function</InternalLink> would result in an error at the time of creating the function. This is now fixed.

* CockroachDB now returns an error during <InternalLink version="v23.1" path="user-defined-functions">UDF</InternalLink> creation if an input argument has type `RECORD`.

### Performance improvements

* If the `sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> is disabled, the optimizer can now eliminate uniqueness checks for `STRING` and `BYTES` columns when the value is set to `gen_random_uuid()` (with an implicit or explicit cast to `STRING` or `BYTES` ). If you still want the checks, you can set `sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled` to `true` (the default is `false` ).

### Contributors

This release includes 115 merged PRs by 44 authors.

## v23.1.4

Release Date: June 20, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.linux-amd64.tgz">
          cockroach-v23.1.4.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.linux-amd64.tgz">
          cockroach-sql-v23.1.4.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.linux-arm64.tgz">
          cockroach-v23.1.4.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.linux-arm64.tgz">
          cockroach-sql-v23.1.4.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.darwin-10.9-amd64.tgz">
          cockroach-v23.1.4.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.4.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.darwin-11.0-arm64.tgz">
          cockroach-v23.1.4.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.4.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.windows-6.2-amd64.zip">
          cockroach-v23.1.4.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.4.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.4.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.4.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.4
```

### Security updates

* The new <InternalLink version="v23.1" path="cluster-settings">`sql.auth.createrole_allows_grant_role_membership.enabled`</InternalLink> cluster setting allows a user with the <InternalLink version="v23.1" path="create-user#role-options">`CREATEROLE` role option</InternalLink> to grant and revoke non-admin roles. This cluster setting defaults to `false`, but is expected to become the default behavior in the future.

### Enterprise edition changes

* Fixed an initialization race condition in <InternalLink version="v23.1" path="changefeed-examples">changefeed schema feeds</InternalLink> that could cause a node to crash with a null pointer exception.

### SQL language changes

* Users with <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">`MODIFYSQLCLUSTERSETTING`</InternalLink> can now view only `sql.defaults` <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> instead of all cluster settings.

### Operational changes

* The <InternalLink version="v23.1" path="cockroach-debug-zip">`debug.zip`</InternalLink> archive now contains the files formerly located at `nodes/*/ranges/*.json` in one file per node, `nodes/*/ranges.json`.
* The `http-defaults` and `http-servers` sections of the <InternalLink version="v23.1" path="configure-logs">log config</InternalLink> will now accept a `headers` field containing a map of key-value string pairs which will comprise custom HTTP headers appended to every request. Additionally, a `compression` value can now be set to `gzip` or `none` to select a compression method for the HTTP request body. By default, `gzip` is selected. Previous functionality did not compress by default.

### Command-line changes

* The new log config option <InternalLink version="v23.1" path="configure-logs#log-buffering-for-network-sinks">`buffering`</InternalLink> allows you to <InternalLink version="v23.1" path="configure-logs#file-logging-format">format buffer output as JSON arrays</InternalLink>. This is useful for APIs that consume JSON arrays, such as the Datadog logs API.

### DB Console changes

* The DB Console overview page now displays a warning when all nodes are running on a new version but the cluster upgrade has not been finalized.
* The histogram window merge calculation now interpolates quantile values more accurately, and <InternalLink version="v23.1" path="ui-overview#metrics">**Metrics** charts</InternalLink> in the DB Console are smoother and more accurate.

### Bug fixes

* Fixed a bug where a transaction retry could miss job rows during the backfill of the <InternalLink version="v23.1" path="ui-jobs-page#jobs-table">**Jobs** table</InternalLink>.
* Fixed a bug where admin or root user privileges were erroneously required to use <InternalLink version="v23.1" path="show-system-grants">`SHOW SYSTEM GRANTS`</InternalLink>.
* Fixed a bug that prevented display of the column selector on the <InternalLink version="v23.1" path="ui-jobs-page">**Jobs** page</InternalLink>.
* Fixed a bug where an invalid split could crash and prevent restarts of nodes that hold a replica for the right-hand side.
* Fixed the `debug recover make-plan` command to ignore partial range metadata when the metadata can't be fully read, and instead rely solely on replica info from storage to produce the recovery plan.
* Fixed a metric bug that could cause volumes such as RAID logical volumes to be counted twice.
* Fixed a bug in `upstream etcd-io/raft` which could cause an unlimited amount of log to be loaded into memory. This could cause a node to crash with an out-of-memory (OOM) exception. The log scan now has a limited memory footprint.

### Contributors

This release includes 53 merged PRs by 30 authors.

## v23.1.3

Release Date: June 13, 2023

<Danger>
  A bug was discovered in a change included in v23.1.3 (this
  release). This bug can affect clusters upgrading to v23.1.3 from{" "}
  <InternalLink version="v23.1" path="releases/v22.2">v22.2.x</InternalLink>
  . In an affected cluster, jobs that were running during the upgrade could hang or fail to run after the upgrade is
  finalized. Users upgrading from v22.2.x are advised to use [v23.1.2](#v23-1-2) to upgrade, or to set the{" "}
  <InternalLink version="v23.1" path="upgrade-cockroach-version#step-3-decide-how-the-upgrade-will-be-finalized">`cluster.preserve_downgrade_option`</InternalLink>{" "}
  cluster setting to delay finalization of the upgrade until they can upgrade to v23.1.4.
</Danger>

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.linux-amd64.tgz">
          cockroach-v23.1.3.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.linux-amd64.tgz">
          cockroach-sql-v23.1.3.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.linux-arm64.tgz">
          cockroach-v23.1.3.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.linux-arm64.tgz">
          cockroach-sql-v23.1.3.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.darwin-10.9-amd64.tgz">
          cockroach-v23.1.3.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.3.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.darwin-11.0-arm64.tgz">
          cockroach-v23.1.3.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.3.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.windows-6.2-amd64.zip">
          cockroach-v23.1.3.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.3.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.3.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.3.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.3
```

### Security updates

* The new `server.client_cert_expiration_cache.capacity` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> allows you to configure the minimum time until a user's set of client certificates will expire. When `server.client_cert_expiration_cache.capacity` is set to a non-zero value, the new metric `security.certificate.expiration.client` tracks the number of client certificates that have expired.

### Enterprise edition changes

* Role-based audit logging is now an Enterprise feature. Only Enterprise users will be able to configure role-based audit logging using the `sql.log.user_audit` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>.

* The new `sql.log.user_audit` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> enables role-based auditing. When the setting is enabled, you can set an audit logging configuration using a table-like syntax. Each row in the configuration represents an *audit setting* in the configuration. An audit setting is comprised of the following columns: `USER/ROLE` and `STATEMENT_FILTER`:

  ```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  SET CLUSTER SETTING sql.log.user_audit = '
      test_role       ALL
      another_role    NONE
      ALL             NONE
  ';
  ```

* Introduced the `sql.log.user_audit.reduced_config.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. When enabled, this cluster setting computes a "reduced" <InternalLink version="v23.1" path="eventlog#role_based_audit_event">audit configuration</InternalLink> based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the **first SQL event emit by the user, after the setting is enabled**. When the cluster setting is enabled, CockroachDB can compute the audit configuration once at session start, which provides around a 5% increase in throughput. However, changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within a session. A new session should be started to reflect the configuration changes in auditing behavior.

### SQL language changes

* When the `sql.trace.stmt.enable_threshold` or `sql.trace.txn.enable_threshold` <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> is enabled, the logging output is now emitted on the <InternalLink version="v23.1" path="logging#sql_exec">`SQL_EXEC` channel</InternalLink>. Previously, this was emitted to the <InternalLink version="v23.1" path="logging#dev">`DEV` channel</InternalLink>.
* <InternalLink version="v23.1" path="show-grants">`SHOW GRANTS`</InternalLink>
  now lists privileges inherited by role membership. `SHOW GRANTS ON ROLE` statements no longer require any privileges
  and also lists implicit grantees.

### Operational changes

* The new <InternalLink version="v23.1" path="metrics">metric</InternalLink> `leases.liveness` shows the number of <InternalLink version="v23.1" path="configure-replication-zones#create-a-replication-zone-for-a-system-range">liveness range</InternalLink> leases per node to track the liveness range leaseholder.
* The new a gauge metric `sql.conns_waiting_to_hash` counts the number of connection attempts that are being limited due to the number of concurrent password hashing operations. This behavior has been present since v21.2 to <InternalLink version="v23.1" path="query-behavior-troubleshooting#high-client-cpu-load-connection-pool-exhaustion-or-increased-connection-latency-when-scram-password-based-authentication-is-enabled">prevent password hashing from increasing CPU load</InternalLink>. The metric is expected to be `0`, or close to `0`, in a healthy setup. If the metric is consistently high and connection latencies are high, then an operator should do one or more of the following:
  * Ensure applications using the cluster have properly configured <InternalLink version="v23.1" path="connection-pooling">connection pools</InternalLink>.
  * Add more vCPU or more nodes to the cluster.
  * Increase the password hashing concurrency using the `COCKROACH_MAX_PW_HASH_COMPUTE_CONCURRENCY` <InternalLink version="v23.1" path="cockroach-commands#environment-variables">environment variable</InternalLink>.

### DB Console changes

* Added merge queue failure and merge queue processing time metrics to the <InternalLink version="v23.1" path="ui-queues-dashboard#queue-processing-failures">**Queue Processing Failures**</InternalLink> and <InternalLink version="v23.1" path="ui-queues-dashboard#queue-processing-times">**Queue Processing Times**</InternalLink> graphs respectively.
* Removed the **Circuit Breaker Tripped Events** graph from the <InternalLink version="v23.1" path="ui-replication-dashboard">**Replication**</InternalLink> dashboard.
* Added **Completed time** to <InternalLink version="v23.1" path="ui-jobs-page">**Jobs**</InternalLink> and <InternalLink version="v23.1" path="ui-jobs-page#job-details">**Job details**</InternalLink> pages, and updated the time format on those pages to include seconds and milliseconds.
* Added a **Created SQL Connections** chart on the <InternalLink version="v23.1" path="ui-sql-dashboard">**SQL**</InternalLink> dashboard under **Metrics**.
* Added **Ranges in Catchup Mode** and **Rangefeed Catchup Scans Duration** charts to the <InternalLink version="v23.1" path="ui-cdc-dashboard">**Changefeeds**</InternalLink> dashboard.
* The sort setting on the <InternalLink version="v23.1" path="ui-hot-ranges-page">**Hot Ranges**</InternalLink> page is now persisted across page reloads and navigation.
* The <InternalLink version="v23.1" path="ui-databases-page">**Databases**</InternalLink> page now supports a large number of tables for a single database. If more than 40 tables are present in a database, the sort on the page will be disabled; however, it is still possible to filter by table name.
* On the **Statement Details** page, renamed the "Idle Latency" metric to "Client Wait Time" and separated it into its own chart.
* Added more search criteria options on the <InternalLink version="v23.1" path="ui-overview#sql-activity">**SQL Activity**</InternalLink> page:
  * For the **Top** dropdown: `1000`, `5000`, and `10000`.
  * For the **By** dropdown on the **Statements** tab: Last Execution Time, Max Latency, Max Memory, Min Latency, Network, P50 Latency, P90 Latency, Retries, and Rows Processed.
  * For the **By** dropdown on the **Transactions** tab: Max Memory, Network, Retries, and Rows Processed.
* Added a new link to the **Range Status** page on the <InternalLink version="v23.1" path="ui-replication-dashboard">**Replication**</InternalLink> dashboard that opens the **Enqueue Ranges** page with the node ID already completed.
* The DB Console will no longer show `DROP INDEX` recommendations for unique indexes.
* On the **Transactions** tab of the <InternalLink version="v23.1" path="ui-overview#sql-activity">**SQL Activity**</InternalLink> page, the **Status** will be `Idle` if the executing transaction is not currently executing a statement. Previously, the status would be `Executing`.
* Fixed the job that updates the `statement_activity` and `transaction_activity` tables on the <InternalLink version="v23.1" path="ui-overview#sql-activity">**SQL Activity**</InternalLink> page. The table size is now constrained when there are a lot of unique queries. This fix helps to prevent slowing down the **SQL Activity** page.

### Bug fixes

* Fixed a panic that could occur while a <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> statement is logged for telemetry purposes.
* Fixed a bug where disk space used by deleted and <InternalLink version="v23.1" path="architecture/storage-layer#garbage-collection">garbage collected</InternalLink> data would not be reclaimed in a timely manner, especially when a store has low-write workload.
* Fixed a problem that could lead to erroneously refused lease transfers, causing the following error message: `refusing to transfer lease to [...] because target may need a Raft snapshot: replica in StateProbe`.
* Fixed a bug where <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> in v23.1.0 and beta versions would incorrectly encode data with multiple <InternalLink version="v23.1" path="column-families">column families</InternalLink>. The data must be dropped and re-imported to be encoded correctly.
* Fixed a bug where running a <InternalLink version="v23.1" path="cockroach-commands#commands">`debug` command</InternalLink> that manipulates a store (e.g., `debug compact` ) without first terminating the node using the store, could result in corruption of the node's store if encryption-at-rest was enabled.
* Fixed a bug where <InternalLink version="v23.1" path="show-default-privileges">`SHOW DEFAULT PRIVILEGES`</InternalLink> did not work correctly if the database name or schema name being inspected had upper-case or special characters.
* Fixed a bug that could cause queries with <InternalLink version="v23.1" path="joins">joins</InternalLink> or <InternalLink version="v23.1" path="subqueries">subqueries</InternalLink> to omit rows where column values are `NULL` in very rare cases. This bug was present since v20.2.
* Fixed a bug that could cause goroutines to hang during <InternalLink version="v23.1" path="security-reference/scram-authentication">SCRAM authentication</InternalLink>.
* The `sys.cpu.combined.percent-normalized` metric now uses `GOMAXPROCS`, if lower than the number of CPU shares when calculating CPU utilization.
* The warning message about a missing `--advertise-addr` flag is no longer displayed when the flag is specified on server start.
* Fixed a rare bug where stale multi-column table <InternalLink version="v23.1" path="cost-based-optimizer">statistics</InternalLink> could cause table statistics forecasts to be inaccurate, leading to un-optimal query plans.
* Fixed a bug in v23.1.0 where the `node_id` field would be omitted from logs. The `node_id` value has now been restored to the logs.
* Fixed a bug where the collection of `KV bytes read` and `KV gRPC calls` execution statistics during <InternalLink version="v23.1" path="explain-analyze">`EXPLAIN ANALYZE`</InternalLink> could be incorrect (it would remain at zero) in some cases. The bug was introduced in the v23.1.0 release.
* Fixed an incorrect results bug in v22.2.10 and v23.1.2 and above when the `optimizer_use_improved_computed_column_filters_derivation` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> is `true`. Predicates on <InternalLink version="v23.1" path="computed-columns">computed columns</InternalLink> are derived when an ORed predicate on a column in the computed column expression is present.
* The <InternalLink version="v23.1" path="ui-key-visualizer">`keyvisualizer` job</InternalLink> no longer panics if an error is encountered while cleaning up stale samples. Instead, if the job encounters an error, the job will try again later.
* Fixed a bug where it was possible for a SQL row to be split across two ranges. When this occurred, SQL queries could return unexpected errors. The real keys are now inspected rather than just request keys to determine load-based split points.
* Fixed a bug which could cause a panic when a <InternalLink version="v23.1" path="create-function">`CREATE FUNCTION`</InternalLink> statement used the <InternalLink version="v23.1" path="functions-and-operators">`setval()` built-in function</InternalLink>.
* Fixed a rare race condition that could allow large <InternalLink version="v23.1" path="restore">restore</InternalLink> jobs to fail with an `unable to find store` error.
* Fixed a bug where CockroachDB would not ignore the messages that it should, if there was an error while in the <InternalLink version="v23.1" path="postgresql-compatibility">PostgreSQL extended protocol</InternalLink>.
* Fixed a bug in which some <InternalLink version="v23.1" path="use-cloud-storage">Google Cloud Platform</InternalLink> -related errors would be returned with an uninformative error.
* Fixed a bug where in rare cases a panic could occur during shutdown in relation to the SQL activity computation. This bug was introduced in v23.1.0.
* The backfill of `system.job_info` upgrade migration that runs during upgrades from v22.2 now processes rows in batches to avoid cases where it could become stuck due to <InternalLink version="v23.1" path="performance-best-practices-overview#transaction-contention">contention</InternalLink> and transaction retries.
* Fixes a bug in which <InternalLink version="v23.1" path="show-backup">`SHOW BACKUP`</InternalLink> would fail to show a <InternalLink version="v23.1" path="take-and-restore-locality-aware-backups">locality-aware backup</InternalLink> that contained <InternalLink version="v23.1" path="take-full-and-incremental-backups">incremental backups</InternalLink>.

### Performance improvements

* If <InternalLink version="v23.1" path="transactions#limit-the-number-of-rows-written-or-read-in-a-transaction">`transaction_rows_read_err`</InternalLink> is set to a non-zero value, CockroachDB now ensures that any single scan never reads more than `transaction_rows_read_err` + 1 rows. This prevents transactions that would error due to the `transaction_rows_read_err` setting from causing a large performance overhead due to large scans.
* Improved the efficiency of the an internal job that during upgrades deleted descriptors of dropped functions. Previously, the job would check every single ID until the max descriptor ID, which was particularly inefficient when this was large. Now, the job only queries the upper bound ID of each batch.

### Contributors

This release includes 111 merged PRs by 41 authors.

## v23.1.2

Release Date: May 30, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.linux-amd64.tgz">
          cockroach-v23.1.2.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.linux-amd64.tgz">
          cockroach-sql-v23.1.2.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.linux-arm64.tgz">
          cockroach-v23.1.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.linux-arm64.tgz">
          cockroach-sql-v23.1.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.darwin-10.9-amd64.tgz">
          cockroach-v23.1.2.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.2.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.darwin-11.0-arm64.tgz">
          cockroach-v23.1.2.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.2.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.windows-6.2-amd64.zip">
          cockroach-v23.1.2.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.2.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.2.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.2.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.2
```

### Backward-incompatible changes

* Schema names in the <InternalLink version="v23.1" path="sql-name-resolution#search-path">`search_path`</InternalLink> session variable now respect case and must be delimited with double quotation marks. Previously, if a `search_path` was specified in the connection string parameters, it would be treated case insensitive by default.

\#101493

### General changes

* Queries with invalid syntax are now logged at <InternalLink version="v23.1" path="logging#info">the `INFO` level</InternalLink> in the `SQL_EXEC` log channel. Previously, these were logged at the `ERROR` level.

### Enterprise edition changes

* <InternalLink version="v23.1" path="cdc-queries">CDC queries</InternalLink>
  now support wrapped envelope with diff ( `envelope='wrapped', diff` ).

* <InternalLink version="v23.1" path="stream-a-changefeed-to-a-confluent-cloud-kafka-cluster">Changefeeds using the `WITH confluent_schema_registry` option</InternalLink>
  will make fewer duplicate schema registrations.

* Added logic to set the cluster's multi-region system database's <InternalLink version="v23.1" path="multiregion-overview#survival-goals">survival goal</InternalLink> to the max non-system database's survival whenever an `ALTER DATABASE...SURVIVE...FAILURE` is issued.

* <InternalLink version="v23.1" path="sso-sql">Cluster SSO using JSON web tokens</InternalLink>
  (JWT) can now read SQL usernames from any JWT claims instead of requiring the subject claim to be used. The claim can
  be controlled by the `server.jwt_authentication.claim`
  <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>
  with an empty string or "sub" equivalent to the previous behavior.

### SQL language changes

* Added a new <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> `unbounded_parallel_scans`, which controls whether scans will be parallelized across <InternalLink version="v23.1" path="architecture/overview">ranges</InternalLink> in more cases. Note that using this feature can lead to increased likelihood of <InternalLink version="v23.1" path="cluster-setup-troubleshooting#out-of-memory-oom-crash">out-of-memory errors (OOMs)</InternalLink>, so it should be used with care (namely when you expect that the scan should read a "reasonable" number of rows - probably less than 10k). Also note that <InternalLink version="v23.1" path="limit-offset">queries with `LIMIT`s</InternalLink> aren't affected by this variable; cross-range parallelism of scans continue to be disabled for such queries.
* Statements of type <InternalLink version="v23.1" path="set-vars">`SET...`</InternalLink> are not longer displayed on the <InternalLink version="v23.1" path="ui-insights-page">Insights page</InternalLink>.
* Fixed <InternalLink version="v23.1" path="crdb-internal#transaction_contention_events">`crdb_internal.transaction_contention_events`</InternalLink>, so it generates even if an error occurs when getting the names.
* Added a new SQL activity updater job which updates the `system.transaction_activity` and `system.statement_activity` tables based on the <InternalLink version="v23.1" path="ui-statements-page#statement-statistics">statistics</InternalLink> tables.
* Added two views to the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal catalog`</InternalLink>: `crdb_internal.statement_activity`, which surfaces data in the `persisted system.statement_activity` table and `crdb_internal.transaction_activity`, which surfaces the `system.transaction_activity` table.
* Tables with <InternalLink version="v23.1" path="row-level-ttl">Row-level TTL</InternalLink> settings can now have outbound <InternalLink version="v23.1" path="foreign-key">foreign keys</InternalLink>.
* Span statistics are now unavailable on mixed-version clusters.
* Introduced the `to_char(date, format)` <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink>, which converts a given date to a string using the given format string.
* Renamed an existing metric `changefeed.table_metadata_nanos` to `changefeed.schemafeed.table_metadata_nanos` and introduced a new metric `changefeed.schemafeed.table_history_scans`, which records the number of table history scans the <InternalLink version="v23.1" path="changefeed-examples">schema feed</InternalLink> performs.
* Changed the <InternalLink version="v23.1" path="oid">`OID`</InternalLink> generation for `pg_catalog`. For example `column`, `index` and `constraint` `OID` 's will have different values. `Relation`, `type` and `function` `OID` 's remain unchanged.
* Added a new <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> `optimizer_use_improved_computed_column_filters_derivation`, which defaults to `FALSE`. When `TRUE`, the optimizer will derive filters on computed columns in more cases.
* `Crdb_internal.transaction_contention_events`, `crdb_internal.node_contention_events`, and `crdb_internal.cluster_locks` will now redact keys provided the user has <InternalLink version="v23.1" path="security-reference/authorization">`VIEWACTIVITYREDACTED`</InternalLink>. `Crdb_internal.node_contention_events` can only be viewed if the user has any of `admin`, `VIEWACTIVITY` or `VIEWACTIVITYREDACTED`.

### Operational changes

* Added the `rebalancing.replicas.cpunanospersecond` histogram <InternalLink version="v23.1" path="metrics">metric</InternalLink>, which provides insight into the distribution of replica CPU usage within a store.
* Added the `rebalancing.replicas.queriespersecond` histogram <InternalLink version="v23.1" path="metrics">metric</InternalLink>, which provides insight into the distribution of queries per replica within a store.
* The amount of <InternalLink version="v23.1" path="architecture/replication-layer">replication</InternalLink> traffic in flight from a single <InternalLink version="v23.1" path="architecture/reads-and-writes-overview">Raft leader</InternalLink> to a follower has been reduced from 256 MB to 32 MB. This reduces the chance of running out-of-memory during bulk write operations. This can be controlled via the environment variable `COCKROACH_RAFT_MAX_INFLIGHT_BYTES`.
* Added the <InternalLink version="v23.1" path="metrics">metric</InternalLink> `leases.requests.latency`, which records a histogram of lease request latencies.
* When local corruption of data is encountered by a background job in the <InternalLink version="v23.1" path="architecture/storage-layer">storage engine</InternalLink>, a node will now exit immediately.
* When the <InternalLink version="v23.1" path="cockroach-start#networking">`--experimental-dns-srv`</InternalLink> flag is enabled, the `crdb` node will always attempt to query SRV records of an address when dialing remote targets, and fall back to use the address verbatim if the SRV query fails. Previously, SRV queries were only attempted once when a node starts.
* The default Raft scheduler concurrency, controlled by `COCKROACH_SCHEDULER_CONCURRENCY` and defaulting to 8 per CPU core capped at 96, is now divided evenly across stores instead of applying individually per store. This avoids excessive Go scheduler pressure and memory usage on nodes with many stores. The common case of 1 store per node is not affected.
* Workload generators now export Go runtime metrics via <InternalLink version="v23.1" path="monitor-cockroachdb-with-prometheus">Prometheus</InternalLink> endpoint.
* <InternalLink version="v23.1" path="multiregion-overview">Multi-region</InternalLink>
  Serverless databases that are created without a primary region will now inherit regions from the Serverless cluster's
  regions.

### Command-line changes

* The <InternalLink version="v23.1" path="cockroach-debug-zip">`cockroach debug zip`</InternalLink> command now accepts an `--include-range-info` flag, which determines whether CockroachDB retrieves individual `nodes/*/ranges/*.json` files, which was previously done by default. For large clusters, this can dramatically reduce the size of the generated artifacts. This flag defaults to `FALSE`.

* <InternalLink version="v23.1" path="cockroach-workload">Workload</InternalLink>
  now jitters the teardown of connections to prevent a [thundering
  herd](https://wikipedia.org/wiki/Thundering_herd_problem) of queries impacting P99 latency results.

* Workload utility now has flags to tune the <InternalLink version="v23.1" path="connection-pooling">connection pool</InternalLink> used for testing. See `--conn-healthcheck-period`, `--min-conns`, and `--max-conn-*` flags for details.

* Workload now supports every [PostgreSQL query mode](https://github.com/jackc/pgx/blob/fa5fbed497bc75acee05c1667a8760ce0d634cba/conn.go#L167-L182) available via the underlying `pgx` driver.

* The `\connect` client-side command for the SQL shell (included in `cockroach sql`, `cockroach demo`, `cockroach-sql` ) now recognizes the option `autocerts` as its last argument. When provided, `\c` will now try to discover a <InternalLink version="v23.1" path="security-reference/transport-layer-security">Transport Layer Security (TLS)</InternalLink> client certificate and key in the same directory(ies) as used by the previous connection URL. This feature makes it easier to switch usernames when TLS client/key files are available for both the previous and new username.

### DB Console changes

* The `Application Name` column is now shown by default in the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">Fingerprints Overview</InternalLink> pages. Statements and transactions fingerprints will be displayed per application on the Overview pages rather than grouped into a single fingerprint ID.
* When going from the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">Fingerprints Overview</InternalLink> pages or the <InternalLink version="v23.1" path="ui-insights-page">Insight Details</InternalLink> pages to the Fingerprint Details page, the Details page will fetch data for the statement with the provided application name. For Overview pages, this is the application name of the selected row. For Insight details, this is the application of the execution that generated the insight.
* Updated the <InternalLink version="v23.1" path="ui-network-latency-page">Network Latency</InternalLink> side nav name and Network Diagnostics page title to Network. Updated the <InternalLink version="v23.1" path="ui-debug-pages">Advanced Debugging</InternalLink> page title to Advanced Debug.
* Added an option to select the trace rate for <InternalLink version="v23.1" path="ui-statements-page#diagnostics">Statement Diagnostics</InternalLink> collection.
* Added a time scale selector to the <InternalLink version="v23.1" path="ui-statements-page#diagnostics">Statement Diagnostics</InternalLink> page, making it possible to see bundles only from the selected period.
* Added draining node as its own value on the <InternalLink version="v23.1" path="ui-overview">DB Console Overview</InternalLink> page, instead of counting it as a dead node.
* Added the ability for users to view timestamps in <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> in their preferred timezone via the cluster setting `ui.display_timezone`. Previously, only the timezones Coordinated Universal Time and America/New\_York were supported.
* An alert on <InternalLink version="v23.1" path="ui-overview">DB Console Overview</InternalLink> page is shown when the cluster setting `cluster.preserve_downgrade_option` is set, and no longer waits 48 hours to show.
* Added <InternalLink version="v23.1" path="cockroachcloud/insights-page">Transaction Insights</InternalLink> for Serverless.
* Added `_status/load` to the list of Raw Status Endpoints on the <InternalLink version="v23.1" path="ui-debug-pages">Advanced Debug</InternalLink> page.
* If a page crashed, a force refresh is no longer required to be able to see the other pages on <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>.
* The filter on the <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity</InternalLink> page is now working properly. Fixed the type on the JSON object from `stmtTyp` to `stmtType`.
* Added missing information on the <InternalLink version="v23.1" path="ui-databases-page#index-recommendations">Index Details</InternalLink> page about latency information of most used fingerprints.

### Bug fixes

* Fixed the `sql.mem.distsql.current` <InternalLink version="v23.1" path="metrics">metric</InternalLink> so it would no longer double count the memory usage of remote DistSQL flows.

* Fixed a rare bug introduced prior to v22.1 where distributed plans could cause the graceful drain of a node to become stuck retrying forever during <InternalLink version="v23.1" path="node-shutdown">node shutdown</InternalLink>. This bug led to errors like `drain details: distSQL execution flows:`, together with a non-zero number of flows that does not reduce over a long period of time.

* Fixed a bug that caused a <InternalLink version="v23.1" path="restore">restore</InternalLink> to fail occasionally due to incorrect schema ID resolution when restoring a backup with <InternalLink version="v23.1" path="schema-design-schema">user-defined schemas</InternalLink>.

* Fixed a bug that caused suboptimal query plans to be generated by <InternalLink version="v23.1" path="cost-based-optimizer">the optimizer</InternalLink> when the table being queried contained infinite values, e.g., `'+Infinity'::DECIMAL`. This bug was present since v22.1 (and likely earlier). It could also be triggered in rare cases when <InternalLink version="v23.1" path="show-statistics">table statistics</InternalLink> forecasts created a forecasted bucket with an infinite value.

* Fixed a rare internal error in <InternalLink version="v23.1" path="cost-based-optimizer">the optimizer</InternalLink> that existed since before v22.1, which could occur while enforcing orderings between SQL operators.

* Fixed a bug so that `crdb_internal.deserialize_session` internal function works properly with prepared statements that have more param type hints than params.

* Fixed a bug that caused internal errors when executing <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink> with empty bodies. This bug was only present in alpha pre-release versions of 23.1.

* The `search_path` <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> now supports schema names that have commas in them. Also, fixed a bug in parsing a `search_path` with a quote in it when specified in the <InternalLink version="v23.1" path="connection-parameters">connection string</InternalLink>.

* Fixed a bug that has existed since <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink> were introduced that could cause a function call to resolve to the wrong function after changes to the <InternalLink version="v23.1" path="sql-name-resolution#current-schema">schema `search_path`</InternalLink>.

* Fixed an internal error that could occur when the `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> is on and the input to the lookup join is a `SELECT` of scalar expressions (e.g., `1+1` ). Also, <InternalLink version="v23.1" path="subqueries">subqueries</InternalLink> with no home region now error out with `enforce_home_region` set.

* Previously, CockroachDB alpha and beta versions of 23.1 would panic on <InternalLink version="v23.1" path="cockroach-start">`cockroach start`</InternalLink> command when the `GOMEMLIMIT` environment variable was set and the `--max-go-memory` flag wasn't specified. This is now fixed.

* Fixed a bug whereby some tables' physical disk space could not be calculated by <InternalLink version="v23.1" path="architecture/storage-layer">the storage engine</InternalLink>.

* Fixed a bug that caused errors in test builds and potentially incorrect results in release builds when invoking a <InternalLink version="v23.1" path="user-defined-functions">user-defined function</InternalLink> with a subquery argument. This bug was only present in v23.1 alpha versions.

* Point <InternalLink version="v23.1" path="insert">inserts</InternalLink> and <InternalLink version="v23.1" path="update">updates</InternalLink> that write to a remote region of a table created with the <InternalLink version="v23.1" path="create-table#create-a-table-with-a-regional-by-row-locality-using-a-custom-region-column">`REGIONAL BY ROW AS`</InternalLink> clause will now error out.

* Fixed a bug in the <InternalLink version="v23.1" path="functions-and-operators">built-in functions</InternalLink> `pg_get_indexdef` and `col_description` that could cause the functions to return errors if the user created tables named `pg_indexes` or `pg_attribute`. Or, if the user created a schema named `system` with a table named `comments`. This bug was only present in pre-release versions of v23.1.

* The descriptions of `rebalancing.readbytespersecond` and `rebalancing.writebytespersecond` metrics now correctly reference bytes read and bytes written, respectively.

* Fixed a bug to ensure that the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">list of fingerprints</InternalLink> used per index is shown even when there is a max-size limit on the SQL API.

* Fixed a bug where, when CockroachDB failed to retrieve <InternalLink version="v23.1" path="performance-best-practices-overview#transaction-contention">contention information</InternalLink>, the full <InternalLink version="v23.1" path="ui-insights-page">Insights</InternalLink> page would return an error. Now, the Insights page will load even when there is an issue with decoding contention information.

* Fixed a bug where a <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> operation with `skip_localities_check` could fail with errors if regions were missing on a cluster.

* Fixed a bug in <InternalLink version="v23.1" path="cost-based-optimizer">the optimizer</InternalLink> that could cause an internal error in rare cases for a query with <InternalLink version="v23.1" path="joins#full-outer-joins">outer joins</InternalLink> that could be simplified to non-outer joins and at least one semi-join. This bug was present since before v22.1.

* Fixed a bug where CockroachDB previously incorrectly evaluated <InternalLink version="v23.1" path="export">`EXPORT`</InternalLink> statements that had projections or rendering on top of the `EXPORT` (e.g. the <InternalLink version="v23.1" path="common-table-expressions">common table expression</InternalLink> `WITH cte AS (EXPORT INTO CSV 'nodelocal://1/export1/' FROM SELECT * FROM t) SELECT filename FROM cte;` ). Such statements would result in panics or incorrect query results. Note that the exported data wasn't affected, only the presentation of the query result. This bug had been present since v22.1 or earlier.

* Fixed a bug in <InternalLink version="v23.1" path="cost-based-optimizer">the optimizer</InternalLink> introduced in v22.2.0 that could cause queries containing a <InternalLink version="v23.1" path="subqueries">subquery</InternalLink> with a lateral join, in which the right side of the lateral join was an <InternalLink version="v23.1" path="table-expressions#aliased-table-expressions">aliased data source</InternalLink>, to return an internal error in some cases. For example, it could cause an error if the subquery was provided as an argument to an <InternalLink version="v23.1" path="functions-and-operators#aggregate-functions">aggregate function</InternalLink>.

* Fixed handling of expressions in `IN` clauses such as `(c1, c2) IN (SELECT c3+1, c4+1 FROM...)`. Previously, such query expressions would error out during type checking.

* Fixed a potential bug whereby a failed or cancelled <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink> could leave some of the imported rows behind after it was cancelled, in the rare event that the writing processes were slow enough to continue writing after the cleanup process had started.

* Fixed a bug that could cause incorrect results for queries invoking `STRICT` <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink>. This bug was only present in pre-release versions of 23.1.

* Fixed a bug where CockroachDB's <InternalLink version="v23.1" path="postgresql-compatibility">pgwire</InternalLink> implementation would incorrectly parse arrays if they were sent as placeholder arguments to a prepared statement, and the argument had spaces in between the array elements.

* Fixed a very rare bug that could cause keys to be unexpectedly deleted locally within a <InternalLink version="v23.1" path="cockroach-start">store</InternalLink> by <InternalLink version="v23.1" path="architecture/replication-layer">replica rebalancing</InternalLink> during a write heavy workload.

* Fixed a bug in the behavior of the `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> that may have allowed a hash join to be favored over a lookup join, or failed to error out remote accesses done by uniqueness checks for mutations on <InternalLink version="v23.1" path="regional-tables">`REGIONAL BY ROW` tables</InternalLink>. Also, fixed static erroring of some locality-optimized lookup joins to now be handled dynamically during query execution.

* Fixed a bug introduced in testing releases of v23.1 where a node could crash when evaluating a <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> command when the schema had `INT2` or `INT4` type.

* Fixed a bug where a <InternalLink version="v23.1" path="backup-and-restore-overview">backup</InternalLink> with a key's revision history split across multiple <InternalLink version="v23.1" path="architecture/storage-layer#ssts">SST files</InternalLink> may not have correctly restored the proper revision of the key.

* Fixed a bug in testing releases of v23.1 where a user could be prevented from logging in or viewing or changing <InternalLink version="v23.1" path="grant">`GRANT`s</InternalLink> if the cluster had a long enough period of inactivity.

* Previously, CockroachDB could encounter a "command is too large" error when evaluating <InternalLink version="v23.1" path="upsert">`UPSERT`</InternalLink> statements such that the new values combined exceeded the size of the `kv.raft.command.max_size` cluster setting. This bug had been present since before v21.1 and initially all write operations ( <InternalLink version="v23.1" path="insert">`INSERT`</InternalLink>, <InternalLink version="v23.1" path="update">`UPDATE`</InternalLink>, <InternalLink version="v23.1" path="delete">`DELETE`</InternalLink> ) were affected; however, in v21.2 those three were fixed, but `UPSERT` was forgotten about. This is now fixed.

* Fixed a bug introduced in v22.1.19, v22.2.8, and pre-release versions of 23.1 that could cause queries to return spurious insufficient <InternalLink version="v23.1" path="security-reference/authorization">privilege</InternalLink> errors. For the bug to occur, two databases would need to have duplicate tables each with a <InternalLink version="v23.1" path="foreign-key">foreign key</InternalLink> reference to another table. The error would then occur if the same SQL string was executed against both databases concurrently by users that have <InternalLink version="v23.1" path="security-reference/authorization">privileges</InternalLink> over only one of the tables.

* Fixed a bug where <InternalLink version="v23.1" path="alter-table#rename-column">`RENAME COLUMN`</InternalLink> was incorrectly allowed and would modify these columns node-wide.

* Fixed a bug where the internal `node` pseudo-role was not viewable through introspection of `pg_catalog` tables.

* Fixed a bug where <InternalLink version="v23.1" path="copy">`COPY... TO`</InternalLink> statements would always fail when used in a prepared statement. CockroachDB now matches the pgwire handling of prepared `COPY... TO` statements.

* Fixed a bug where the <InternalLink version="v23.1" path="alter-default-privileges">`ALTER DEFAULT PRIVILEGES... GRANT USAGE ON SEQUENCES`</InternalLink> statement would fail because the sequence object was mapped to an incorrect internal privilege object.

* Fixed a minor bug that caused an internal error for some queries with nested <InternalLink version="v23.1" path="subqueries">subqueries</InternalLink> instead of the more appropriate "could not decorrelate subquery" error. This bug was only present in pre-release alpha and beta versions of 23.1.

* Fixed a bug that allowed values to be inserted into an <InternalLink version="v23.1" path="array">`ARRAY`</InternalLink> -type column that did not conform to the inner-type of the array. For example, it was possible to insert `ARRAY['foo']` into a column of type `CHAR(1)[]`. This could cause incorrect results when querying the table. The insert now errors, which is expected. This bug was present since v21.1.

* Fixed an issue where running `SHOW HISTOGRAM` to see the histogram for an <InternalLink version="v23.1" path="enum">`ENUM`</InternalLink> -type column could cause a panic and crash the cockroach process. This issue has existed since v20.2.0.

* Fixed the behavior of <InternalLink version="v23.1" path="user-defined-functions">user-defined functions (UDFs)</InternalLink> to return its results as a row instead of a tuple when UDFs are called in a query as a data source. This is now compatible with PostgreSQL behavior.

* Fixed a bug in <InternalLink version="v23.1" path="architecture/transaction-layer#closed-timestamps">closed timestamp</InternalLink> updates within its side-transport. Previously, during asymmetric partitions, a node that transfers a lease away, and misses a liveness heartbeat, could then erroneously update the closed timestamp during the stasis period of its liveness. This could lead to closed timestamp invariant violation, and node crashes; in extreme cases, this could lead to inconsistencies in read-only queries.

* Fixed a bug where <InternalLink version="v23.1" path="row-level-ttl">Row-level TTL</InternalLink> jobs would incorrectly process a table that spanned multiple ranges in rare cases. This bug had been present since v22.2.0. You were affected by this bug if you saw the error message `"error decoding EncDatum of...: did not find terminator... in buffer..."`.

* The `Retry.Max` field of the <InternalLink version="v23.1" path="changefeed-sinks#webhook-sink">`webhook_sink_config`</InternalLink> option for changefeeds was not correctly defined in the docs. The existing docs mention that it is "The maximum amount of time the sink will retry a single HTTP request to send a batch", but this is incorrect. It actually represents the maximum number of retries which will be attempted when sending a batch in an HTTP request fails. This is now fixed to correctly capture its behavior. Also, fixed a bug where the retry time would wait for 4 seconds, regardless of `Retry.Max`. With this change, the new maximum retry time is 30 seconds. The initial backoff will keep doubling every time a retry occurs until the maximum of 30 seconds is reached. E.g. If `Retry.Max = 4` and the initial backoff is 10 seconds, at most 4 retries will be performed with the backoff times 10, 20, 30, 30 seconds respectively.

* Stopped using a `NULL` value for `pg_constraint.conparentid`. Now the value is hard-coded to `0`, since CockroachDB does not support constraints on <InternalLink version="v23.1" path="partitioning">partitions</InternalLink>.

* Fixed a bug where <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> in v23.1.0 and beta versions would incorrectly encode data with multiple column families. The data must be dropped and re-imported to be encoded correctly.

* Optimized over-head of <InternalLink version="v23.1" path="pg-catalog">`pg_catalog.pg_description`</InternalLink> and <InternalLink version="v23.1" path="pg-catalog">`pg_catalog.pg_shdescription`</InternalLink>, which can lead to performance regression relative to v22.2

* Timeseries <InternalLink version="v23.1" path="metrics">metric</InternalLink> counts will now show cumulative counts for a histogram rather than a windowed count. A `-sum` timeseries is also exported to keep track of the cumulative sum of all samples in the histogram.

* Fixed a bug where CockroachDB could produce incorrect results when evaluating queries with <InternalLink version="v23.1" path="order-by">`ORDER BY`</InternalLink> clause in rare circumstances. In particular, some rows could be duplicated if all of the following conditions were met:
  1. The query had a `LIMIT` clause.
  2. The `SORT` operation had to spill to disk (meaning that `LIMIT` number of rows used up non-trivial amounts of memory, e.g. the rows were "wide").
  3. The `ORDER BY` clause contained multiple columns **and** the ordering on the prefix of those columns was already provided by the index.

     The bug has been present since at least v22.1.

* Fixed a bug where CockroachDB could previously encounter a nil pointer crash when populating data for <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity</InternalLink> page in some rare cases. The bug was present in v22.2.9 and v23.1.1 releases.

* Fixed calls to undefined objects.

* Fixed a bug where `0` with `exponents < -6` would display as `0E(exponent)` instead of printing all `0`s, e.g. `0E-7` should be `0.0000000`.

* Fixed a bug that could prevent <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> from working if the backup had a refresh materialized view mutation in it.

* In earlier patch releases of v23.1, it was possible for <InternalLink version="v23.1" path="backup-and-restore-overview">backups</InternalLink> to be excessively slow, slower than they were in earlier releases. It was also possible for them to fail with errors of the following form: `operation "Export Request for span..." timed out after 5m0.001s`. At least one of the reasons for this behavior is now addressed. This problem also affected v22.2 clusters if using a hidden-by-default, default-as-disabled `admission.elastic_cpu.enabled` cluster setting.

* Fixed a crash/panic that could occur if placeholder arguments were used with the `with_min_timestamp(to_timestamp($1))` <InternalLink version="v23.1" path="functions-and-operators">functions</InternalLink>.

* Fixed a panic that could occur if a <InternalLink version="v23.1" path="copy">`COPY TO`</InternalLink> statement had a subquery that was logged with redaction markers.

* Fixed a bug where <InternalLink version="v23.1" path="alter-database#set-primary-region">`SET PRIMARY REGION`</InternalLink> and <InternalLink version="v23.1" path="alter-database#set-secondary-region">`SET SECONDARY REGION`</InternalLink> did not validate transactionally, which could prevent cleaning up removed regions after a <InternalLink version="v23.1" path="restore">restore</InternalLink>.

* <InternalLink version="v23.1" path="drop-role">`DROP ROLE`</InternalLink>
  now correctly returns a 2BP01 error when the given role has been granted privileges on a schema.

* Fixed a bug where, under high CPU load, HTTP requests to certain API endpoints such as the `health` endpoint would start failing and then never succeed again until the node was restarted. This bug was introduced in v23.1.

* When the option `WITH TABLES` or `WITH INDEXES` is passed to <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink>, the per-object start/end key columns now properly refers to the part of the object included inside the range identified by the current row. Previously, they could incorrectly point to keys outside of the current range's boundaries. This bug had been introduced in v23.1.

* Fixed a bug in `VALUES` clauses containing a call to a record-returning <InternalLink version="v23.1" path="user-defined-functions">UDF</InternalLink> that could manifest as an internal error in some queries.

* Fixed a bug with choosing optimal plan where <InternalLink version="v23.1" path="savepoint#savepoints-and-prepared-statements">prepared statements</InternalLink> using placeholders in recursive CTEs sometimes did not re-optimize correctly after plugging in the parameters.

* Fixed a bug where `kv` was read when fetching a qualified name of a leased <InternalLink version="v23.1" path="user-defined-functions">UDF</InternalLink>.

### Performance improvements

* Added an opt-in pacing mechanism to <InternalLink version="v23.1" path="create-and-configure-changefeeds#enable-rangefeeds">rangefeed</InternalLink> closed timestamp notifications. Pacing is controlled by the `kv.rangefeed.closed_timestamp_smear_interval` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>, which defaults to `kv.rangefeed.closed_timestamp_refresh_interval`. Lowering the smear interval makes the rangefeed closed timestamp delivery less spikey, which ultimately reduces its impact on foreground SQL latencies.
* Queries that have <InternalLink version="v23.1" path="subqueries">subqueries</InternalLink> in equality expressions are now more efficiently planned by <InternalLink version="v23.1" path="cost-based-optimizer">the optimizer</InternalLink> when `optimizer_hoist_uncorrelated_equality_subqueries` is set to `true`.
* <InternalLink version="v23.1" path="ui-sql-dashboard">SQL Activity</InternalLink>
  dashboards now default to using a table optimized with the top data for the most used cases. Else, they use persisted
  data if available, and in-memory data otherwise.
* Statistics on the `system.jobs` table are now automatically collected, which will enable <InternalLink version="v23.1" path="cost-based-optimizer">the optimizer</InternalLink> to produce better query plans for internal queries that access the `system.jobs` table. This may result in better performance of the system.
* Improved <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> to decrease the commit-to-emit latency (i.e. The difference between an event's MVCC timestamp and the time it is ready to emit to a downstream sink). Previously, it is determined by a non-documented cluster setting ( `changefeed.experimental_poll_interval` ) which defaults to `1s`. To enable this performance improvement, users should "lock" the watched table with <InternalLink version="v23.1" path="alter-table#set-storage-parameter">`ALTER TABLE <tbl> SET (schema_locked =t);`</InternalLink>, which would disallow schema changes on `<tbl>`. If a schema change statement is attempted on a locked table, CockroachDB will reject it and return an error. The user could lock the table either before creating a changefeed or, when a changefeed is running, CockroachDB will be able to detect that and enable this performance improvement automatically. If the user is running a changefeed on a locked table but wishes to perform schema changes to the table, they need to explicitly unlock the table first with <InternalLink version="v23.1" path="alter-table#reset-storage-parameter">`ALTER TABLE <tbl> RESET schema_locked`</InternalLink>. After the schema change completes, the user can lock the table again to re-gain this performance improvement. The changefeed job itself does not need to be modified in any way by the user (e.g. the user does not need to pause the job when locking/unlocking a table). This change is a "pure" optimization in that if the table is not locked, everything should still work the way it used to.
* Improved performance when joining with the `pg_description` table.
* Added concurrency to speed up the phase of the <InternalLink version="v23.1" path="restore">restore</InternalLink> that ingests backed up table statisitcs.
* Added support for constrained scans using computed columns which are part of an <InternalLink version="v23.1" path="indexes">index</InternalLink> when there is an `IN` list or `OR` 'ed predicate on the columns that appear in the computed column expression.
* Added two new statistics which are useful for tracking the efficiency of <InternalLink version="v23.1" path="architecture/replication-layer#snapshots">snapshot transfers</InternalLink>. Some snapshots will always fail due to system level "races", but the goal is to keep it as low as possible.
  * `range.snapshots.recv-failed` - The number of snapshots sent attempts that are initiated but not accepted by the recipient.
  * `range.snapshots.recv-unusable` - The number of snapshots that were fully transmitted but not used.

### Build changes

* Updated the reported `Build Tag` for nightly (non-release) builds.

### Contributors

This release includes 329 merged PRs by 70 authors. We would like to thank the following contributors from the CockroachDB community:

* Eric.Yang

## v23.1.1

Release Date: May 16, 2023

### Downloads

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.linux-amd64.tgz">
          cockroach-v23.1.1.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.linux-amd64.tgz">
          cockroach-sql-v23.1.1.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.linux-arm64.tgz">
          cockroach-v23.1.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.linux-arm64.tgz">
          cockroach-sql-v23.1.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.darwin-10.9-amd64.tgz">
          cockroach-v23.1.1.darwin-10.9-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.1.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.darwin-11.0-arm64.tgz">
          cockroach-v23.1.1.darwin-11.0-arm64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.1.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.windows-6.2-amd64.zip">
          cockroach-v23.1.1.windows-6.2-amd64.zip
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.1.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.1.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.1.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach:v23.1.1
```

### Bug fixes

* In CockroachDB v23.1.0 and its testing releases, executing <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> to a target table that has multiple column families could corrupt the table. If data was copied into a table with existing rows, the data in those rows may be irrecoverable. The data would need to be dropped and re- <InternalLink version="v23.1" path="copy">copied</InternalLink> to be encoded correctly. This has now been fixed. See <InternalLink path="a103220">Technical Advisory 103220</InternalLink> for more information.

### Contributors

This release includes 2 merged PRs by 2 authors.

## v23.1.0

Release Date: May 15, 2023

With the release of CockroachDB v23.1, we've added new capabilities in CockroachDB to help you migrate, build, and operate more efficiently. Check out a [summary of the most significant user-facing changes](#v23-1-0-feature-highlights) and then <InternalLink version="v23.1" path="upgrade-cockroach-version">upgrade to CockroachDB v23.1</InternalLink>.

### Downloads

<Danger>
  This patch release has been withdrawn due to <InternalLink path="a103220">this technical advisory</InternalLink>. We've removed the links to the downloads and Docker image.All the changes listed as part of this release will be in the next release. Do not upgrade to this release.
</Danger>

### Feature highlights

This section summarizes the most significant user-facing changes in v23.1.0. For a complete list of features and changes, including bug fixes and performance improvements, see the release notes for previous testing releases. You can also search for <SearchLink term="query=new+in+v23.1">what's new in v23.1 in our docs</SearchLink>.

<Note>
  The features highlighted below are freely available in CockroachDB self-hosted and do not require an{" "}
  <InternalLink version="v23.1" path="cockroach-demo">enterprise license</InternalLink>{" "}
  to test enterprise features in a local, temporary cluster.
</Note>

* [SQL](#v23-1-0-sql)
* [Security and compliance](#v23-1-0-security-and-compliance)
* [Recovery and I/O](#v23-1-0-recovery-and-io)
* [Database operations](#v23-1-0-database-operations)
* [Backward-incompatible changes](#v23-1-0-backward-incompatible-changes)
* [Deprecations](#v23-1-0-deprecations)
* [Known limitations](#v23-1-0-known-limitations)
* [Additional resources](#v23-1-0-additional-resources)

#### SQL

##### Queries

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Full-text search using TSVector and TSQuery</td>

      <td>
        A <a href="https://www.cockroachlabs.com/docs/v23.1/full-text-search">full-text search</a> is used to perform queries on natural-language
        documents such as articles, websites, or other written formats, with results often sorted by relevance.

        <br />

        <br />

        You can rely on{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/functions-and-operators#full-text-search-functions">new built-in functions</a> to make use
        of the new <a href="https://www.cockroachlabs.com/docs/v23.1/tsvector">TSVECTOR</a> and <a href="https://www.cockroachlabs.com/docs/v23.1/tsquery">TSQUERY</a> data types.
      </td>
    </tr>

    <tr>
      <td>Improved developer experience for multi-region apps</td>

      <td>
        If you have functionality that requires low latency and cannot tolerate delays between regions, you can enable
        the <code>enforce\_home\_region</code> option, which{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/cost-based-optimizer#control-whether-queries-are-limited-to-a-single-region">
          ensures that queries are executed within a single region
        </a>

        . If a query doesn't have a home region or is running outside of its home region, the optimizer now provides
        improved feedback and suggestions for executing the query within a single region.
      </td>
    </tr>

    <tr>
      <td>Streamline migrations with improved COPY performance</td>
      <td>Enhancements to the functionality behind COPY statements resulted in 2x faster migrations using AWS DMS.</td>
    </tr>

    <tr>
      <td>Redact PII from statement bundles</td>

      <td>
        Leverage statement bundles for debugging without introducing data privacy concerns. You can now{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/explain-analyze#redact-option">
          redact personally identifiable information (PII) from statement bundles
        </a>

        {" "}

        for PCI compliance.
      </td>
    </tr>

    <tr>
      <td>User-Defined Function (UDF) enhancements</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/user-defined-functions">User-defined functions</a> offer enhanced flexibility, performance,
        and reusability. This release brings a number of UDF enhancements, including: Inlining of supported UDFs within
        the query plan to improve performance; support for subqueries in statements, support for expressions with a{" "}
        <code>\*</code> such as <code>SELECT \*</code> , and support for returning a set of results (using{" "}
        <code>SETOF</code>). UDFs can now also be used in Changefeed expressions (Enterprise) and <code>CHECK</code>{" "}
        constraints, and referenced from other objects. Validations have been added to guarantee that all statements in
        the function body should be as strict as the expected UDF volatility. UDFs are also now included in backup and
        restore operations.
      </td>
    </tr>

    <tr>
      <td>DELETE FROM ... USING</td>

      <td>
        We have added support for the{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/delete#parameters">
          <code>USING</code> clause on <code>DELETE</code>
        </a>

        , which allows joining multiple tables for a <code>DELETE</code> clause. This change is in line with PostgreSQL
        functionality and extends the flexibility of <code>DELETE</code>.
      </td>
    </tr>
  </tbody>
</table>

##### Schemas

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Support user-defined composite types</td>

      <td>
        You can now create your own{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/create-type#create-an-enumerated-data-type">enumerated data types</a>.<br />

        <br />

        For example:

        <br />

        <br />

        CREATE TYPE t AS (a INT, b INT); CREATE TABLE a (a t); INSERT INTO a VALUES((1, 2)) SELECT (a).b FROM a
      </td>
    </tr>

    <tr>
      <td>Declarative schema changer supports user-defined functions UDFs</td>

      <td>
        The statements <code>CREATE FUNCTION</code> and <code>DROP FUNCTION</code> are now supported by the{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/online-schema-changes">declarative schema changer</a>.
      </td>
    </tr>

    <tr>
      <td>Declarative schema changer fully supports constraints</td>

      <td>
        The statements <code>ALTER TABLE...ADD CONSTRAINT</code> and <code>ALTER TABLE...DROP CONSTRAINT</code> are now
        supported by the <a href="https://www.cockroachlabs.com/docs/v23.1/online-schema-changes">declarative schema changer</a>.
      </td>
    </tr>

    <tr>
      <td>Add configurable setting to adjust grant lease options</td>

      <td>
        A new session variable <code>allow\_role\_memberships\_to\_change\_during\_transaction</code>{" "}
        has been introduced which, when true, will make granting and revoking of{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/security-reference/authorization#roles">role memberships</a> faster at the cost of allowing
        some in-progress transactions to observe the previous role membership. By default, when granting or revoking a
        role from another role, the system waits until all transactions that are consulting the current set of role
        memberships to complete. This is done to preserve CockroachDB’s default isolation level. However, the downside
        of this wait is that grant and revoke will take longer than the longest currently executing transaction. In some
        cases, you may not care about whether concurrent transactions will immediately see the side-effects of the role
        grant or revoke operation, but would instead prefer that the operation finish quickly. For more information
        about this setting and how it works, see{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/grant#limitations">
          <code>GRANT</code> limitations
        </a>

        .
      </td>
    </tr>
  </tbody>
</table>

##### Sessions

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>New SQL shell editor with tab completion</td>

      <td>
        The SQL shell has a new user interface that allows{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/cockroach-sql#tab-completion">tab completion</a> and more advanced navigation, streamlining
        developer workflows. After pressing tab, you can navigate database objects, keywords, and functions using arrow
        keys, pressing tab again to select one and return to the console. You can also use pattern matching to filter
        these entities and find what you need faster.
      </td>
    </tr>

    <tr>
      <td>Support multiple active portals (Preview)</td>

      <td>
        The{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/cockroachdb-feature-availability#multiple-active-portals">
          multiple active portals feature of the Postgres wire protocol (pgwire)
        </a>

        {" "}

        is available in CockroachDB, with limitations. This allows for more efficient data retrieval by reducing the
        number of roundtrips required between the client and server. Third-party tools such as{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/build-a-python-app-with-cockroachdb-asyncpg">asyncpg</a> use this feature to implement
        efficient asynchronous communication between the PostgreSQL server and client. This can allow for faster, more
        scalable applications that can handle large amounts of data without slowing down the user experience.
      </td>
    </tr>

    <tr>
      <td>Full support for asyncpg</td>

      <td>
        CockroachDB now offers{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/build-a-python-app-with-cockroachdb-asyncpg">full support for asyncpg</a>, a PostgreSQL
        database interface library designed specifically for Python's asyncio framework. It provides an efficient
        implementation of the PostgreSQL server binary protocol for high-performance asynchronous database applications.
        Asyncpg is commonly used with ORM libraries such as SQLAlchemy to provide a simple, flexible, and efficient
        adapter for working with PostgreSQL databases. This makes it ideal for handling large volumes of data and
        scaling applications to meet demanding performance requirements.
      </td>
    </tr>
  </tbody>
</table>

#### Security and compliance

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Improvements to the redaction of data in observability artifacts</td>

      <td>
        We have made a number of improvements to ensure that sensitive data can be redacted in observability artifacts
        produced by CockroachDB, such as{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/cockroach-debug-zip#redact-sensitive-information">debug.zip</a> and{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/explain-analyze#parameters">statement bundles</a>. These improvements, available to all
        Self-Hosted customers, also help Cockroach Labs to comply with PCI DSS in CockroachDB Dedicated.
      </td>
    </tr>

    <tr>
      <td>FIPS-ready CockroachDB binaries</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/fips">FIPS-ready binaries</a> and Docker images are available for CockroachDB 23.1.0 and
        above. Federal Information Processing Standards (FIPS) 140-2 is a standard used to approve cryptographic modules
        by the U.S. and Canadian governments for systems maintained by relevant agencies and organizations working with
        them for the purposes of encrypting and decrypting sensitive data. FIPS-ready CockroachDB binaries are designed
        for workloads that require FIPS 140-2. FIPS-ready CockroachDB delegates cryptographic operations to the OpenSSL
        library available on the host operating system, rather than Go's cryptographic libraries. We recommend that
        OpenSSL has a FIPS 140-2 certificate. FIPS mode must be enabled in the Linux kernel to ensure that FIPS 140-2 is
        enforced by the operating system.
      </td>
    </tr>

    <tr>
      <td>Support Oauth authentication protocol for changefeeds</td>
      <td>See this item in Change Data Capture (Changefeeds).</td>
    </tr>

    <tr>
      <td>Support encrypted backups with keys stored in Azure Key Vault</td>

      <td>
        You can now <a href="https://www.cockroachlabs.com/docs/v23.1/take-and-restore-encrypted-backups">take and restore encrypted backups</a>{" "}
        using RSA keys stored in Azure Key Vault.
      </td>
    </tr>

    <tr>
      <td>Expand on External Connections for Changefeeds</td>
      <td>See the Changefeeds section for more information.</td>
    </tr>

    <tr>
      <td>New fine-grained system privilege to view all jobs</td>

      <td>
        The new <code>VIEWJOB system privilege</code> allows a user to view all jobs when running commands like{" "}
        <code>SHOW JOBS</code>, without granting additional capabilities. This helps ensure alignment with the principle
        of least privilege by removing the need to assign broader privileges or role options like{" "}
        <code>CONTROLJOB</code>.
      </td>
    </tr>
  </tbody>
</table>

#### Recovery and I/O

##### Change data capture (Changefeeds)

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Create scheduled exports using changefeeds</td>

      <td>
        Changefeeds can offer benefits over existing export functionality for customers who need higher levels of scale
        and observability. You can now create{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/export-data-with-changefeeds">Changefeeds as Export</a> functionality.
      </td>
    </tr>

    <tr>
      <td>Use a webhook as a changefeed sink</td>

      <td>
        The use of a <a href="https://www.cockroachlabs.com/docs/v23.1/changefeed-sinks#webhook-sink">webhook sink</a> to deliver changefeed messages
        to an arbitrary HTTPS endpoint has been promoted from Preview to GA.
      </td>
    </tr>

    <tr>
      <td>CDC Queries</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/cdc-queries">CDC Queries</a> (formerly CDC Transformations) have been promoted from Preview
        to GA.
      </td>
    </tr>

    <tr>
      <td>Use External Connections (GA) to remove a data exfiltration vector</td>

      <td>
        Use external connections to specify and interact with resources that are external from CockroachDB. With{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/create-external-connection">
          <code>CREATE EXTERNAL CONNECTION</code>
        </a>

        , you define a name for an external connection while passing the provider URI and query parameters.{" "}
        <code>BACKUP</code>, <code>RESTORE</code>, <code>IMPORT</code>, <code>EXPORT</code>, and{" "}
        <code>CREATE CHANGEFEED</code> queries can interact with the defined external connection instead of a required,
        provider-specific URI. As a result, you can decouple the management and permissions of the external resource
        from the operation in which you're using them. With the move from Preview to GA, this feature brings many new
        capabilities, such as fine-grained permission and support for schema registries, webhook and GC PubSub sinks,
        and the SHOW command.
      </td>
    </tr>

    <tr>
      <td>Changefeed locality</td>

      <td>
        <code>CREATE CHANGEFEED</code> now accepts a <code>WITH execution\_locality</code> option to{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/changefeeds-in-multi-region-deployments#run-a-changefeed-job-by-locality">
          restrict execution of the changefeed process to nodes within the specified locality filter
        </a>

        .
      </td>
    </tr>

    <tr>
      <td>Improved changefeed resilience</td>

      <td>
        Changefeeds are more stable as the result of improved error handling. Changefeeds now default to retrying
        requests when encountering any error, except those deemed terminal.
      </td>
    </tr>

    <tr>
      <td>Support Oauth authentication protocol for changefeeds</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/connect-to-a-changefeed-kafka-sink-with-oauth-using-okta">Oauth authentication</a> uses a
        third-party software provider to authenticate with Kafka instead of providing CockroachDB with direct access to
        Kafka cluster credentials. The third-party authentication server provides a temporary credential token that
        CockroachDB then uses to connect to a customer’s Kafka cluster. This represents a security best practice,
        allowing users to authenticate without directly storing or sharing their credentials.
      </td>
    </tr>
  </tbody>
</table>

##### Disaster Recovery

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Restrict backups to a locality</td>

      <td>
        You can now{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/take-locality-restricted-backups">
          to a specific region/locality. Only the nodes in the specified locality filter will execute the backup, so
          only those nodes will need access to the backup storage bucket. If the node executing the backup does not have
          a specific range to be backed up, it will read it from the closest replica it can.
        </a>
      </td>
    </tr>

    <tr>
      <td>Support implicit authentication on Azure</td>

      <td>
        You can now use implicit authentication on Azure for{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/cloud-storage-authentication">cloud storage authentication</a>. If the node executing the
        backup does not have a specific range to be backed up, it will read it from the closest replica it can.
      </td>
    </tr>

    <tr>
      <td>Support encrypted backups with keys stored in Azure Key Vault</td>

      <td>
        You can now <a href="https://www.cockroachlabs.com/docs/v23.1/take-and-restore-encrypted-backups">take and restore encrypted backups</a>{" "}
        using RSA keys stored in Azure Key Vault.
      </td>
    </tr>

    <tr>
      <td>Enforce supported backup versions</td>

      <td>
        To help ensure backups and restores are successful, CockroachDB now{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/restoring-backups-across-versions">enforces its previous support</a> for restoring backups
        on a cluster on a specific major version into a cluster that is on the same version or the next major version.
        Previously, restoring backups produced from even earlier versions was possible, but unreliable. Now, this
        operation is prevented with an error.
      </td>
    </tr>
  </tbody>
</table>

#### Database Operations

##### Observability

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Key Visualizer (Preview)</td>

      <td>
        Using a visual heatmap of the latest historical range activity across the cluster, you can quickly identify hot
        spots and full table scans, enabling you to target ranges for performance investigations.
      </td>
    </tr>

    <tr>
      <td>Enhanced Intelligent Insights experience includes transaction-level insights and metrics</td>

      <td>
        We have expanded the <a href="https://www.cockroachlabs.com/docs/v23.1/ui-insights-page#transaction-executions-view">Insights</a> section of
        the Console, offering improved discoverability and data for tuning and optimizing your workload. Contention
        insights reveal the waiting statement for cases where blocking conflicts occur. Transaction-level insights help
        you identify impacted areas of your application and prioritize your investigations, enabling you to drill down
        to individual statements with additional insights such as suboptimal plans.
      </td>
    </tr>

    <tr>
      <td>Enhanced statement metrics</td>

      <td>
        Easily correlate high-level cluster metrics (e.g., CPU, latency, etc.) with per-statement CPU utilization,
        latency metrics (P50, P90, P99, min, max), idle/client wait time, and MVCC garbage statistics.
      </td>
    </tr>

    <tr>
      <td>Faster performance and an enhanced UX for the SQL Activity pages</td>

      <td>
        Reliably and quickly find SQL activity information using a new interactive ‘Search Criteria’ capability in the
        console.
      </td>
    </tr>

    <tr>
      <td>Supplement troubleshooting flows with additional observability into indexes used per statement</td>

      <td>
        Observability information is available to correlate statements (and their plans) to indexes. You can now map
        index usage statistics with statements and transactions which streamlines troubleshooting flows such as dropping
        infrequently used indexes, creating or updating table statistics, reducing MVCC garbage, and alleviating
        resource hot spots.
      </td>
    </tr>
  </tbody>
</table>

##### KV Layer

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Decommission Pre-Flight Checks</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/node-shutdown?filters=decommission">Decommissioning operations</a> now check that each
        replica on a node that is slated to be decommissioned can be moved to another node. Any ranges that are not yet
        fully upreplicated will block the decommission process. When errors are detected that would prevent successful
        decommissioning,, the errors are printed to STDERR and the decommissioning command exits.
      </td>
    </tr>

    <tr>
      <td>Delegated Snapshots: Send Raft snapshots between follower replicas</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/architecture/replication-layer#snapshots">Delegated Snapshots</a> make multi-region
        deployments more cost-efficient by decreasing the use of remote snapshots if there is a local snapshot with the
        data. Sending data locally reduces your network costs and frees up the WAN bandwidth for the important data that
        must be transferred Previously, customers with multi-site deployments paid more for network bandwidth than
        strictly necessary due to system operations that required snapshots. Additionally, because of congested TCP
        channels between regions, transferring snapshots could negatively impact user traffic and slow snapshot
        transfers. Delegated Snapshots fixes this problem by sending snapshots from a local replica whenever a close-by
        replica exists and isn’t busy.
      </td>
    </tr>

    <tr>
      <td>Faster leaseholder recovery</td>

      <td>
        The default CockroachDB lease duration has been reduced from 9 seconds to 6 seconds, to reduce range
        unavailability following leaseholder loss. Some{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/architecture/replication-layer#important-values-and-timeouts">other related settings</a>{" "}
        have also had their defaults reduced, including heartbeat intervals, Raft election timeouts, and network
        timeouts.
      </td>
    </tr>

    <tr>
      <td>Lower default TTL for garbage collection (GC)</td>

      <td>
        The default <a href="https://www.cockroachlabs.com/docs/v23.1/configure-replication-zones#gc-ttlseconds">GC TTL value</a> in 23.1.0 is being
        reduced from 25 hrs to 4 hrs for new clusters. This change is being made to improve read performance, storage
        utilization, and cluster stability in high write traffic scenarios.{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/manage-a-backup-schedule">Scheduled backups</a> will not be affected by this change as{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/architecture/storage-layer#protected-timestamps">protected timestamps</a> will ensure data
        isn't garbage-collected until it has been backed up. <a href="https://www.cockroachlabs.com/docs/v23.1/create-changefeed">Changefeeds</a>{" "}
        will also not be affected. If you want a 25-hour or larger GC TTL value (for example, to support{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/as-of-system-time">AS OF SYSTEM TIME</a> queries that go further back in time), you can
        explicitly set GC TTL to the desired value. This change will only apply to new clusters. Existing clusters will
        retain the 25-hour default when upgrading, unless you have previously overridden it with an explicit value, in
        which case, that value will be retained. Backups taken from clusters running versions prior to v23.1 will
        similarly retain the GC TTL configured when the backup was taken.
      </td>
    </tr>
  </tbody>
</table>

#### Backward-incompatible changes

Before <InternalLink version="v23.1" path="upgrade-cockroach-version">upgrading to CockroachDB v23.1</InternalLink>, be sure to review the following backward-incompatible changes, as well as key cluster setting changes, and adjust your deployment as necessary.

* Replaced the `cdc_prev()` <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink> in favor of a `cdc_prev` tuple. This is an incompatible change that may break <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> that use the previous `cdc_prev()` function.
* <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES FOR TABLE`</InternalLink>
  now includes rows for all indexes that support the table. Prior to this change, `SHOW RANGES FOR TABLE foo` was an
  alias for `SHOW RANGES FOR INDEX foo@primary`. This was causing confusion, as it would miss data for secondary
  indexes. It is still possible to filter to just the primary index using `SHOW RANGES FOR INDEX foo@primary`. The
  statement output now also includes the index name.
* CockroachDB now supports sharing storage ranges across multiple indexes/tables. This behavior is not enabled by default in v23.1, but will be enabled by default in a future release. When the behavior is enabled, there will no longer be a guarantee that there is at most one SQL object (e.g., table/index/sequence/materialized view) per storage range. As a result, the columns `table_id`, `database_name`, `schema_name`, `table_name` and `index_name` in `crdb_internal.ranges` and `.ranges_no_leases` will become meaningless, since a range will no longer be attributed to a single table/index. In v23.1, the default behavior of <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> is retained, but you should consider setting the <InternalLink version="v23.1" path="cluster-settings">`sql.show_ranges_deprecated_behavior.enabled`</InternalLink> cluster setting to `false`. This will have the following effects that will become the defaults in a future release:
  * The aforementioned columns in the `crdb_internal` virtual tables will be removed. Existing code can use the updated output of the <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> statement instead, optionally using `WITH KEYS` to expose the raw start/end keys.
  * `SHOW RANGES FROM DATABASE` continues to report one row per range, but stops returning the database / schema / table / index name.
  * `SHOW RANGES FROM TABLE` continues to report one row per range, but stops returning the index name. Suggested replacements:
    * Instead of: `SELECT range_id FROM crdb_internal.ranges WHERE table_name = 'x'`, use: `SELECT range_id FROM [SHOW RANGES FROM TABLE x]`
    * Instead of `SELECT range_id FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2` (variable / unpredictable table name or ID), use: `SELECT range_id FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES] WHERE table_name = $1 OR table_id = $2`
    * Instead of `SELECT start_key FROM crdb_internal.ranges WHERE table_name = 'x'`, use: `SELECT raw_start_key FROM [SHOW RANGES FROM TABLE x WITH KEYS]`
    * Instead of `SELECT start_key FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2` (unpredictable / variable table name or ID), use: `SELECT raw_start_key FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES, KEYS] WHERE table_name = $1 OR table_id = $2`
* When the <InternalLink version="v23.1" path="cluster-settings">cluster setting `sql.show_ranges_deprecated_behavior.enabled` is set to `false` (recommended in v23.1)</InternalLink>, the format of the columns `start_key` and `end_key` for <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES FROM DATABASE`</InternalLink> and `SHOW RANGES FROM TABLE` have been extended to include which table/index the key belongs to. This is necessary because a range can now contain data from more than one table/index.
* When the <InternalLink version="v23.1" path="cluster-settings">cluster setting `sql.show_ranges_deprecated_behavior.enabled` is set to `false` (recommended in v23.1)</InternalLink>, the output of <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> no longer includes `range_size`, `range_size_mb`, `lease_holder`, or `lease_holder_localities` by default. This ensures that `SHOW RANGES` remains fast in the common case. Use the new option <InternalLink version="v23.1" path="show-ranges#options">`WITH DETAILS`</InternalLink> to include these columns.
* The format of the columns `start_key` and `end_key` for `SHOW RANGE... FOR ROW` has been changed to be consistent with the output of `SHOW RANGES FROM INDEX`.
* Changefeeds using "preview" expressions (released in v23.1.0) and that access the previous state of the row using the `cdc_prev()` function will no longer work and will need to be recreated with new syntax.
* Some of the transformations specific to changefeeds have been deprecated and replaced. These functions were released in limited access in v22.2. Deprecated changefeed transformations continue to function. Closely monitor changefeeds that are created during upgrade. While effort was made to maintain backward compatibility, the updated changefeed transformation may produce slightly different output, such as different column names.
* Fixed a bug where, when `server.identity_map.configuration` was used, CockroachDB did not verify the client-provided username against the target mappings. Note that **this means that the client must now provide a valid DB username.** This requirement is compatible with PostgreSQL; it was not previously required by CockroachDB but it is now. This does not apply when identity maps are not in use.
* Previously, the type of the `replicas`, `voting_replicas`,`non_voting_replicas` and `learner_replicas` in `crdb_internal.ranges` were overridden to `INT2VECTOR` causing incompatible indexing between `.ranges` and `.ranges_no_leases`. Now the types of those columns in the two tables are set to `INT[]`.
* The output of the <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> command for the `crdb_internal.ranges` and `crdb_internal.ranges_no_leases` tables has been updated, and the previous output is deprecated. To enable the new command output, set the `sql.show_ranges_deprecated_behavior.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> to `false`. The new output will become default in v23.2.
* Previously, if a user specified a <InternalLink version="v23.1" path="sql-name-resolution#current-schema">`search_path`</InternalLink> in the connection string parameters, it would always be treated as case sensitive. Now, in order to have the schema names in the `search_path` respect case, the user must include double quotes around the name.
* The deprecated CLI command `debug unsafe-remove-dead-replicas` has been removed. Use `debug recover` instead.

<a id="v23-1-0-cluster-settings" />

#### Key Cluster Setting Changes

The following changes should be reviewed prior to upgrading. Default cluster settings will be used unless you have manually set a value for a setting. This can be confirmed by checking the `system.settings` table (`select * from system.settings`) to view the non-default settings.

<table>
  <thead>
    <tr>
      <th>Category</th>
      <th>Description</th>
      <th>Change Type</th>
      <th>Backport version</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>SQL language change</td>

      <td>
        The <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a>
        <code>sql.ttl.default\_range\_concurrency</code> and table storage parameter{" "}
        <code>ttl\_range\_concurrency</code> are no longer configurable.{" "}
        \#89392
      </td>

      <td>No longer configurable</td>
      <td>v22.2.1</td>
    </tr>

    <tr>
      <td>SQL language change</td>

      <td>
        The <code>sql.distsql.max\_running\_flows</code>
        <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a> has been removed.{" "}
        \#84888
      </td>

      <td>Removed</td>
      <td>None</td>
    </tr>

    <tr>
      <td>Operational change</td>

      <td>
        The <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster settings</a>
        <code>server.web\_session.purge.period</code> and{" "}
        <code>server.web\_session.purge.max\_deletions\_per\_cycle</code>, which were specific to the
        cleanup function for <code>system.web\_sessions</code>, have been replaced by{" "}
        <code>server.log\_gc.period</code> and <code>server.log\_gc.max\_deletions\_per\_cycle</code>{" "}
        which apply to the cleanup function for <code>system.eventlog</code>, <code>system.rangelog</code> and{" "}
        <code>system.web\_sessions</code> equally.{" "}
        \#90789
      </td>

      <td>Removed, repurposed</td>
      <td>None</td>
    </tr>

    <tr>
      <td>Operational change</td>

      <td>
        The <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a>
        <code>server.web\_session.auto\_logout.timeout</code> has been removed.{" "}
        \#90789
      </td>

      <td>Removed, defaults to true</td>
      <td>None</td>
    </tr>

    <tr>
      <td>Operational change</td>

      <td>
        The <a href="https://www.cockroachlabs.com/docs/v23.1/load-based-splitting">load-based splitter</a> now supports using request CPU usage to
        split ranges. This is introduced with the previous cluster setting{" "}
        <code>kv.allocator.load\_based\_rebalancing.objective</code>, which when set to <code>cpu</code>, will use
        request CPU usage. The threshold above which CPU usage of a range is considered for splitting is defined in the
        cluster setting <code>kv.range\_split.load\_cpu\_threshold</code>, which has a default value of{" "}
        <code>250ms</code>. (Relates to #100211 in this table.){" "}
        \#96128
      </td>

      <td>Repurposed</td>
      <td>None</td>
    </tr>

    <tr>
      <td>Operational change</td>

      <td>
        The <code>kv.range\_split.load\_cpu\_threshold</code>
        <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings#setting-kv-range-split-load-cpu-threshold">cluster setting</a> now has a
        minimum setting value of <code>10ms</code>. Previously there was no minimum so, while unlikely, this could have
        an impact if you had chosen a custom setting lower than the established minimum.{" "}
        \#98250
      </td>

      <td>New minimum</td>
      <td>None</td>
    </tr>

    <tr>
      <td>Security update</td>

      <td>
        The new <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a>
        <code>server.user\_login.downgrade\_scram\_stored\_passwords\_to\_bcrypt.enabled</code>, which
        allows you to migrate passwords from SCRAM to bcrypt during user authentication, defaults to <code>true</code>.
        If it is <code>true</code> and if <code>server.user\_login.password\_encryption</code> is{" "}
        <code>crdb-bcrypt</code>, then during login, the stored hashed password will be migrated from SCRAM to bcrypt.{" "}
        \#97429
      </td>

      <td>New setting</td>
      <td>v22.2.6</td>
    </tr>

    <tr>
      <td>Security update</td>

      <td>
        The default value for the{" "}
        <code>server.user\_login.password\_hashes.default\_cost.scram\_sha\_256</code>
        <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a> is now 10610. (Previously the default was 119680.)
        The old value was found to have been too high for many types of client hardware, and in some cases could cause
        regressions in connection latency. The new value was chosen by running tests with clients that have 1 or 2 vCPUs
        provisioned. Additionally, the new cluster setting{" "}
        <code>server.user\_login.rehash\_scram\_stored\_passwords\_on\_cost\_change.enabled</code>{" "}
        was added, and defaults to <code>true</code>. If it is <code>true</code> and the stored SCRAM password for a
        user has a different cost than the configured default cost, then the next time the user logs in, their password
        will automatically be rehashed using the configured default cost. If the rehashing is not desired, then
        operators should update the{" "}
        <code>server.user\_login.password\_hashes.default\_cost.scram\_sha\_256</code> cluster setting to
        the value they desire before upgrading. This change is being backported to{" "}
        <InternalLink version="releases" path="v22.2">v22.2</InternalLink>.{" "}
        \#98254
      </td>

      <td>Changed default</td>
      <td>v22.2.7</td>
    </tr>

    <tr>
      <td>Command-line change</td>

      <td>
        The <code>--drain-wait</code> argument to the{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/cockroach-node">
          <code>cockroach node drain</code>
        </a>

        {" "}

        command will be automatically increased if the command detects that it is smaller than the sum of the{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/node-shutdown#cluster-settings">cluster settings</a>
        <code>server.shutdown.drain\_wait</code>, <code>server.shutdown.connection\_wait</code>,{" "}
        <code>server.shutdown.query\_wait</code> times two, and{" "}
        <code>server.shutdown.lease\_transfer\_wait</code>. If the <code>--drain-wait</code> argument is 0, then
        no timeout is used. This recommendation{" "}
        <a href="https://www.cockroachlabs.com/docs/v23.1/node-shutdown#drain-timeout">was already documented</a>, but now the advice will be applied
        automatically.
      </td>

      <td>New effect</td>
      <td>v22.2.1</td>
    </tr>

    <tr>
      <td>Bug fix</td>

      <td>
        RPC connections between nodes now require RPC connections to be established in both directions, otherwise the
        connection will be closed. This is done to prevent asymmetric network partitions where nodes are able to send
        outbound messages but not receive inbound messages, which could result in persistent unavailability. This
        behavior can be disabled by the <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a>
        <code>rpc.dialback.enabled</code>.
      </td>

      <td>New setting, enabled by default</td>
      <td>None</td>
    </tr>

    <tr>
      <td>Bug fix</td>

      <td>
        Fixed a rare bug introduced in v22.2.0 that could cause a node to crash with an{" "}
        <code>attempting to append refresh spans after the tracked timestamp has moved forward</code> error when
        querying virtual tables in the{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/crdb-internal">
          <code>crdb\_internal</code>
        </a>

        {" "}

        or{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/pg-catalog">
          <code>pg\_catalog</code>
        </a>

        {" "}

        system catalogs. If you are experiencing this bug, set the <code>sql.distsql.use\_streamer.enabled</code>
        <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a> to <code>false</code> before upgrading a cluster to
        v23.1.
      </td>

      <td>New guidance</td>
      <td>v22.2.8</td>
    </tr>

    <tr>
      <td>Bug fix</td>

      <td>
        The{" "}

        <a href="https://www.cockroachlabs.com/docs/v23.1/ui-hot-ranges-page">
          <strong>Hot Ranges</strong> page
        </a>

        {" "}

        DB Console page would show hot ranges by CPU and not QPS (queries per second), depending on the value of the{" "}
        <code>kv.allocator.load\_based\_rebalancing.objective</code>
        <a href="https://www.cockroachlabs.com/docs/v23.1/cluster-settings">cluster setting</a> (default <code>cpu</code>). Now the page will always
        collect statistics based on QPS. (Relates to #96128 in this table.){" "}
        \#100211
      </td>

      <td>Repurposed setting</td>
      <td>No</td>
    </tr>
  </tbody>
</table>

#### Deprecations

* Ordinal column references (e.g., `SELECT @1, @2 FROM t` ) are now deprecated. By default, statements using this syntax will now result in an error. If desired, such statements can be allowed using the session setting `SET allow_ordinal_column_references=true`. Support for ordinal column references is scheduled to be removed in upcoming version v23.2.
* The `CONTROLCHANGEFEED` <InternalLink version="v23.1" path="alter-role#role-options">role option</InternalLink> will be deprecated in the future (see issue #94757 ). With this change, usages of the `CONTROLCHANGEFEED` role option will come with a deprecation warning. Its existing behavior remains the same. The `SELECT` and `CHANGEFEED` privileges will be used for changefeeds henceforth:
  * The `SELECT` privilege on a set of tables allows a user to run core changefeeds against them.
  * The `CHANGEFEED` privilege on a set of tables allows a user to run enterprise changefeeds on them, and also manage the underlying changefeed job (ie. view, pause, cancel, and resume the job). Notably, a new <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `changefeed.permissions.require_external_connection_sink.enabled` is added and set to `false` by default. Enabling this setting restricts users with `CHANGEFEED` on a set of tables to create enterprise changefeeds into external connections only. To use a given external connection, a user typically needs the `USAGE` privilege on it. Note that `ALTER DEFAULT PRIVILEGES` can be used with both the `CHANGEFEED` and `SELECT` privileges to assign coarse-grained permissions (i.e., assign permissions to all tables in a schema rather than manually assign them for each table).
* Deprecated the `PGDUMP` and `MYSQLDUMP` formats for <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink>. They are still present, but will be removed in a future release. See the <InternalLink version="v23.1" path="molt/migration-overview">Migration Overview</InternalLink> page for alternatives.

#### Known limitations

For information about new and unresolved limitations in CockroachDB v23.1, with suggested workarounds where applicable, see <InternalLink version="v23.1" path="known-limitations">Known Limitations</InternalLink>.

#### Additional resources

<table>
  <thead>
    <tr>
      <th>Resource</th>
      <th>Topic</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Cockroach University</td>

      <td>
        <a href="https://university.cockroachlabs.com/courses/course-v1:crl+intro-to-distributed-sql-and-cockroachdb+self-paced/about">
          Introduction to Distributed SQL and CockroachDB
        </a>
      </td>

      <td>
        This course introduces the core concepts behind distributed SQL databases and describes how CockroachDB fits
        into this landscape. You will learn what differentiates CockroachDB from both legacy SQL and NoSQL databases and
        how CockroachDB ensures consistent transactions without sacrificing scale and resiliency. You'll learn about
        CockroachDB's seamless horizontal scalability, distributed transactions with strict ACID guarantees, and high
        availability and resilience.
      </td>
    </tr>

    <tr>
      <td>Cockroach University</td>

      <td>
        <a href="https://university.cockroachlabs.com/courses/course-v1:crl+practical-first-steps-with-crdb+self-paced/about">
          Practical First Steps with CockroachDB
        </a>
      </td>

      <td>
        This course will give you the tools you need to get started with CockroachDB. During the course, you will learn
        how to spin up a cluster, use the Admin UI to monitor cluster activity, and use SQL shell to solve a set of
        hands-on exercises.
      </td>
    </tr>

    <tr>
      <td>Cockroach University</td>

      <td>
        <a href="https://university.cockroachlabs.com/courses/course-v1:crl+intro-to-resilience-in-multi-region+self-paced/about">
          Building a Highly Resilient Multi-region Database using CockroachDB
        </a>
      </td>

      <td>
        This course is part of a series introducing solutions to running low-latency, highly resilient applications for
        data-intensive workloads on CockroachDB. In this course we focus on surviving large-scale infrastructure
        failures like losing an entire cloud region without losing data during recovery. We’ll show you how to use
        CockroachDB survival goals in a multi-region cluster to implement a highly resilient database that survives node
        or network failures across multiple regions with zero data loss.
      </td>
    </tr>

    <tr>
      <td>Cockroach University</td>

      <td>
        <a href="https://university.cockroachlabs.com/courses/course-v1:crl+intro-to-serverless+self-paced/about">
          Introduction to Serverless Databases and CockroachDB Serverless
        </a>
      </td>

      <td>
        This course introduces the core concepts behind serverless databases and gives you the tools you need to get
        started with CockroachDB Serverless. You will learn how serverless databases remove the burden of configuring,
        sizing, provisioning, securing, maintaining and dynamically scaling your database based on load. This means you
        simply pay for the serverless database resources you use.
      </td>
    </tr>

    <tr>
      <td>Docs</td>

      <td>
        <InternalLink version="molt" path="migration-overview">Migration Overview</InternalLink>
      </td>

      <td>
        This page summarizes the steps of migrating a database to CockroachDB, which include testing and updating your
        schema to work with CockroachDB, moving your data into CockroachDB, and testing and updating your application.
      </td>
    </tr>

    <tr>
      <td>Docs</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/developer-guide-overview">Developer Guide Overview</a>
      </td>

      <td>This page provides an overview of resources available to developers building applications on CockroachDB.</td>
    </tr>

    <tr>
      <td>Docs</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/security-reference/security-overview">Security Overview</a>
      </td>

      <td>The 23.1 release encapsulates a number of security milestones. See the security overview for a summary.</td>
    </tr>

    <tr>
      <td>Docs</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/architecture/overview">Architecture Overview</a>
      </td>

      <td>
        This page provides a starting point for understanding the architecture and design choices that enable
        CockroachDB's scalability and consistency capabilities.
      </td>
    </tr>

    <tr>
      <td>Docs</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/sql-feature-support">SQL Feature Support</a>
      </td>

      <td>
        The page summarizes the standard SQL features CockroachDB supports as well as common extensions to the standard.
      </td>
    </tr>

    <tr>
      <td>Docs</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/change-data-capture-overview">Change Data Capture Overview</a>
      </td>

      <td>
        This page summarizes CockroachDB's data streaming capabilities. Change data capture (CDC) provides efficient,
        distributed, row-level changefeeds into a configurable sink for downstream processing such as reporting,
        caching, or full-text indexing.
      </td>
    </tr>

    <tr>
      <td>Docs</td>

      <td>
        <a href="https://www.cockroachlabs.com/docs/v23.1/backup-architecture">Backup Architecture</a>
      </td>

      <td>
        This page describes the backup job workflow with a high-level overview, diagrams, and more details on each phase
        of the job.
      </td>
    </tr>
  </tbody>
</table>

## v23.1.0-rc.2

Release Date: May 4, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-rc.2 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.linux-amd64.tgz">
          cockroach-v23.1.0-rc.2.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.linux-amd64.tgz">
          cockroach-sql-v23.1.0-rc.2.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.linux-arm64.tgz">
          cockroach-v23.1.0-rc.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.linux-arm64.tgz">
          cockroach-sql-v23.1.0-rc.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-rc.2.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-rc.2.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-rc.2.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-rc.2.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.windows-6.2-amd64.zip">
          cockroach-v23.1.0-rc.2.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.2.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-rc.2.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.2.windows-6.2-amd64.zip.sha256sum">SHA256</a>
        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-rc.2
```

### Bug fixes

* Fixed a bug introduced in versions 22.1.19, 22.2.8, and pre-release versions of 23.1 that could cause queries to return spurious insufficient <InternalLink version="v23.1" path="security-reference/authorization">privilege</InternalLink> errors. For the bug to occur, two databases would need to have duplicate tables, each with a <InternalLink version="v23.1" path="foreign-key">foreign key</InternalLink> reference to another table. The error would then occur if the same SQL string was executed against both databases concurrently by users that have <InternalLink version="v23.1" path="security-reference/authorization">privileges</InternalLink> over only one of the tables.

### Contributors

This release includes 4 merged PRs by 4 authors.

## v23.1.0-rc.1

Release Date: May 2, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-rc.1 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.linux-amd64.tgz">
          cockroach-v23.1.0-rc.1.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.linux-amd64.tgz">
          cockroach-sql-v23.1.0-rc.1.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.linux-arm64.tgz">
          cockroach-v23.1.0-rc.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.linux-arm64.tgz">
          cockroach-sql-v23.1.0-rc.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-rc.1.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-rc.1.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-rc.1.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-rc.1.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.windows-6.2-amd64.zip">
          cockroach-v23.1.0-rc.1.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-rc.1.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-rc.1.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-rc.1.windows-6.2-amd64.zip.sha256sum">SHA256</a>
        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-rc.1
```

### SQL language changes

* Two views have been added to the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal` system catalog</InternalLink>: `crdb_internal.statement_activity` surfaces data in the persisted `system.statement_activity` table, and `crdb_internal.transaction_activity` surfaces the `system.transaction_activity` table.
* Span statistics are now unavailable on mixed-version clusters.

### DB Console changes

* Timestamps are now displayed in DB Console in the timezone specified in the `ui.display_timezone` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>, if set. Currently supported timezones are `Coordinated Universal Time` and `America/New_York`.
* DB Console now limits historical data for SQL Activity pages to 200000 rows by default, based on the new `sql.stats.activity.persisted_rows.max` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. A background job automatically prunes the system tables `transaction_activity` and `statement_activity`.
* Improved performance when viewing the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal.transaction_contention_events` table</InternalLink> in DB Console if there are a large number of rows.

### Bug fixes

* Fixed a bug introduced prior to v22.1 where an `EXPORT` statement could be incorrectly evaluated and result in a node panic or incorrect query results if it had projection or rendering on top of the `EXPORT`, such as the statement `WITH cte AS (EXPORT INTO CSV 'nodelocal://1/export1/' FROM SELECT * FROM t) SELECT filename FROM cte;`. Only the presentation of the query result was affected, not the exported data.
* The descriptions of the `rebalancing.readbytespersecond` and `rebalancing.writebytespersecond` metrics now correctly reference bytes read and bytes written, respectively.
* Fixed a rare bug introduced prior to v22.1 where distributed plans could cause the graceful drain of a node to become stuck retrying forever during <InternalLink version="v23.1" path="node-shutdown">node shutdown</InternalLink>. This bug leads to errors like `drain details: distSQL execution flows:`, together with a non-zero number of flows that is not reducing over a long period of time.
* Fixed a bug where a <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> operation with `skip_localities_check` could fail with errors if regions were missing on a cluster.
* Fixed a bug introduced in testing releases of v23.1 that could cause incorrect results for queries with `STRICT` <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink>.
* Fixed a rare bug that could cause keys to be unexpectedly deleted locally within a store by replica rebalancing during a write heavy workload.
* Fixed a bug where a failed or cancelled <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink> operation could leave some of the imported rows behind after it was cancelled, if the writing processes were slow enough to continue writing after the cleanup process started.
* Fixed a bug in the behavior of the `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> that may have allowed a hash join to be favored over a lookup join, or failed to error out remote accesses done by uniqueness checks for mutations on <InternalLink version="v23.1" path="regional-tables">`REGIONAL BY ROW` tables</InternalLink>.
* Fixed a bug introduced in testing releases of v23.1 where a node could crash when evaluating a <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> command when the schema had `INT2` or `INT4` type.
* Fixed a bug where a backup of a key's revision history may not correctly be restored to the proper revision of the key if it is split across multiple sorted string tables.
* Fixed a bug introduced in testing releases of v23.1 where a user could be prevented from logging in or viewing or changing <InternalLink version="v23.1" path="grant">`GRANT`s</InternalLink> if the cluster had a long period of inactivity.
* Fixed a bug where a node that transferred a lease away and missed a liveness heartbeat could then erroneously update the closed timestamp during the stasis period of its liveness. This could lead to closed timestamp invariant violation and could cause the node to crash. In extreme cases, this could lead to inconsistencies in read-only queries.
* Fixed a bug that caused memory leaks when a closed or cancelled connection was released.

### Performance improvements

* <InternalLink version="v23.1" path="ui-sql-dashboard">SQL Activity</InternalLink>
  dashboards now default to using a table optimized with the top data for the most used cases. Otherwise, they use
  persisted data if available, and in-memory data otherwise.

* Static erroring of some locality-optimized lookup <InternalLink version="v23.1" path="joins">joins</InternalLink> is now handled dynamically during query execution.

### Miscellaneous

* Two new statistics help to track the efficiency of snapshot transfers and to keep the number of failures due to system-level races as low as possible. `range.snapshots.recv-failed` shows the number of snapshot send attempts that are initiated but not accepted by the recipient. `range.snapshots.recv-unusable` shows the number of snapshots that were fully transmitted but not used.

### Contributors

This release includes 59 merged PRs by 39 authors. We would like to thank the following contributors from the CockroachDB community:

* ajwerner

## v23.1.0-beta.3

Release Date: April 24, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-beta.3 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.linux-amd64.tgz">
          cockroach-v23.1.0-beta.3.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.linux-amd64.tgz">
          cockroach-sql-v23.1.0-beta.3.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.linux-arm64.tgz">
          cockroach-v23.1.0-beta.3.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.linux-arm64.tgz">
          cockroach-sql-v23.1.0-beta.3.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-beta.3.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-beta.3.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-beta.3.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-beta.3.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.windows-6.2-amd64.zip">
          cockroach-v23.1.0-beta.3.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.3.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-beta.3.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.3.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-beta.3
```

### Backward-incompatible changes

* Previously, if a user specified a <InternalLink version="v23.1" path="sql-name-resolution#current-schema">`search_path`</InternalLink> in the connection string parameters, it would always be treated as case sensitive. Now, in order to have the schema names in the `search_path` respect case, the user must include double quotes around the name.

### SQL language changes

* Statements of type <InternalLink version="v23.1" path="set-vars">`SET...`</InternalLink> are no longer displayed on the <InternalLink version="v23.1" path="ui-insights-page">Insights page</InternalLink>.

### Operational changes

* The amount of <InternalLink version="v23.1" path="architecture/replication-layer">replication</InternalLink> traffic in flight from a single <InternalLink version="v23.1" path="architecture/reads-and-writes-overview">Raft leader</InternalLink> to a follower has been reduced from 256 MB to 32 MB. This reduces the chance of running out of memory during bulk write operations. This can be controlled via the environment variable `COCKROACH_RAFT_MAX_INFLIGHT_BYTES`.

### DB Console changes

* When a user activates diagnostics on the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">SQL Activity</InternalLink> page, there is now an option to select the trace rate for statement diagnostics collection.
* Updated the **Network Latency** side navigation name and Network Diagnostics page title to Network. Updated the Advanced Debugging page title to <InternalLink version="v23.1" path="ui-debug-pages">Advanced Debug</InternalLink>.
* Introduced a "draining node" **Node Status** on the <InternalLink version="v23.1" path="ui-cluster-overview-page#cluster-overview-panel">Cluster Overview panel</InternalLink> so that "draining node" has it own value instead of counting as a "dead node".
* Added a time scale selector to the <InternalLink version="v23.1" path="ui-statements-page#diagnostics">**Diagnostics** tab</InternalLink> under the Statement Details page. This allows users to view bundles from the selected period only.

### Bug fixes

* Fixed a bug that caused internal errors when executing <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink> with empty bodies. This bug was only present in alpha pre-release versions of 23.1.
* Fixed a bug that caused a <InternalLink version="v23.1" path="restore">restore</InternalLink> to fail occasionally due to incorrect schema ID resolution when restoring a <InternalLink version="v23.1" path="backup">backup</InternalLink> with <InternalLink version="v23.1" path="schema-design-schema">user-defined schemas</InternalLink>.
* Fixed a bug in parsing a <InternalLink version="v23.1" path="sql-name-resolution#current-schema">`search_path`</InternalLink> with a quote in it when specified in the <InternalLink version="v23.1" path="connection-parameters">connection string</InternalLink>. Also, the `search_path` <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> now supports schema names that have commas in them.
* Fixed a bug that has existed since <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink> were introduced that could cause a function call to resolve to the wrong function after changes to the <InternalLink version="v23.1" path="sql-name-resolution#current-schema">schema search path</InternalLink>.
* Previously, CockroachDB v23.1 alpha and beta versions would panic on <InternalLink version="v23.1" path="cockroach-start">`cockroach start`</InternalLink> command when the `GOMEMLIMIT` environment variable was set and the `--max-go-memory` flag wasn't specified. This is now fixed.
* Fixed a bug that caused errors in test builds and potentially incorrect results in release builds when invoking a <InternalLink version="v23.1" path="user-defined-functions">user-defined function</InternalLink> with a <InternalLink version="v23.1" path="subqueries">subquery</InternalLink> argument. This bug was only present in v23.1 alpha versions.
* Fixed an internal error that could occur when the `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> is on and the input to the <InternalLink version="v23.1" path="joins#lookup-joins">lookup join</InternalLink> is a `SELECT` of <InternalLink version="v23.1" path="scalar-expressions">scalar expressions</InternalLink> (e.g., `1+1` ). Also, <InternalLink version="v23.1" path="subqueries">subqueries</InternalLink> with no <InternalLink version="v23.1" path="multiregion-overview#table-localities">home region</InternalLink> now error out with `enforce_home_region` set.
* Point <InternalLink version="v23.1" path="insert">inserts</InternalLink> and <InternalLink version="v23.1" path="update">updates</InternalLink> that write to a remote region of a table created with the <InternalLink version="v23.1" path="create-table#create-a-table-with-a-regional-by-row-locality-using-a-custom-region-column">`REGIONAL BY ROW AS`</InternalLink> clause will now error out.
* Fixed a bug in the <InternalLink version="v23.1" path="functions-and-operators">built-in functions</InternalLink> `pg_get_indexdef` and `col_description` that could cause the functions to return errors if the user created tables named `pg_indexes` or `pg_attribute`. Or, if the user created a schema named `system` with a table named `comments`. This bug was only present in pre-release versions of v23.1.
* Fixed a bug where, when CockroachDB failed to retrieve <InternalLink version="v23.1" path="performance-best-practices-overview#transaction-contention">contention information</InternalLink>, the full <InternalLink version="v23.1" path="ui-insights-page">Insights page</InternalLink> would return an error. Now the Insights page will load even when there is an issue with decoding contention information.
* Fixed a bug to ensure that the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">list of fingerprints</InternalLink> used per <InternalLink version="v23.1" path="indexes">index</InternalLink> is shown even when there is a max-size limit on the SQL API.

### Contributors

This release includes 36 merged PRs by 15 authors.

## v23.1.0-beta.2

Release Date: April 17, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-beta.2 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.linux-amd64.tgz">
          cockroach-v23.1.0-beta.2.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.linux-amd64.tgz">
          cockroach-sql-v23.1.0-beta.2.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.linux-arm64.tgz">
          cockroach-v23.1.0-beta.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.linux-arm64.tgz">
          cockroach-sql-v23.1.0-beta.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-beta.2.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-beta.2.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-beta.2.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-beta.2.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.windows-6.2-amd64.zip">
          cockroach-v23.1.0-beta.2.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.2.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-beta.2.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.2.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-beta.2
```

### Enterprise edition changes

* <InternalLink version="v23.1" path="create-changefeed">CDC queries</InternalLink>
  now support wrapped envelope with diff ( `envelope='wrapped', diff` ).

### SQL language changes

* Added the <InternalLink version="v23.1" path="set-vars#supported-variables">session variable</InternalLink> `multiple_active_portals_enabled`. This setting is only for a <InternalLink version="v23.1" path="cockroachdb-feature-availability">preview feature</InternalLink>. When set to `true`, it allows multiple portals to be open at the same time, with their execution interleaved with each other. In other words, these portals can be paused. The underlying statement for a pausable portal must be a read-only <InternalLink version="v23.1" path="selection-queries">`SELECT`</InternalLink> query without <InternalLink version="v23.1" path="subqueries">sub-queries</InternalLink> or postqueries (such as executed by <InternalLink version="v23.1" path="foreign-key">foreign key</InternalLink> checks), and such a portal is always executed with a <InternalLink version="v23.1" path="architecture/sql-layer#distsql">local query plan</InternalLink>.

### DB Console changes

* Update sort label on *Search Criteria* to match the name on the table columns on the <InternalLink version="v23.1" path="ui-statements-page">Statements</InternalLink> and <InternalLink version="v23.1" path="ui-transactions-page">Transactions</InternalLink> pages.
* By default, we now show the `Application Name` column in the fingerprints overview pages. <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">Statement fingerprints</InternalLink> and <InternalLink version="v23.1" path="ui-transactions-page#transaction-fingerprints-view">Transaction fingerprints</InternalLink> will be displayed per application on the overview pages rather than grouped into a single fingerprint ID.
* When going from the Fingerprint Overview pages or the Insight Details pages to the Fingerprint Details page for <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">statements</InternalLink> or <InternalLink version="v23.1" path="ui-transactions-page#transaction-fingerprints-view">transactions</InternalLink>, the details page will fetch data for the statement with the provided application name. For overview pages, this is the app name of the selected row. For insight details, it is the app of the execution that generated the insight.

### Bug fixes

* Fixed a bug so that the text search `@@` <InternalLink version="v23.1" path="functions-and-operators">operator</InternalLink> ("matches") can work with variable expressions. Fixed a bug where incorrect results were returned when one of the arguments was a <InternalLink version="v23.1" path="string">`TEXT`</InternalLink> expression and the other argument was a `TEXT` or `TSQuery` expression.
* Fixed a bug where running <InternalLink version="v23.1" path="alter-table#drop-column">`DROP COLUMN... CASCADE`</InternalLink> when that column is used in an <InternalLink version="v23.1" path="indexes">index</InternalLink> that includes other columns caused a panic.
* Fixed a rare race condition on <InternalLink version="v23.1" path="cockroach-start">node startup</InternalLink> that could cause an `invalid memory address or nil pointer dereference` error.
* Fixed a bug that was causing nodes running on Windows to crash on startup. This bug only existed in v23.1 alphas.
* Fixed a rare condition that could allow a <InternalLink version="v23.1" path="transactions">transaction</InternalLink> to get stuck indefinitely waiting on a released row-level <InternalLink version="v23.1" path="architecture/transaction-layer#concurrency-control">lock</InternalLink> if the per-range lock count limit was exceeded while the transaction was waiting on another lock.
* Fixed a rare internal error in the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> that has existed since before version v22.1, which could occur while enforcing orderings between SQL operators.
* Fixed a bug so that the `crdb_internal.deserialize_session` internal function works properly with prepared statements that have more param type hints than params. Before this bugfix, deserializing a <InternalLink version="v23.1" path="show-sessions">session</InternalLink> containing a prepared statement with more parameter type hints than parameters would panic. For example: `PREPARE p (int) AS SELECT 1`. These extra type hints are now ignored by `crdb_internal.deserialize_session`.

### Performance improvements

* Google Cloud Pub/Sub sink <InternalLink version="v23.1" path="create-changefeed">changefeeds</InternalLink> can now support higher throughputs by enabling the `changefeed.new_pubsub_sink_enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. Enabling this setting will cause changefeeds to use a newer Pub/Sub sink, which uses capitalized top-level fields in the message: `{Key:..., Value:..., Topic:...}`. As a result, you may need to reconfigure downstream systems to parse the new message format. If you do not enable `changefeed.new_pubsub_sink_enabled`, the top-level message fields remain all lowercase: `{key:..., value:..., topic:...}`.

### Contributors

This release includes 57 merged PRs by 29 authors.

## v23.1.0-beta.1

Release Date: April 13, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-beta.1 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.linux-amd64.tgz">
          cockroach-v23.1.0-beta.1.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.linux-amd64.tgz">
          cockroach-sql-v23.1.0-beta.1.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.linux-arm64.tgz">
          cockroach-v23.1.0-beta.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.linux-arm64.tgz">
          cockroach-sql-v23.1.0-beta.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-beta.1.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-beta.1.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-beta.1.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-beta.1.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.windows-6.2-amd64.zip">
          cockroach-v23.1.0-beta.1.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-beta.1.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-beta.1.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-beta.1.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-beta.1
```

### Enterprise edition changes

* The <InternalLink version="v23.1" path="changefeed-messages#avro">Avro</InternalLink> schema registry URI now allows an additional `timeout=T` query parameter, which allows you to change the default timeout for contacting the schema registry.

### SQL language changes

* Changed the <InternalLink version="v23.1" path="configure-replication-zones">GC TTL</InternalLink> on the SQL Stats table to 1h on CockroachDB Dedicated and Self-Hosted clusters. This change is not applicable to CockroachDB Serverless clusters.
* When there is no data persisted, show the in-memory data.
* Added two new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> that enable users to change the number of histogram samples and buckets collected when building histograms as part of table statistics collection. While the default values should work for most cases, it may be beneficial to increase the number of samples and buckets for very large tables to avoid creating a histogram that misses important values:
  * `sql.stats.histogram_samples.count`
  * `sql.stats.histogram_buckets.count`
* Added two new table storage parameters, `sql_stats_histogram_buckets_count` and `sql_stats_histogram_samples_count`. These parameters can be used to override the <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> `sql.stats.histogram_buckets.count` and `sql.stats.histogram_samples.count` at the table level, allowing you to change the number of histogram samples and buckets collected when building histograms as part of table statistics collection. While the default values should work for most cases, it may be beneficial to increase the number of samples and buckets for very large tables to avoid creating a histogram that misses important values.

### Operational changes

* Introduced seven new timeseries <InternalLink version="v23.1" path="metrics">metrics</InternalLink> for better visibility into the behavior of storage engine iterators and their internals.
* Added a new <InternalLink version="v23.1" path="metrics">metric</InternalLink> `range.snapshots.delegate.in-progress` and renamed two metrics:
  * `range.snapshot.delegate.successes` -> `range.snapshots.delegate.successes`
  * `range.snapshot.delegate.failures` -> `range.snapshots.delegate.failures`
* Added two new timeseries <InternalLink version="v23.1" path="metrics">metrics</InternalLink>, providing some observability into the volume of keys preserved by open LSM snapshots:
  * `storage.compactions.keys.pinned.count`
  * `storage.compactions.keys.pinned.bytes`

### DB Console changes

* Fixed an issue with properly rendering placeholders on the **Node Map** view for <InternalLink version="v23.1" path="start-a-local-cluster">insecure</InternalLink> clusters.

### Bug fixes

* Fixed a bug which could cause <InternalLink version="v23.1" path="show-cluster-setting">`SHOW CLUSTER SETTING version`</InternalLink> to hang and return an opaque error while cluster finalization is ongoing.
* Fixed a bug that could cause internal errors and corrupt partial indexes when deleting rows with the `DELETE FROM.. USING` syntax. This bug is only present in alpha versions of v23.1.0.
* The <InternalLink version="v23.1" path="ui-hot-ranges-page">**Hot Ranges** page</InternalLink> DB Console page would show hot ranges by CPU and not QPS (queries per second), depending on the value of the `kv.allocator.load_based_rebalancing.objective` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> (default `cpu` ). Now the page will always collect statistics based on QPS.
* In rare cases involving overload and schema changes, users could sometimes, transiently, see errors of the form `deadline below read timestamp is nonsensical; txn has would have no chance to commit`. These errors carried and internal pgcode and could not be retried. This form of error is now classified as a retriable error and will be retried automatically either by the client or internally.
* Fixed a bug in the declarative schema changer in v23.1 where unique without index can be incorrectly added in tables with duplicate values if it was added with a <InternalLink version="v23.1" path="alter-table">`ALTER TABLE... ADD/DROP COLUMN`</InternalLink> in one `ALTER TABLE` statement.
* Fixed an issue where the `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> did not prevent a locality-optimized anti-join from looking up rows in remote regions. This bug is only present in alpha versions of v23.1.0.

### Performance improvements

* Audit logging should no longer incur extra latency when resolving table/view/sequence names.
* The webhook sink is now able to handle a drastically higher maximum throughput by enabling the `changefeed.new_webhook_sink_enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>.

### Contributors

This release includes 116 merged PRs by 44 authors.

## v23.1.0-alpha.9

Release Date: April 4, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.9 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.9.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.9.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.9.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.9.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.9.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.9.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.9.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.9.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.9.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.9.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.9.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.9.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.9
```

### Backward-incompatible changes

* The output of the <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> command for the `crdb_internal.ranges` and `crdb_internal.ranges_no_leases` tables has been updated, and the previous output is deprecated. To enable the new command output, set the `sql.show_ranges_deprecated_behavior.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> to `false`. The new output will become default in v23.2.

### Enterprise edition changes

* The <InternalLink version="v23.1" path="create-changefeed">`CREATE CHANGEFEED`</InternalLink> statement now allows you to limit the nodes that can execute a changefeed by including a locality filter in the `WITH` clause. A node can execute the changefeed only if it was started with a matching [`--locality`](https://cockroachlabs.com/docs/v23.1/cockroach-start#locality) flag. Replace <code>{'{locality}'}</code> with a comma-separated list of key-value pairs.

### SQL language changes

* The new `prepared_statements_cache_size` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> helps to prevent <InternalLink version="v23.1" path="savepoint#savepoints-and-prepared-statements">prepared statement</InternalLink> leaks by automatically deallocating the least-recently-used prepared statements when the cache reaches a given size.

### Operational changes

* The new `COCKROACH_DISABLE_NODE_AND_TENANT_METRIC_LABELS` <InternalLink version="v23.1" path="cockroach-commands#environment-variables">environment variable</InternalLink> allows you to suppress metrics from a cluster's <InternalLink version="v23.1" path="monitoring-and-alerting#prometheus-endpoint">Prometheus endpoint</InternalLink> if they conflict with labels that are applied by external tools that collect metrics from the endpoint. Set the environment variable to a comma-separated list of key-value pairs.

### DB Console changes

* The <InternalLink version="v23.1" path="ui-databases-page#index-details">**Index Details**</InternalLink> section of the **Databases** page now displays the list of most-frequently-used index fingerprints to all users, rather than only to `admin` users, because the page now queries a view rather than a system table directly.
* When you search or filter within the <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> or <InternalLink version="v23.1" path="ui-transactions-page">**Transactions** page</InternalLink>, if you interactively sort the results using a column that was not part of the original query, a warning displays if you are viewing only a subset of the results, along with a suggestion to update the original query.

### Miscellaneous

* Several computed columns have been added to the `statement_statistics_persisted` and `transaction_statistics_persisted` views in the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal`</InternalLink> system catalog and indexed in the corresponding system tables:
  * `execution_count`
  * `service_latency`
  * `cpu_sql_nanos`
  * `contention_time`
  * `total_estimated_execution_time`
  * `p99_latency`

### Bug fixes

* Fixed pagination bugs when searching or filtering within the <InternalLink version="v23.1" path="ui-databases-page">**Databases** page</InternalLink> or viewing the details of a database.
* Fixed a rare bug introduced in v22.2.0 that could cause a node to crash with an `attempting to append refresh spans after the tracked timestamp has moved forward` error when querying virtual tables in the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal`</InternalLink> or <InternalLink version="v23.1" path="pg-catalog">`pg_catalog`</InternalLink> system catalogs. If you are experiencing this bug, set the `sql.distsql.use_streamer.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> to `false` before upgrading a cluster to v23.1.
* Fixed a bug that could erroneously cause multiple garbage-collection jobs to be created when executing a <InternalLink version="v23.1" path="drop-schema">`DROP SCHEMA... CASCADE`</InternalLink> command, one job for each table and one for the cascaded `DROP` itself.
* Fixed a bug in the <InternalLink version="v23.1" path="ui-insights-page#schema-insights-tab">**Insights** page</InternalLink> that prevented a recommendation to drop an index from being executed if the index's name contained a space.
* Fixed a rare bug that prevented the garbage-collection job for a <InternalLink version="v23.1" path="truncate">`TRUNCATE`</InternalLink> command from successfully finishing if the table descriptor had already been garbage-collected. The garbage-collection job now succeeds in this situation.
* Fixed a rare bug that could cause a query of a virtual table in the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal`</InternalLink> or <InternalLink version="v23.1" path="pg-catalog">`pg_catalog`</InternalLink> system catalog to hang indefinitely if the query returned an error.
* Fixed a bug introduced prior to v21.2 that could cause the SQL gateway node to crash if you <InternalLink version="v23.1" path="create-view">created a view</InternalLink> with a circular or self-referencing dependencies. This situation no longer crashes the node, and a `cyclic view dependency for relation` error is now logged.
* Several rare bugs have been fixed that could cause corruption in the existing primary index when a rollback occurs concurrent to adding or removing a <InternalLink version="v23.1" path="column-families">column family</InternalLink>. This could lead to subsequent unavailability of the table.
* Fixed a bug that could cause a node to crash with an out-of-memory (OOM) exception when viewing details in the <InternalLink version="v23.1" path="ui-statements-page">**Statements** page</InternalLink> or <InternalLink version="v23.1" path="ui-transactions-page">**Transactions** page</InternalLink>.

### Contributors

This release includes 75 merged PRs by 41 authors.

## v23.1.0-alpha.8

Release Date: March 27, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.8 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.8.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.8.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.8.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.8.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.8.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.8.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.8.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.8.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.8.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.8.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.8.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.8.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.8
```

### Security updates

* Previously, users could gain unauthorized access to <InternalLink version="v23.1" path="ui-statements-page#diagnostics">statement diagnostic bundles</InternalLink> they did not create if they requested the bundle through an HTTP request to `/_admin/v1/stmtbundle/<id>` and correctly guessed its (non-secret) `ID`. This change ensures that only authorized SQL users can request statement diagnostic bundles.

### General changes

* Increased the specificity of log messages to help troubleshoot <InternalLink version="v23.1" path="sso-db-console">DB Console SSO</InternalLink> issues.

### Enterprise edition changes

* The MuxRangefeed client, which is enabled with the `changefeed.mux_rangefeed.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>, is now more efficient when running against large-scale workloads.
* The `server.oidc_authentication.claim_json_key` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> for DB Console SSO now accepts list-valued token claims.
* Added the `WITH` key\_column option to override the message metadata key for <InternalLink version="v23.1" path="changefeed-examples">changefeeds</InternalLink>. This changes the key hashed to determine Kafka partitions. It does not affect the output of `key_in_value` or the domain of the per-key ordering guarantee.
* The <InternalLink version="v23.1" path="ui-cluster-overview-page#node-map">Node Map</InternalLink> now shows normalized CPU usage.

### SQL language changes

* Fixed a bug where the check constraint on an `OID` type column results in a panic in the legacy schema changer.
* Added a new `WITH REDACT` option to the following statements: <InternalLink version="v23.1" path="show-create">`SHOW CREATE`</InternalLink>, <InternalLink version="v23.1" path="show-create#show-the-create-table-statement-for-a-table">`SHOW CREATE TABLE`</InternalLink>, and <InternalLink version="v23.1" path="show-create#show-the-create-view-statement-for-a-view">`SHOW CREATE VIEW`</InternalLink> which replaces constants and literals in the printed `CREATE` statement with the redacted marker, `‹×›`.
* Added support for the `REDACT` flag to the following variants of <InternalLink version="v23.1" path="explain">`EXPLAIN`</InternalLink>: `EXPLAIN (OPT)`, `EXPLAIN (OPT, CATALOG)`, `EXPLAIN (OPT, MEMO)`, `EXPLAIN (OPT, TYPES)`, and `EXPLAIN (OPT, VERBOSE)`. These `EXPLAIN` statements will have constants, literal values, parameter values, and any other user data redacted in the output.
* Disallowed the <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> of backups taken on a cluster version older than the minimum binary version the current cluster can interoperate with. This is described in an updated version of the policy outlined in <InternalLink version="v23.1" path="restoring-backups-across-versions">"Restoring Backups Across Versions"</InternalLink>.
* Bulk <InternalLink version="v23.1" path="copy">`COPY FROM`</InternalLink> statements are now processed with a vectorized insert and can be anywhere from 0.5x to 5x faster. Typical hardware and schemas should see a 2x improvement. Vectorized inserts are only used for `COPY` statements and are not yet applied to regular inserts. Both the `vectorize` and `copy_fast_path_enabled` session variables can be used to disable this feature.
* Added [stemming and stopword-eliminating](https://www.cockroachlabs.com/blog/full-text-indexing-search) text search configurations for English, Danish, Dutch, Finnish, French, German, Hungarian, Italian, Norwegian, Portuguese, Russian, Spanish, Swedish, and Turkish.
* Added the `system.statement_activity` and `system.transaction_activity` tables. These tables are used to populate the <InternalLink version="v23.1" path="ui-statements-page">SQL Activity</InternalLink> pages, and contain the top N statements and transactions based on different key columns.
* Added helper text for <InternalLink version="v23.1" path="update">`UPDATE`</InternalLink> to include `FROM <source>`.
* Added the `default_text_search_config` variable for compatibility with single-argument variants to the following text search functions: `to_tsvector`, `to_tsquery`, `phraseto_tsquery`, and `plainto_tsquery`, which use the value of `default_text_search_config` instead of expecting one to be included as in the two-argument variants. The default value of this setting is `english`.
* Added the `ts_rank` function for ranking text search query results.
* Renamed the `coordinator_locality` option in `BACKUP` to <InternalLink version="v23.1" path="take-locality-restricted-backups">`EXECUTION LOCALITY`</InternalLink>. This option allows the user to control the nodes involved in the execution of a backup job, including the processing of row data and job coordination. For example, defining an execution locality for a backup job could reduce latency when a cluster is running heavy workloads and has a frequent backup schedule.

### Operational changes

* Checkpoint directories that can be created in the rare event of range inconsistency are now clearly indicated as `pending` until they are fully populated. This helps operators distinguish valid checkpoints from corrupted ones.
* <InternalLink version="v23.1" path="monitor-cockroachdb-with-prometheus">Prometheus</InternalLink>
  metrics available at the `_status/vars` path now contain a `node_id` label that identifies the node they were scraped
  from.

### DB Console changes

* The <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprint-page">Statement & Transaction Fingerprints</InternalLink> pages no longer poll data, to simplify the user experience and reduce any performance impact.
* Data on the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">Statement Fingerprint Details</InternalLink> page no longer updates automatically every 5mins.
* Updated the Jobs table column name from "Last Modified Time" to "Last Execution Time".
* On the <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity Fingerprints</InternalLink> pages, users will not see stats that have not yet been flushed to disk.
* Users can now request `top-k statements by % runtime` on the SQL Activity Fingerprints pages.
* Added Search Criteria to the <InternalLink version="v23.1" path="ui-statements-page">Statements</InternalLink> and <InternalLink version="v23.1" path="ui-transactions-page">Transactions</InternalLink> pages, and updated the UX with improvements.
* Added badges for each selected filter on the <InternalLink version="v23.1" path="ui-overview#sql-activity">SQL Activity</InternalLink> and <InternalLink version="v23.1" path="ui-insights-page">Insights</InternalLink> pages.
* The default request sort for the <InternalLink version="v23.1" path="ui-statements-page#statement-fingerprints-view">Statement Fingerprints Overview</InternalLink> page is now `% of All Runtime`.
* Fixed a bug where the table's `CREATE` statement would not display correctly on the <InternalLink version="v23.1" path="ui-databases-page#table-details">Table Details</InternalLink> page.
* Added an assertion on the KV side to prevent other existing or future attempts of LeafTxn issuing locking requests. This ensures the KV API is used as agreed upon and can be helpful in debugging latency issues caused by holding locks.

### Bug fixes

* Fixed a rare panic in `upstream etcd-io/raft` when a message appends race with log compaction.
* In the DB Console Stats pages, issuing a new request for stats while one is pending is now allowed and will replace the pending request.
* Fixed a bug in which <InternalLink version="v23.1" path="set-vars">`SET avoid_buffering = true`</InternalLink> could produce a crash on subsequent operations.
* Fixed a bug where using <InternalLink version="v23.1" path="functions-and-operators">`ST_Transform`</InternalLink> could result in a memory leak.
* Fixed internal errors in <InternalLink version="v23.1" path="show-jobs">`SHOW JOBS`</InternalLink> statements that have a `WITH` clause.
* Previously, the <InternalLink version="v23.1" path="alter-table#add-column">`ADD COLUMN... DEFAULT cluster_logical_timestamp()`</InternalLink> statement would crash the node and leave the table in a corrupt state. The root cause is a `nil` pointer dereference. The bug is now fixed by returning an unimplemented error and hence disallowing using the <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink> as the default value when backfilling.
* Fixed a bug that could prevent a cached query with a user-defined type reference from being invalidated even after a schema change that should prevent the type from being resolved.
* Fixed a bug that could prevent a cached query from being invalidated when a <InternalLink version="v23.1" path="user-defined-functions">UDF</InternalLink> referenced by that query was altered or dropped.
* Fixed the replacement of in-flight requests for `KeyedCachedDataReducer` s to prevent permanent loading on requests stuck on an `inFlight` status.
* Improved the reliability of latency data in v23.1 clusters.

### Performance improvements

* The Raft tick interval has been increased from `200ms` to `500ms` in order to reduce per-replica CPU costs, and can now be adjusted via `COCKROACH_RAFT_TICK_INTERVAL`. Dependant parameters such as the Raft election timeout ( `COCKROACH_RAFT_ELECTION_TIMEOUT_TICKS` ), reproposal timeout ( `COCKROACH_RAFT_REPROPOSAL_TIMEOUT_TICKS` ), and heartbeat interval ( `COCKROACH_RAFT_HEARTBEAT_INTERVAL_TICKS` ) have been adjusted such that their wall-time value remains the same.
* The Raft scheduler is now sharded to relieve contention during range Raft processing, which can significantly improve performance at high CPU core counts.

### Build changes

* Running `./dev ui test` (or `bazel test //pkg/ui/workspaces/db-console:jest` ) now uses less memory.

### Contributors

This release includes 174 merged PRs by 65 authors. We would like to thank the following contributors from the CockroachDB community:

* Eric.Yang

## v23.1.0-alpha.7

Release Date: March 20, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.7 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.7.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.7.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.7.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.7.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.7.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.7.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.7.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.7.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.7.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.7.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.7.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.7.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.7
```

### Security updates

* The default value for the `server.user_login.password_hashes.default_cost.scram_sha_256` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> is now 10610. (Previously the default was 119680.) The old value was found to have been too high for many types of client hardware, and in some cases could cause regressions in connection latency. The new value was chosen by running tests with clients that have 1 or 2 vCPUs provisioned. Additionally, the new cluster setting `server.user_login.rehash_scram_stored_passwords_on_cost_change.enabled` was added, and defaults to `true`. If it is `true` and the stored SCRAM password for a user has a different cost than the configured default cost, then the next time the user logs in, their password will automatically be rehashed using the configured default cost. If the rehashing is not desired, then operators should update the `server.user_login.password_hashes.default_cost.scram_sha_256` cluster setting to the value they desire before upgrading. This change is being backported to <InternalLink version="v23.1" path="releases/v22.2">v22.2</InternalLink>.

### General changes

* CockroachDB now uses the soft memory limit of Go runtime by default. This feature of Go has been available since v22.2 by setting the `GOMEMLIMIT` environment variable. Now it is enabled by default, which should reduce the likelihood of the CockroachDB process <InternalLink version="v23.1" path="cluster-setup-troubleshooting#out-of-memory-oom-crash">OOMing</InternalLink>. This soft memory limit can be disabled by specifying `--max-go-memory=0` to <InternalLink version="v23.1" path="cockroach-start">`cockroach start`</InternalLink>.
* Previously, the output of <InternalLink version="v23.1" path="show-jobs#show-changefeed-jobs">`SHOW CHANGEFEED JOBS`</InternalLink> was limited to show unfinished jobs and finished jobs from the last 14 days. This change makes the command show all changefeed jobs, regardless of if they finished and when they finished. Note that jobs still obey the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `jobs.retention_time`. Completed jobs older than that time are deleted.

### Enterprise edition changes

* Sinkless <InternalLink version="v23.1" path="create-changefeed">changefeeds</InternalLink> that use the <InternalLink version="v23.1" path="selection-queries">`AS SELECT`</InternalLink> syntax now require an enterprise license.

* <InternalLink version="v23.1" path="create-external-connection">External connections</InternalLink>
  can now be used as the URI value for a Confluent schema registry. For example, `CREATE EXTERNAL CONNECTION reg AS
  "https://example.cloud?opt=val"; CREATE CHANGEFEED FOR foo WITH
  format='avro',confluent_schema_registry='external://reg'`

* <InternalLink version="v23.1" path="create-schedule-for-backup">Backup schedules</InternalLink>
  created or altered to have the option `on_previous_running` will have the full backup schedule created with the user
  specified option, but will override the incremental backup schedule to always default to `on_previous_running = wait`.
  This ensures correctness of the backup chains created by the incremental schedule by preventing duplicate incremental
  jobs from racing against each other.

* <InternalLink version="v23.1" path="changefeed-sinks#kafka">Changefeeds</InternalLink>
  to a Kafka sink now support the `OAUTHBEARER` `sasl_mechanism`.

* <InternalLink version="v23.1" path="changefeed-examples">Changefeeds</InternalLink>
  running with the `changefeed.mux_rangefeed.enabled`
  <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>
  set to `true` are more efficient, particularly when executing against large tables.

### SQL language changes

* A regions field was added to the `statistics` column of <InternalLink version="v23.1" path="crdb-internal#statement_statistics">`crdb_internal.statement_statistics`</InternalLink>, reporting the <InternalLink version="v23.1" path="show-regions">regions</InternalLink> of the nodes on which the statement was executed.
* The `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> was extended with a new optional preview feature and session setting, which is disabled by default, to dynamically detect and report the home region for <InternalLink version="v23.1" path="selection-queries">`SELECT`</InternalLink> queries based on the <InternalLink version="v23.1" path="show-locality">locality</InternalLink> of the queried rows, if different from the region of the <InternalLink version="v23.1" path="ui-sessions-page">gateway node</InternalLink>.
* Added a URL to errors related to the `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> that users can view to see additional information about the error.
* Added a new <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> `enforce_home_region_follower_reads_enabled` as a preview feature to allow errors triggered by the `enforce_home_region` <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> to perform reads using <InternalLink version="v23.1" path="follower-reads">`AS OF SYSTEM TIME follower_read_timestamp()`</InternalLink> in order to find and report a query's <InternalLink version="v23.1" path="multiregion-overview#table-localities">home region</InternalLink>.
* Added a new aggregate <InternalLink version="v23.1" path="functions-and-operators">builtin function</InternalLink> `array_cat_agg`. It behaves similarly to `array_agg(unnest(array_column))`: it takes arrays as its input, unnests them into the array elements which are then aggregated into a single result array. It's similar to concatenating all input arrays into a single array.
* Added a new <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> `optimizer_always_use_histograms`, which ensures that the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> always uses histograms when available to calculate the <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">statistics</InternalLink> of every plan that it explores. Enabling this setting can prevent the optimizer from choosing a suboptimal <InternalLink version="v23.1" path="indexes">index</InternalLink> when statistics for a table are stale.
* Added the `MODIFYSQLCLUSTERSETTING` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system privilege</InternalLink>. This privilege allows users the ability to view all <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink>, but only modify those settings with the `sql.defaults.*` prefix. This re-introduces the modify functionality seen with `MODIFYCLUSTERSETTING` CockroachDB <InternalLink version="v23.1" path="releases/v22.2">v22.2</InternalLink>.
* Added a `status` column to the following <InternalLink version="v23.1" path="crdb-internal">`crdb_internal`</InternalLink> virtual tables: `crdb_internal.cluster_txn_execution_insights` and `crdb_internal.node_txn_execution_insights`.
* Added a new session variable `allow_role_memberships_to_change_during_transaction` which can be used to make the <InternalLink version="v23.1" path="grant">granting</InternalLink> and <InternalLink version="v23.1" path="revoke">revoking</InternalLink> of <InternalLink version="v23.1" path="security-reference/authorization#roles">role memberships</InternalLink> faster at the cost of some <InternalLink version="v23.1" path="architecture/transaction-layer#isolation-levels">isolation</InternalLink> claims. By default, when granting or revoking a role from another role, CockroachDB waits for all <InternalLink version="v23.1" path="transactions">transactions</InternalLink> that are consulting the current set of role memberships to complete. This means that by the time the transaction which performed the grant or revoke operation returns successfully, the user has a proof that no ongoing transaction is relying on the state that existed prior to the change. The downside of this waiting is that it means that `GRANT` and `REVOKE` will take longer than the longest currently executing transaction. In some cases, users do not care about whether concurrent transactions will immediately see the side-effects of the operation, and would instead prefer that the grant or revoke finish rapidly. In order to aid in those cases, the session variable `allow_role_memberships_to_change_during_transaction` has been added. Now, the grant or revoke will only need to wait for the completion of statements in <InternalLink version="v23.1" path="show-sessions">sessions</InternalLink> which do not have this option set. One can set the option as enabled by default in all sessions in order to accelerate and grant and revoke role operations.
* Fixed a bug where CockroachDB panicked when a user tried to <InternalLink version="v23.1" path="truncate">truncate a table</InternalLink> which had an ongoing <InternalLink version="v23.1" path="row-level-ttl">Row-level TTL</InternalLink> change. CockroachDB still does not support truncating a table in this scenario, but instead of panicking an "unimplemented" error is returned.

### Operational changes

* <InternalLink version="v23.1" path="architecture/overview">Range leases</InternalLink>
  will no longer be transferred to
  <InternalLink version="v23.1" path="cockroach-start#store">stores</InternalLink>
  which are IO overloaded.
* The environment variable `COCKROACH_IGNORE_CLUSTER_SETTINGS` can be used to <InternalLink version="v23.1" path="cockroach-start">start a node</InternalLink> so that it ignores all stored <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> values in an emergency.
* Introduce two <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> to control disk utilization thresholds for <InternalLink version="v23.1" path="architecture/replication-layer">replica allocation</InternalLink>: `kv.allocator.rebalance_to_max_disk_utilization_threshold`, which controls the maximum disk utilization before a store will never be used as a rebalance target, and `kv.allocator.max_disk_utilization_threshold`, which controls maximum disk utilization before a store will never be used as a rebalance or allocation target *and* will actively have <InternalLink version="v23.1" path="architecture/overview">replicas</InternalLink> moved off of it.
* The <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `kv.trace.slow_request_stacks.threshold` can be used to attach available stack history from <InternalLink version="v23.1" path="show-trace">tracer snapshots</InternalLink> to traces of <InternalLink version="v23.1" path="logging#sql_perf">slow requests</InternalLink>.
* Added a new <InternalLink version="v23.1" path="metrics">metric</InternalLink> `changefeed.schema_registry.retry_count`. This measures the number of request retries performed when sending requests to the <InternalLink version="v23.1" path="changefeed-examples">changefeed schema registry</InternalLink>. Observing a nonzero value may indicate improper configuration of the schema registry or changefeed parameters.
* The `kv.range_split.load_cpu_threshold` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> now has a minimum setting value of `10ms`.
* The `kv.allocator.lease_io_overload_threshold_enforcement` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> value which disables enforcement is updated to be spelled correctly as "ignore" rather than "ingore".
* The <InternalLink version="v23.1" path="architecture/overview">range lease</InternalLink> duration can now be adjusted via the environment variable `COCKROACH_RANGE_LEASE_DURATION`. Users are advised to exercise caution when adjusting this, and consider the relationship with e.g. <InternalLink version="v23.1" path="architecture/replication-layer#raft">Raft</InternalLink> election timeouts and network timeouts.

### Command-line changes

* <InternalLink version="v23.1" path="cockroach-sql">`cockroach sql`</InternalLink>
  and
  <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink>
  now support the client-side command `\s` to display the previous command history.

* Added a new flag `--max-go-memory` to the <InternalLink version="v23.1" path="cockroach-start">`cockroach start`</InternalLink> command. It controls the soft memory limit on the Go runtime which adjusts the behavior of the Go garbage collector to try keeping the memory usage under the soft memory limit (the limit is "soft" in a sense that it is not enforced if live objects (RSS) exceed it). Similar to the <InternalLink version="v23.1" path="cockroach-start">`--max-sql-memory` flag</InternalLink>, the new flag `--max-go-memory` accepts numbers interpreted as bytes, size suffixes (e.g. `1GB` and `1GiB`) or a percentage of physical memory (e.g. `.25`). If left unspecified, the flag defaults to 2.25x of `--max-sql-memory` (subject to `--max-go-memory + 1.15 x --cache` not exceeding 90% of available RAM). Set to `0` to disable the soft memory limit (not recommended). If the `GOMEMLIMIT` env var is set and `--max-go-memory` is not, then the value from the env var is used; if both are set, then the flag takes precedence.
  * Here are a few examples of how the default value is calculated on a machine with 16GiB of RAM. In the first two lines we use the default formula `2.25x --max-sql-memory`. In the third line, the default formula results in exceeding the upper bound on total usage (including the cache), so we use the upper bound determined as `0.9 * total RAM - 1.15 * cache size`. In the fourth line, the default formula results in 225MiB which is smaller than the lower bound of 256MiB, so we bump the value to that lower bound. In the fifth line, we use the value specified by the user (even though it is smaller than the lower bound on the default value).

    <table>
      <thead>
        <tr>
          <th>Command line flags</th>
          <th>Computed max SQL memory</th>
          <th>Computed cache size</th>
          <th>Computed max Go memory</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>--max-sql-memory=.25 --cache=.25</td>
          <td>4GiB</td>
          <td>4GiB</td>
          <td>9GiB</td>
        </tr>

        <tr>
          <td>--max-sql-memory=.1 --cache=.5</td>
          <td>1.6GiB</td>
          <td>8GiB</td>
          <td>3.6GiB</td>
        </tr>

        <tr>
          <td>--max-sql-memory=.25 --cache=.4</td>
          <td>4GiB</td>
          <td>6.4GiB</td>
          <td>7.04GiB</td>
        </tr>

        <tr>
          <td>--max-sql-memory=100MiB</td>
          <td>100MiB</td>
          <td>128MiB</td>
          <td>256MiB</td>
        </tr>

        <tr>
          <td>--max-sql-memory=.4 --cache=.2 --max-go-memory=100MiB</td>
          <td>6.4GiB</td>
          <td>3.2GiB</td>
          <td>100MiB</td>
        </tr>
      </tbody>
    </table>

* The `--drain-wait` argument to the <InternalLink version="v23.1" path="cockroach-node">`cockroach node drain`</InternalLink> command will be automatically increased if the command detects that it is smaller than the sum of the <InternalLink version="v23.1" path="node-shutdown#cluster-settings">cluster settings</InternalLink> `server.shutdown.drain_wait`, `server.shutdown.connection_wait`, `server.shutdown.query_wait` times two, and `server.shutdown.lease_transfer_wait`. If the `--drain-wait` argument is 0, then no timeout is used. This recommendation <InternalLink version="v23.1" path="node-shutdown#drain-timeout">was already documented</InternalLink>, but now the advice will be applied automatically.

### DB Console changes

* Fixed the error `Cannot read properties of undefined (reading 'length')` which could cause <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> pages to fail to load.
* Added a new metric to the <InternalLink version="v23.1" path="ui-hardware-dashboard">Hardware dashboard</InternalLink> showing the system-wide CPU usage in addition to the existing CockroachDB CPU usage.
* Users will see an upgrade error message when a response from the SQL-over-HTTP API (from `/api/v2/sql/` ) says that a relation or column does not exist.
* The description of the average QPS graph in the <InternalLink version="v23.1" path="ui-replication-dashboard">Replication Metrics Dashboard</InternalLink> no longer claims the average is exponentially weighted.
* The metric `rebalancing.cpunanospersecond` is now included in the <InternalLink version="v23.1" path="ui-replication-dashboard">Replication Metrics Dashboard</InternalLink>.
* Added an error code column to the insights table for a failed execution to the statement and transaction detail views on the <InternalLink version="v23.1" path="ui-insights-page">Insights Page</InternalLink>. Added a status column to the statement and transaction workload insights tables on the <InternalLink version="v23.1" path="ui-insights-page">Insights Page</InternalLink>.

### Bug fixes

* RPC connections between nodes now require RPC connections to be established in both directions, otherwise the connection will be closed. This is done to prevent asymmetric network partitions where nodes are able to send outbound messages but not receive inbound messages, which could result in persistent unavailability. This behavior can be disabled by the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `rpc.dialback.enabled`.
* The owner of the public schema can now be changed using <InternalLink version="v23.1" path="alter-schema">`ALTER SCHEMA public OWNER TO new_owner`</InternalLink>.
* Fixed a bug in which <InternalLink version="v23.1" path="common-table-expressions">common table expressions</InternalLink> (CTEs) marked as `WITH RECURSIVE` which were not actually recursive could return incorrect results. This could happen if the CTE used a `UNION ALL`, because the <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> incorrectly converted the `UNION ALL` to a `UNION`. This bug had existed since support for recursive CTEs was first added in v20.1.
* Internal queries that are executed in order to serve a client-initiated query already appeared in <InternalLink version="v23.1" path="cost-based-optimizer#table-statistics">statistics</InternalLink> with an `application_name` prefixed by the string `$$`. But this name was not used in the output of <InternalLink version="v23.1" path="show-statements">`SHOW QUERIES`</InternalLink>. Now, `SHOW QUERIES` also shows the `$$` prefix for these types of queries.
* Fixed a bug in evaluation of `ANY`, `SOME`, and `ALL` <InternalLink version="v23.1" path="functions-and-operators#operators">sub-operators</InternalLink> that would cause expressions like `NULL = ANY(ARRAY[]::INT[])` to return `NULL` instead of `False`.
* Fixed a bug that could crash the process when a query contained a literal <InternalLink version="v23.1" path="scalar-expressions#tuple-constructors">tuple expression</InternalLink> with more than two elements and only a single label, e.g., `((1, 2, 3) AS foo)`.
* Fixed a bug where certain special character combinations in the <InternalLink version="v23.1" path="connection-parameters#supported-options-parameters">`options` field in connection URLs</InternalLink> were not properly supported by CockroachDB.
* Fixed a bug where the stats columns on the <InternalLink version="v23.1" path="ui-transactions-page#transaction-fingerprints-view">Transaction Fingerprints overview page</InternalLink> was continuously incrementing. The fix was to ensure we don't re-use the stats object between re-renders by creating a new copy of the stats for every aggregation.
* Fixed a bug where <InternalLink version="v23.1" path="transactions">transactions</InternalLink> that performed a <InternalLink version="v23.1" path="select-for-update">`SELECT FOR UPDATE`</InternalLink> across multiple <InternalLink version="v23.1" path="architecture/overview">ranges</InternalLink> but never performed writes could fail to eagerly clean up their <InternalLink version="v23.1" path="architecture/transaction-layer#writing">locks</InternalLink> after commit. Future transactions that encountered these abandoned locks could be delayed for 50ms before unlocking them.
* Fixed a bug which could result in some <InternalLink version="v23.1" path="create-index">`CREATE INDEX`</InternalLink> statements to fail with the error `failed to verify keys for Scan`.
* Fixed a bug where CockroachDB could encounter an internal error `concurrent txn use detected`. The bug was introduced in <InternalLink version="v23.1" path="releases/v22.2">v22.2.0</InternalLink>.
* Fixed a bug where if an <InternalLink version="v23.1" path="update">`UPDATE`</InternalLink> was performed during an on-going <InternalLink version="v23.1" path="alter-table#add-column">`ADD COLUMN`</InternalLink> or <InternalLink version="v23.1" path="alter-table#drop-column">`DROP COLUMN`</InternalLink> on a table, the update could incorrectly fail due to a duplicate key error.
* Fixed a bug where it was possible for CockroachDB to temporarily not respect <InternalLink version="v23.1" path="configure-replication-zones">zone configurations</InternalLink> other than <InternalLink version="v23.1" path="configure-replication-zones#view-the-default-replication-zone">the default zone config</InternalLink>. This could only happen for a short window of a few seconds after nodes with existing <InternalLink version="v23.1" path="architecture/overview">replicas</InternalLink> were <InternalLink version="v23.1" path="cockroach-start">restarted</InternalLink>, and self-rectified (also within seconds).
  * This manifested in a few ways:
  * If <InternalLink version="v23.1" path="configure-replication-zones">`num_replicas`</InternalLink> was set to something other than 3, we would still add or remove replicas to get to 3x replication.
  * If <InternalLink version="v23.1" path="configure-replication-zones">`num_voters`</InternalLink> was set explicitly to get a mix of voting and <InternalLink version="v23.1" path="architecture/replication-layer#non-voting-replicas">non-voting replicas</InternalLink>, it would be ignored. CockroachDB could possibly even remove non-voting replicas.
  * If <InternalLink version="v23.1" path="configure-replication-zones">`range_min_bytes`</InternalLink> or <InternalLink version="v23.1" path="configure-replication-zones">`range_max_bytes`</InternalLink> were changed from their default values of 128 MiB and 512 MiB respectively, we would instead try to size ranges to be within \[128 MiB, 512MiB]. This could appear as an excess amount of <InternalLink version="v23.1" path="architecture/distribution-layer#range-splits">range splits</InternalLink> or <InternalLink version="v23.1" path="architecture/distribution-layer#range-merges">merges</InternalLink>, as visible in the <InternalLink version="v23.1" path="ui-replication-dashboard">Replication Dashboard</InternalLink> under "Range Operations".
  * If <InternalLink version="v23.1" path="configure-replication-zones">`gc.ttlseconds`</InternalLink> was set to something other than the default 90000 seconds (25h), we would still only GC data older than 90000s. If the GC TTL was set to something larger than 25h, <InternalLink version="v23.1" path="as-of-system-time">`AS OF SYSTEM TIME`</InternalLink> queries going further back could start failing. For GC TTLs less than the default, clusters would observe increased disk usage due to more retained <InternalLink version="v23.1" path="performance-recipes#too-many-mvcc-values">MVCC garbage</InternalLink>.
  * If <InternalLink version="v23.1" path="configure-replication-zones">`constraints`</InternalLink>, <InternalLink version="v23.1" path="configure-replication-zones">`lease_preferences`</InternalLink> or <InternalLink version="v23.1" path="configure-replication-zones">`voter_constraints`</InternalLink> were set, they would be ignored. Range data and <InternalLink version="v23.1" path="architecture/glossary">leases</InternalLink> would possibly be moved outside where prescribed.
* Allow users with the `VIEWACTIVITY` / `VIEWACTIVITYREDACTED` <InternalLink version="v23.1" path="security-reference/authorization">permissions</InternalLink> to access the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal.ranges_no_leases`</InternalLink> table, necessary to view important DB Console pages (specifically, the <InternalLink version="v23.1" path="ui-databases-page">Databases Page</InternalLink>, including database details, and database tables).
* Fixed a bug that caused incorrect results when comparisons of <InternalLink version="v23.1" path="scalar-expressions#tuple-constructors">tuples</InternalLink> were done using the `ANY` <InternalLink version="v23.1" path="functions-and-operators#operators">operator</InternalLink>. For example, an expression like `(x, y) = ANY (SELECT a, b FROM t WHERE...)` could return `true` instead of the correct result of `NULL` when `x` and `y` were `NULL`, or `a` and `b` were `NULL`. This could only occur if the <InternalLink version="v23.1" path="subqueries#correlated-subqueries">subquery was correlated</InternalLink>, i.e., it references columns from the outer part of the query. This bug was present since the <InternalLink version="v23.1" path="cost-based-optimizer">cost-based optimizer</InternalLink> was introduced in <InternalLink version="v23.1" path="releases/v2.1">v2.1</InternalLink>.

### Miscellaneous

* Added two views to the <InternalLink version="v23.1" path="crdb-internal">`crdb_internal`</InternalLink> catalog: `crdb_internal.statement_statistics_persisted`, which surfaces data in the persisted `system.statement_statistics` table, and `crdb_internal.transaction_statistics_persisted`, which surfaces the `system.transaction_statistics` table.

### Contributors

This release includes 245 merged PRs by 65 authors.

## v23.1.0-alpha.6

Release Date: March 13, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.6 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.6.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.6.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.6.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.6.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.6.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.6.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.6.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.6.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.6.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.6.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.6.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.6.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.6
```

### SQL language changes

* Previously, an `ALTER TABLE.. ADD UNIQUE.. NOT VALID` statement would be processed by ignoring the `NOT VALID` qualifier. This is not in keeping with PostgreSQL, which would throw an error instead. Now, CockroachDB throws the same error as PostgreSQL for such a statement: "UNIQUE constraints cannot be marked NOT VALID".
* Introduced a new internal virtual table `crdb_internal.node_memory_monitors`, which exposes all of the current reservations with the memory accounting system on a single node. Access to the table requires the `VIEWACTIVITY` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system privilege</InternalLink> (or the legacy `VIEWACTIVITY` <InternalLink version="v23.1" path="security-reference/authorization">role option</InternalLink> ), or the `VIEWACTIVITYREDACTED` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system privilege</InternalLink> (or the legacy `VIEWACTIVITYREDACTED` <InternalLink version="v23.1" path="security-reference/authorization">role option</InternalLink> ) defined.
* Each type cast is now expressible as a function, e.g., `now()::date` can be expressed as `date(now())`.
* Added support for a new syntax to provide options to the <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> statement. The options can now be given in a comma-separated list enclosed by parentheses. The old syntax is still supported.
* Added support for the syntax `CREATE DATABASE IF NOT EXISTS... WITH OWNER`.
* Added a new internal <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink>, `crdb_internal.redactable_sql_constants`, which can be used to redact SQL statements passed in as strings.
* Added an `error_code` column to the `crdb_internal.cluster_execution_insights` and `crdb_internal.node_execution_insights` virtual tables, which contains the error code for a failed execution. Also added a `last_error_code` column to the `crdb_internal.cluster_txn_execution_insights` and `crdb_internal.node_txn_execution_insights` virtual tables, which contains the error code of the last failed statement in that transaction.
* Added a new internal <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink>, `crdb_internal.redact`, which replaces substrings surrounded by redaction markers with the redacted marker.

### Command-line changes

* The <InternalLink version="v23.1" path="cockroach-node">`cockroach node decommission`</InternalLink> operation now validates the ability of the node to complete a decommission before attempting it, given the cluster configuration and the ranges with replicas present on the node. When errors are detected that would result in the inability to complete node decommission, they will be printed to stderr and the command will exit, instead of marking the node as `decommissioning` and beginning the node decommission process. Strict readiness evaluation mode can be used by setting `--checks=strict`. In this case, any ranges that need preliminary actions prior to replacement for the decommission process (e.g., ranges that are not yet fully up-replicated) will block the decommission process. Validation can be skipped by using the flag `--checks=skip`.

### DB Console changes

* Updated the description for <InternalLink version="v23.1" path="ui-insights-page">Suboptimal Insight</InternalLink> and added a **Learn more** link to it.

### Bug fixes

* The unquoted value `none` is now allowed as the value in a <InternalLink version="v23.1" path="set-vars">`SET`</InternalLink> statement.
* `IMPORT INTO... DELIMITED DATA` will now correctly handle quoted fields that contain unescaped newlines.
* Previously, casting an `inet` to a string type omitted the mask if a mask was not provided. This was not in keeping with PostgreSQL and is now resolved.
* Fixed link encoding on links to database/table/index pages.
* Fixed the <InternalLink version="v23.1" path="show-create">`SHOW CREATE ALL {TYPES|SCHEMAS|TABLES}`</InternalLink> commands so they handle database names that have mixed-case, hyphens, or quotes.
* Tables referenced in index recommendations are now fully qualified, ensuring that they are not ambiguous.
* Changed the database used for <InternalLink version="v23.1" path="sql-statements">SQL API</InternalLink> calls, to no longer use `defaultdb`, which was causing error messages on some pages when that database no longer exists.

### Build changes

* Changes to source files in `pkg/ui/workspaces/db-console` now properly bust the build cache, and are consistently included in local builds.

### Contributors

This release includes 69 merged PRs by 39 authors.

## v23.1.0-alpha.5

Release Date: March 6, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.5 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.5.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.5.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.5.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.5.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.5.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.5.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.5.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.5.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.5.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.5.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.5.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.5.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.5
```

### Security updates

* The new <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `server.user_login.downgrade_scram_stored_passwords_to_bcrypt.enabled`, which allows you to migrate passwords from SCRAM to bcrypt during user authentication, defaults to `true`. If it is `true` and if `server.user_login.password_encryption` is `crdb-bcrypt`, then during login, the stored hashed password will be migrated from SCRAM to bcrypt.

### General changes

* Users with the `CONTROLJOB` <InternalLink version="v23.1" path="create-role#role-options">role option</InternalLink> can now <InternalLink version="v23.1" path="show-jobs">view jobs</InternalLink> owned by admins.
* Users with the `VIEWJOB` <InternalLink version="v23.1" path="create-role#role-options">role option</InternalLink> can now <InternalLink version="v23.1" path="show-jobs">view all jobs</InternalLink>. This role can be revoked by granting the `NOVIEWJOB` role option.

### Enterprise edition changes

* Jobs that utilize a protected timestamp system (such as `BACKUP`, `CHANGEFEED`, or `IMPORT` ) now produce metrics that can be monitored to detect cases when a job leaves a stale protected timestamp that will prevent garbage collection from occurring.
* <InternalLink version="v23.1" path="create-changefeed">Changefeeds</InternalLink>
  now automatically expire protected timestamp records for paused jobs if the changefeed is configured with the
  `gc_protect_expires_after` option.
* User-defined functions (UDFs) can now be referenced from column <InternalLink version="v23.1" path="default-value">`DEFAULT`</InternalLink> expressions when creating a new table or issuing the `SET DEFAULT` command. Backup and restore operations also back up and restore UDF IDs that are referenced in a column's DEFAULT expression. If UDF dependencies are missing and the `skip_missing_udfs` flag is provided, the `DEFAULT` expressions are dropped during a restore operation.

### SQL language changes

* String literals are now allowed for region names in DDL syntax, in addition to quoted syntax.
* It is now possible to use `*` inside a <InternalLink version="v23.1" path="create-view">`CREATE VIEW`</InternalLink> statement. The list of columns is expanded at the time the view is created, so that new columns added after the view was defined are not included in the view. This behavior is the same as in PostgreSQL.
* The default value of `sql.stats.cleanup.rows_to_delete_per_txn` has been increased to `10000` to increase efficiency of the cleanup job for SQL statistics.
* The new <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> `optimizer_use_improved_split_disjunction_for_joins` allows the optimizer to split disjunctions ( `OR` expressions) in more `JOIN` conditions by building a `UNION` of two `JOIN` expressions. If this setting is true, all disjunctions in inner, semi, and anti `JOIN` s will be split. Otherwise, only disjunctions that potentially contain an equijoin condition will be split.
* Builtins have been added for `tsvector`, `to_tsquery`, `phraseto_tsquery`, and `plainto_tsquery`, which parse input documents into tsvectors and tsqueries, respectively. The new `ts_parse` builtin is used to debug the text search parser.
* The new <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> `inject_retry_errors_on_commit_enabled` returns a <InternalLink version="v23.1" path="transaction-retry-error-reference">transaction retry error</InternalLink> if it is run inside of an explicit transaction when it is set to `true`. The transaction retry error continues to be returned until `inject_retry_errors_on_commit_enabled` is set to `false`. This setting allows you to test your transaction retry logic.
* Previously, <InternalLink version="v23.1" path="primary-key">`ADD PRIMARY KEY NOT VALID`</InternalLink> ignored the `NOT VALID` qualifier. This behavior was not compatible with PostgreSQL. CockroachDB now throws the error `PRIMARY KEY constraints cannot be marked NOT VALID`.

### Operational changes

* The following <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink>, which control rebalancing and upreplication behavior in the face of IO-overloaded storage, have been deprecated:
  * `kv.allocator.l0_sublevels_threshold`
  * `kv.allocator.l0_sublevels_threshold_enforce` These cluster settings have been replaced by internal mechanisms.
* Max timeout-to-intent resolution has been added to prevent intent resolution from becoming stuck indefinitely and blocking other ranges attempting to resolve intents.
* Nodes are now considered suspect when rejoining a cluster and cannot accept lease transfers for one `server.time_after_store_suspect` window, which defaults to 30 seconds.

### Command-line changes

* The SQL shell ( <InternalLink version="v23.1" path="cockroach-sql">`cockroach sql`</InternalLink>, <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> ) now supports the client-side commands `\l`, `\dn`, `\d`, `\di`, `\dm`, `\ds`, `\dt`, `\dv`, `\dC`, `\dT`, `\dd`, `\dg`, `\du` and `\dd` in a similar manner to PostgreSQL, including the modifier flags `S` and `+`, for convenience for users migrating from PostgreSQL. A notable difference is that when a pattern argument is specified, it should use the SQL `LIKE` syntax (with `%` representing the wildcard character) instead of PostgreSQL's glob-like syntax (with `*` representing wildcards).

### DB Console changes

* The following new metrics track memory usage of prepared statements in sessions:
  * `sql.mem.internal.session.prepared.current`
  * `sql.mem.internal.session.prepared.max-avg`
  * `sql.mem.internal.session.prepared.max-count`
  * `sql.mem.internal.session.prepared.max-max`
  * `sql.mem.internal.session.prepared.max-p50`
  * `sql.mem.internal.session.prepared.max-p75`
  * `sql.mem.internal.session.prepared.max-p90`
  * `sql.mem.internal.session.prepared.max-p99`
  * `sql.mem.internal.session.prepared.max-p99.9`
  * `sql.mem.internal.session.prepared.max-p99.99`
  * `sql.mem.internal.session.prepared.max-p99.999`
  * `sql.mem.sql.session.prepared.current`
  * `sql.mem.sql.session.prepared.max-avg`
  * `sql.mem.sql.session.prepared.max-count`
  * `sql.mem.sql.session.prepared.max-max`
  * `sql.mem.sql.session.prepared.max-p50`
  * `sql.mem.sql.session.prepared.max-p75`
  * `sql.mem.sql.session.prepared.max-p90`
  * `sql.mem.sql.session.prepared.max-p99`
  * `sql.mem.sql.session.prepared.max-p99.9`
  * `sql.mem.sql.session.prepared.max-p99.99`
  * `sql.mem.sql.session.prepared.max-p99.999`

* Active execution information is now shown on the <InternalLink version="v23.1" path="ui-statements-page">Statements page</InternalLink> even when there is a max size limit error.

* "Retrying" is no longer a status shown in the <InternalLink version="v23.1" path="ui-jobs-page">Jobs</InternalLink> page.

### Bug fixes

* Transaction uncertainty intervals are now correctly configured for reverse scans, to prevent reverse scans from serving stale reads when clocks in a cluster are skewed.
* The formatting of uniqueness violation errors now matches the corresponding errors from PostgreSQL.
* Previously, when a new column name would require quoting due to mixed-case or special characters, <InternalLink version="v23.1" path="alter-table#add-column">`ALTER TABLE... ADD COLUMN`</InternalLink> would not run in an explicit or multi-statement transaction. This is now fixed.
* Fixed a bug when formatting <InternalLink version="v23.1" path="create-type">`CREATE TYPE` statements for user-defined types</InternalLink> which require quoting which might prevent those statements from round-tripping.
* Using subqueries in user-defined functions without an `AS` clause is now supported, for consistency with the syntax supported outside of user-defined functions.
* Fixed a rare bug introduced before v22.1.x that could cause a projected expression to replace column references with the wrong values.
* Cross-descriptor validation on lease renewal is now disabled, because it can starve <InternalLink version="v23.1" path="online-schema-changes">online schema changes</InternalLink> when there are many descriptors with many foreign key references.
* Fixed a bug with pagination on the <InternalLink version="v23.1" path="ui-insights-page">Insights</InternalLink> page.
* Columns referenced in partial index predicates and partial unique constraint predicates can no longer be dropped. The <InternalLink version="v23.1" path="alter-table#drop-column">`ALTER TABLE.. DROP COLUMN`</InternalLink> statement now returns an error with a suggestion to drop the indexes and constraints first. This is a temporary safeguard to prevent users from hitting #96924. This restriction will be lifted when that bug is fixed.
* The <InternalLink version="v23.1" path="ui-jobs-page">Jobs</InternalLink> page now displays an error state when an error is encountered during data fetching.
* Fixed a bug introduced in v22.1 that caused the internal error `no bytes in account to release...`.
* The <InternalLink version="v23.1" path="copy">`COPY FROM`</InternalLink> command now respects the `statement_timeout` and `transaction_timeout` <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink>.
* <InternalLink version="v23.1" path="copy">`COPY FROM`</InternalLink>
  commands now appear in the output of the
  <InternalLink version="v23.1" path="show-statements">`SHOW STATEMENTS`</InternalLink>
  command.
* Fixed an error where querying a `pg_catalog` table included information about a temporary table created in another session.

### Performance improvements

* If the <InternalLink version="v23.1" path="set-vars">session setting</InternalLink> `optimizer_use_improved_split_disjunction_for_joins` is `true`, the optimizer now creates a better query plan in some cases where an inner, semi, or anti join contains a join predicate with a disjuction ( `OR` condition).

### Miscellaneous

* UDFs can now return the `RECORD` result type, which represents any tuple. For example, `CREATE FUNCTION f() RETURNS RECORD AS 'SELECT * FROM t' LANGUAGE SQL;` is equivalent to `CREATE FUNCTION f() RETURNS t AS 'SELECT * FROM t' LANGUAGE SQL;`.
* The parameters for <InternalLink version="v23.1" path="architecture/replication-layer#snapshots">delegated snapshots</InternalLink> have been marked as internal.
* Fixed an error when calling <InternalLink version="v23.1" path="create-function">`CREATE OR REPLACE FUNCTION`</InternalLink> with a <InternalLink version="v23.1" path="create-type">user-defined return type</InternalLink> if the user-defined type was modified after the original <InternalLink version="v23.1" path="create-function">user-defined function</InternalLink> was created. The command now succeeds as long as the function body returns output that matches the modified user-defined type.
* Columns with referenced constraints can now be dropped.
* Index cascades with a dependent inbound foreign key can now be dropped.

### Contributors

This release includes 120 merged PRs by 51 authors. We would like to thank the following contributors from the CockroachDB community:

* Eric.Yang (first-time contributor)

## v23.1.0-alpha.4

Release Date: February 27, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.4 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.4.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.4.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.4.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.4.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.4.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.4.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.4.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.4.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.4.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.4.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.4.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.4.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.4
```

### Enterprise edition changes

* Some of the transformations specific to changefeeds have been deprecated and replaced. These functions were released in limited access in v22.2. Deprecated changefeed transformations continue to function. Closely monitor changefeeds that are created during upgrade. While effort was made to maintain backward compatibility, the updated changefeed transformation may produce slightly different output, such as different column names.
* Add support for implicit authentication to Azure Storage and KMS.
* Add support for `CREATE EXTERNAL CONNECTION... AS "postgresql://"` or `"postgres://"`. These external connections may be specified as the source in streaming replication.
* Add support for referencing <InternalLink version="v23.1" path="user-defined-functions">user defined functions (UDFs)</InternalLink> from other objects. Backup and restore operations can now read and write UDF descriptors.

### SQL language changes

* UDFs can now return a set of results by setting the return type to `SETOF`.

* UDFs with implicit record return types will return an error when called if the return type has been altered and is no longer compatible with the body of the UDF.

* The `COPY... TO STDOUT` statement allows you to export a table or arbitrary query in the PostgreSQL wire-compatible format. Text and CSV formats are supported.

* Add the read-only "ssl" session variable. Value is "off" if the server was started in insecure mode (which disables TLS), or "on" otherwise. This is based on the Postgres variable of the same name.

* Add a hard limit of how much data can be flushed to system tables for sql stats.

* Add support for the `REDACT` flag to the following variants of `EXPLAIN`:
  * `EXPLAIN`
  * `EXPLAIN (PLAN)`
  * `EXPLAIN (VEC)`
  * `EXPLAIN ANALYZE`
  * `EXPLAIN ANALYZE (PLAN)`

    These explain statements (along with `EXPLAIN ANALYZE (DEBUG)`, which already supported `REDACT`) will have constants, literal values, parameter values, and any other user data redacted in output.

* Previously UDFs are not allowed in tables and any other object. This patch enables UDF usage in CHECK constraints of tables in both legacy schema changer and delcarative schema changer. Circular ependencies are not allowed, namely if a UDF depends on a table, then the table can't use that UDF.

* A version gate has been added to prevent UDF usage in CHECK constraints before a cluster is fully upgraded to v23.1 or above.

* Previously users were able to use UDFs from tables with `SET DEFAULT` and `SET ON UPDATE` even when they are disallowed from `CREATE TABLE` and `ADD COLUMN`. This patch disallows those two cases from `ALTER TABLE ALTER COLUMN`.

  ### Operational changes

* Add `COCKROACH_RAFT_LOG_QUEUE_CONCURRENCY` env var which controls the number of parallel workers doing Raft log truncations. It can be used to make the in-memory log truncations more agressive and reduce the amount of Raft log data flushed to disk.

* The new timeseries metric `storage.keys.tombstone.count` shows the current count of point and range deletion tombstones across the storage engine.

* The value of `kv.range_split.load_cpu_threshold` controls the CPU per-second threshold above which a range will be split. Its default value has been increased from `250ms` to `500ms`, based on performance experiments.

* CPU balancing is enabled as the default load based rebalancing objective. This can be reverted by setting `kv.allocator.load_based_rebalancing.objective` to `qps`.

### DB Console changes

* Add columns p50, p90, p99, max and min latency for Statement table on SQL Activity page.
* Show a warning for Statement Insights when the SQL API returns a "max size exceed" error.
* Show a warning for Transaction Insights when the SQL API returns a "max size exceed" error.
* Show a warning for Schema Insights when the SQL API returns a "max size exceed" error.

### Bug fixes

* Fixed a bug where the `AS OF SYSTEM TIME` clause was handled incorrectly in an implicit transaction that had multiple statements.
* This patch fixes asymmetric typing of `>` and `<` expressions which may cause erroring of expressions which are legal.
* This patch fixes possible internal errors in `SOME`, `ANY` and `ALL` expressions of the form: `expr > SOME(expr1, expr2, expr3...)`
* Fixed the syntax error for `SELECT... QUERY` (without `AS` ) statement.
* Decommissions that would violate constraints set on a subset of replicas for a range (e.g. `num_replicas = 3, <constraint>: 1` ) will no longer be able to execute, respecting constraints during and after the decommission.
* Adjusted the size reported for `TIME`, `TIMETZ`, `TIMESTAMP`, `TIMESTAMPTZ`, and `DATE` types in the pgwire protocol.
* The ParameterStatus message is now only sent over the pgwire protocol if the value of the parameter changed. (The parameters that are sent this way are timezone, intervalstyle, datestyle, is\_superuser, and application\_name.)
* Users can now go to the next page of results when there are more than 20 active statements or transactions in the Active Execution page.
* Since 22.1 when rangefeed enablement overrides in span configs were introduced, rangefeed requests that reached spans outside the range would not cause range cache invalidation due to the setting being checked first, thus requests could repeatedly hit the same incorrect range, causing errors until cache invalidation or node restart. This fix correctly checks that the span is within the range prior to checking the enablement settings, thus invalidating the cache when a request reaches an incorrect range and causing subsequent requests to successfully reach the correct range.
* A bug has been fixed that caused errors when creating multiple user-defined functions with the same name and different argument types in the same type family. For example, it was impossible to create both functions `f(i INT2)` and `f(INT4)`.
* The following spammy log message was removed: > lease \[...] expired before being followed by lease \[...]; foreground traffic may have been impacted
* Previously, `ALTER TABLE... INJECT STATISTICS` command would fail if a column with COLLATED STRING type had histograms to be injected, and this is now fixed. The bug has been present since at least 21.2.
* Fixed a bug in the query engine that could cause incorrect results in some cases when a zigzag join was planned. The bug could occur when the two indexes used for the zigzag join had a suffix of matching columns but with different directions. For example, planning a zigzag join with `INDEX(a ASC, b ASC)` and `INDEX(c ASC, b DESC)` could cause incorrect results. This bug has existed since at least v19.1. It is now fixed, because the optimizer will no longer plan a zigzag join in such cases.

### Performance improvements

* The optimizer now plans inverted index scans for queries that filter by JSON fetch value operators `(->)` that contain both a string and an integer index value after the IN operator. For example the optimizer plans inverted index scans for the following filters: `json_col->0 IN ('1', '2')`, `json_col->'a' IN ('1', '2')`.

### Build changes

* Starting with CockroachDB v23.1.0-alpha.4, a FIPS compliant tarball and Docker image are produced for the Linux x86\_64 platform. The tarball uses OpenSSL libraries for crypto operations by dynamically loading the corresponding FIPS-validated dynamic libraries. The Docker image comes with the FIPS-validated OpenSSL library pre-installed.

### Miscellaneous

*
* Fix a bug in which `RESTORE`, `BACKUP`, and `IMPORT` jobs would fail if the coordinator node of the job was drained.

### Contributors

This release includes 124 merged PRs by 48 authors. We would like to thank the following contributors from the CockroachDB community:

* DQ (first-time contributor)

## v23.1.0-alpha.3

Release Date: February 21, 2023

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.3 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.3.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.3.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.3.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.3.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.3.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.3.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.3.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.3.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.3.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.3.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.3.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.3.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.3
```

### General changes

* Added new metrics to count <InternalLink version="v23.1" path="pause-job">paused jobs</InternalLink> for every job type. For example, the metric for paused changefeed jobs is `jobs.changefeed.currently_paused`. These metrics are updated at an interval defined by the cluster setting `jobs.metrics.interval.poll`, which defaults to 10 seconds.

### Enterprise edition changes

* Added support for Azure Key Vault KMS, which will allow users to <InternalLink version="v23.1" path="take-and-restore-encrypted-backups#use-key-management-service">encrypt and decrypt their backups</InternalLink> using keys stored in Azure Key Vault. App Registration authentication (Azure RBAC) for Azure Storage is also now supported.
* Introduced a new locality filter option ( `coordinator_locality` ) that can be specified when a <InternalLink version="v23.1" path="backup">backup job</InternalLink> is created. This option restricts the backup metadata writing to the designated nodes.
* Fixed a bug that caused the server to crash if trying to restore a table from a backup generated by `BACKUP TABLE` from a schema that includes <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink>, and the restore target database does not have a schema with the same name.
* Changefeeds with the `unordered` option can use multi-region <InternalLink version="v23.1" path="changefeed-sinks">Google Cloud Pub/Sub topics</InternalLink>.
* Fixed a bug in changefeeds where long running <InternalLink version="v23.1" path="create-changefeed">initial scans</InternalLink> will fail to generate checkpoints. Failure to generate <InternalLink version="v23.1" path="how-does-an-enterprise-changefeed-work">checkpoints</InternalLink> is particularly bad if the changefeed restarts. Without checkpoints, the changefeed will restart from the beginning, and in the worst case, when exporting substantially sized tables, the changefeed initial scan may not complete.

### SQL language changes

* Added <InternalLink version="v23.1" path="cockroachcloud/statements-page#statement-statistics">latency information</InternalLink> in seconds to the statement statistics on `crdb_internal.statement_statistics`, `system.statement_statistics`, and `crdb_internal.cluster_statement_statistics`, with information about: `min`, `max`, `p50`, `p90`, and `p99. Also added the columns:` latency\_seconds\_min `,` latency\_seconds\_max `,` latency\_seconds\_p50 `,` latency\_seconds\_p90 `, and` latency\_seconds\_p99 `to` crdb\_internal.node\_statement\_statistics\`.
* Deprecated the `PGDUMP` and `MYSQLDUMP` formats for <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink>. They are still present, but will be removed in a future release. See the <InternalLink version="v23.1" path="molt/migration-overview">Migration Overview</InternalLink> page for alternatives.
* <InternalLink version="v23.1" path="copy">`COPY... FROM... QUOTE '"'`</InternalLink>
  will no longer error.
* Added `last_error_code` column to the `crdb_internal.node_statement_statistics` table. Added `last_error_code` field to the `statistics` JSON blob in the `crdb_internal.statement_statistics` and `system.statement_statistics` tables.
* Added support for expressions of the form `COLLATE "default"`, `COLLATE "C"`, and `COLLATE "POSIX"`. Since the default <InternalLink version="v23.1" path="collate">collation</InternalLink> cannot be changed currently, these expressions are all equivalent. The expressions are evaluated by treating the input as a normal string, and ignoring the collation. This means that comparisons between strings and collated strings that use `"default"`, `"C"`, or `"POSIX"` are now supported. Creating a column with the `"C"` or `"POSIX"` collations is still not supported.
* The insights subsystem in `sqlstats` is now able to detect failed executions, regardless if they were slow or not.
* The internal `statement_statistics` and `transaction_statistics` tables now include sampled execution statistics on storage iteration.
* Introduced the `declare_cursor_statement_timeout_enabled` <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> that disables statement timeouts during `FETCH` when using `DECLARE CURSOR`.

### Operational changes

* A <InternalLink version="v23.1" path="backup">`BACKUP`</InternalLink> that encounters too many retryable errors will now fail instead of pausing to allow subsequent backups the chance to succeed.
* Added an option to balance CPU time ( `cpu` ) instead of queries per second ( `qps` ) among stores in a cluster. This is done by setting `kv.allocator.load_based_rebalancing.objective='cpu'`. `kv.allocator.cpu_rebalance_threshold` is also added, similar to `kv.allocator.qps_rebalance_threshold` to control the target range for store CPU above and below the cluster mean.
* The <InternalLink version="v23.1" path="load-based-splitting">load-based splitter</InternalLink> now supports using request CPU usage to split ranges. This is introduced with the previous cluster setting `kv.allocator.load_based_rebalancing.objective`, which when set to `cpu`, will use request CPU usage. The threshold above which CPU usage of a range is considered for splitting is defined in the cluster setting `kv.range_split.load_cpu_threshold`, which has a default value of `250ms`.
* Added the flag `--disable-max-offset-check` to disable node self-termination when it detects <InternalLink version="v23.1" path="operational-faqs#what-happens-when-node-clocks-are-not-properly-synchronized">clock skew</InternalLink> with the rest of the cluster beyond `--max-offset`. The operator assumes responsibility for ensuring that real clock skew never exceeds `--max-offset`.

### DB Console changes

* Added execution insights to the <InternalLink version="v23.1" path="cockroachcloud/statements-page#sql-statement-fingerprints">Statement Fingerprint Details</InternalLink> and <InternalLink version="v23.1" path="ui-transactions-page#transaction-fingerprints-view">Transaction Fingerprint Details</InternalLink> pages.
* Transaction insights that were not found will now display a message `Insight not found`.
* Added a waiting statement ID and fingerprint to the <InternalLink version="v23.1" path="ui-insights-page#transaction-executions-view">Insights Transaction</InternalLink> details page. Added a blocking transaction ID and fingerprint to the the <InternalLink version="v23.1" path="ui-insights-page#statement-executions-view">Insights Statement</InternalLink> page.

### Bug fixes

* Fixed a bug where casting a <InternalLink version="v23.1" path="time">`TIMETZ`</InternalLink> to an <InternalLink version="v23.1" path="array">`ARRAY`</InternalLink> results in displaying second offsets, even if they are zero.
* Allowed <InternalLink version="v23.1" path="alter-table">`ALTER TABLE.. ADD/DROP CONSTRAINT.. NOT VALID`</InternalLink> and <InternalLink version="v23.1" path="alter-table#validate-constraints">`VALIDATE CONSTRAINT..`</InternalLink> to behave consistently with PostgreSQL. Previously, the `VALIDATE CONSTRAINT` would fail and cause the whole statement to fail.
* Resolved the <InternalLink version="v23.1" path="timestamp">`TIMESTAMPTZ`</InternalLink> to match PostgreSQL. We previously included the minute/second offset for `TIMESTAMPTZ` in certain places when casting it to <InternalLink version="v23.1" path="string">`STRING`</InternalLink>, even when they were zero.
* Resolved using negative years instead of BC when casting a <InternalLink version="v23.1" path="timestamp">`TIMESTAMPTZ`</InternalLink> to a <InternalLink version="v23.1" path="string">`STRING`</InternalLink>.
* Fixed the <InternalLink version="v23.1" path="show-grants">`SHOW GRANTS FOR public`</InternalLink> command so it works correctly. Previously, this would return an error saying that the `public` role does not exist.
* Statement source (square bracket) syntax is no longer allowed in <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink>. Prior to this fix, using this syntax in a UDF would cause a panic. This restriction will be lifted in the future.

### Performance improvements

* The execution of multiple <InternalLink version="v23.1" path="foreign-key">`FOREIGN KEY`</InternalLink> and <InternalLink version="v23.1" path="unique">`UNIQUE`</InternalLink> constraint checks have been parallelized in some cases. As a result, these checks should be completed faster, particularly in multi-region environments where the checks require cross-region reads.

### Contributors

This release includes 137 merged PRs by 56 authors. We would like to thank the following contributors from the CockroachDB community:

* Ivan Gorbachev (first-time contributor)

## v23.1.0-alpha.2

Release Date: February 13, 2022

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.2 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.2.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.2.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.2.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.2.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.2.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.2.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.2.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.2.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.2.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.2.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.2.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.2
```

### Backward-incompatible changes

* CockroachDB now supports sharing storage ranges across multiple indexes/tables. As a result, there is no longer a guarantee that there is at most one SQL object (e.g., table/index/sequence/materialized view) per storage range. Therefore, the columns `table_id`, `database_name`, `schema_name`, `table_name` and `index_name` in `crdb_internal.ranges` and `.ranges_no_leases` have become nonsensical: a range cannot be attributed to a single table/index anymore. As a result:
  * The aforementioned columns in the `crdb_internal` virtual tables have been removed. Existing code can use the <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> statement instead, optionally using `WITH KEYS` to expose the raw start/end keys.
  * `SHOW RANGES FROM DATABASE` continues to report one row per range, but stops returning the database / schema / table / index name.
  * `SHOW RANGES FROM TABLE` continues to report one row per range, but stops returning the index name. Suggested replacements:
    * Instead of: `SELECT range_id FROM crdb_internal.ranges WHERE table_name = 'x'`, use: `SELECT range_id FROM [SHOW RANGES FROM TABLE x]`
    * Instead of `SELECT range_id FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2` (variable / unpredictable table name or ID), use: `SELECT range_id FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES] WHERE table_name = $1 OR table_id = $2`
    * Instead of `SELECT start_key FROM crdb_internal.ranges WHERE table_name = 'x'`, use: `SELECT raw_start_key FROM [SHOW RANGES FROM TABLE x WITH KEYS]`
    * Instead of `SELECT start_key FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2` (unpredictable / variable table name or ID), use: `SELECT raw_start_key FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES, KEYS] WHERE table_name = $1 OR table_id = $2`
* The format of the columns `start_key` and `end_key` for `SHOW RANGES FROM DATABASE` and `SHOW RANGES FROM TABLE` have been extended to include which table/index the key belongs to. This is necessary because a range can now contain data from more than one table/index.
* The format of the columns `start_key` and `end_key` for `SHOW RANGE... FOR ROW` has been changed to be consistent with the output of `SHOW RANGES FROM INDEX`.
* The output of <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> no longer includes `range_size`, `range_size_mb`, `lease_holder`, or `lease_holder_localities` by default. This ensures that `SHOW RANGES` remains fast in the common case. Use the new option `WITH DETAILS` to include these columns.
* Changefeeds using "preview" expressions (released in v22.2.0) and that access the previous state of the row using the `cdc_prev()` function will no longer work and will need to be recreated with new syntax.
* Fixed a bug where, when `server.identity_map.configuration` was used, CockroachDB did not verify the client-provided username against the target mappings. Note that **this means that the client must now provide a valid DB username.** This requirement is compatible with PostgreSQL; it was not previously required by CockroachDB but it is now. This does not apply when identity maps are not in use.
* Previously, the type of the `replicas`, `voting_replicas`,`non_voting_replicas` and `learner_replicas` in `crdb_internal.ranges` were overridden to `INT2VECTOR` causing incompatible indexing between `.ranges` and `.ranges_no_leases`. Now the types of those columns in the two tables are set to `INT[]`.

### Security updates

* Added an option to re-enable "old" cipher suites for use with very old clients. Fixes [issue #1989](https://github.com/cockroachlabs/support/issues/1989).
* Previously, the `ENCRYPTION_PASSPHRASE` option passed to <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> would appear as 'redacted'. It now appears as '**\*\***' which is consistent with <InternalLink version="v23.1" path="show-backup">`SHOW BACKUP`</InternalLink> and <InternalLink version="v23.1" path="backup">`BACKUP`</InternalLink>.

### General changes

The <InternalLink version="v23.1" path="configure-replication-zones#replication-zone-variables">garbage collection TTL</InternalLink> previously defaulted to `25h`. This value was configurable using `ALTER RANGE DEFAULT CONFIGURE ZONE USING gc.ttlseconds = <value>`, but it was also possible to scope to specific schema objects using `ALTER {DATABASE,TABLE,INDEX} CONFIGURE ZONE USING...`. The GC TTL value determined how long overwritten values were retained before being garbage collected.

With CockroachDB v23.1, the `RANGE DEFAULT` value is lowered to `4h` but only for freshly created clusters. When existing clusters upgrade to this release, CockroachDB will respect whatever value was in use before the upgrade for all schema objects. This value will therefore be `25h` if the GC TTL was never altered, or some specific value if the GC TTL had been set explicitly. Full cluster backups taken on earlier version clusters, when restored to clusters that started off at v23.1, will use the GC TTL recorded in the backup image.

Cockroach Labs has found the `25h` value to translate to higher-than-necessary storage costs, especially for workloads where rows are deleted frequently. It can also make for costlier reads with respect to CPU since we currently have to scan over overwritten values to get to the one of interest. Finally, we've also observed cluster instability due to large unsplittable ranges that have accumulated an excessive amount of MVCC garbage.

We chose a default of `25h` originally to accommodate daily incremental backups with revision history. But with the introduction of scheduled backups introduced in v22.2, we no longer need a large GC TTL. Scheduled backups "chain together" and prevent garbage collection of relevant data to ensure coverage of revision history across backups, decoupling it from whatever value is used for GC TTL. The GC TTL determines how far back `AS OF SYSTEM TIME` queries can go, which now if going past `now()-4h`, will start failing informatively. To support larger windows for `AS OF SYSTEM TIME` queries, users are encouraged to pick a more appropriate GC TTL and set it using `ALTER... CONFIGURE ZONE using gc.ttlseconds = <value>`. The earlier considerations around storage use, read costs, and stability still apply.

### Enterprise edition changes

* The `changefeed.active_protected_timestamps.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> has been removed and is now always treated as if it was `true`.
* Improved <InternalLink version="v23.1" path="cdc-queries">changefeed expressions</InternalLink> logic to rely on the optimizer to evaluate star expansion.
* Changefeed expressions now support system columns.
* Changefeed expressions now have access to the `cdc_prev` tuple which contains the previous state of the row.
* Changefeed expressions now support non-volatile user defined functions (UDFs).
* Changefeed transformations (e.g., `CREATE CHANGEFEED... AS SELECT...` ) no longer require the `schema_change_policy=stop` option.
* Changefeed transformations introduced in the v22.2 release in preview mode are no longer experimental. This feature can now be considered to be fully production-ready.
* The <InternalLink version="v23.1" path="create-external-connection">`CREATE EXTERNAL CONNECTION`</InternalLink> statement now supports URIs with the prefixes `azure`, `gs`, `gcpubsub`, `http`, `https`, `webhook-https`, `nodelocal`, `s3`, and `kafka` for use by changefeeds.
* The `CONTROLCHANGEFEED` <InternalLink version="v23.1" path="alter-role#role-options">role option</InternalLink> will be deprecated in the future (see issue #94757 ). With this change, usages of the `CONTROLCHANGEFEED` role option will come with a deprecation warning. Its existing behavior remains the same. The `SELECT` and `CHANGEFEED` privileges will be used for changefeeds henceforth:
  * The `SELECT` privilege on a set of tables allows a user to run core changefeeds against them.
  * The `CHANGEFEED` privilege on a set of tables allows a user to run enterprise changefeeds on them, and also manage the underlying changefeed job (ie. view, pause, cancel, and resume the job). Notably, a new <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `changefeed.permissions.require_external_connection_sink.enabled` is added and set to `false` by default. Enabling this setting restricts users with `CHANGEFEED` on a set of tables to create enterprise changefeeds into external connections only. To use a given external connection, a user typically needs the `USAGE` privilege on it. Note that `ALTER DEFAULT PRIVILEGES` can be used with both the `CHANGEFEED` and `SELECT` privileges to assign coarse-grained permissions (i.e., assign permissions to all tables in a schema rather than manually assign them for each table).
* Changefeeds created/altered with a `metrics_label` set while `server.child_metrics.enabled` is set to `false` will now provide the user a notice upon creation.
* Fix a bug in <InternalLink version="v23.1" path="alter-changefeed">`ALTER CHANGEFEED`</InternalLink> that would panic when altering changefeeds to remove a table that has already been dropped.
* Reduced the default size of scan RPC replies to improve cluster stability during changefeed accounting for transient memory.
* Changefeed expressions now support the `changefeed_created_timestamp` function.
* Increased the default `changefeed.memory.per_changefeed_limit` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> to `1/2GiB`. This should result in changefeeds being able to produce larger files.
* The `confluent_schema_registry` URI for avro changefeeds now supports `client_cert` and `client_key` parameters.

### SQL language changes

* Added the `pg_get_function_arguments` <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink>. This returns the argument list (with defaults) necessary to identify the function with a given OID.

* Added `voting_replicas` and `non_voting_replicas` columns to the output of `SHOW RANGE` and `SHOW RANGES` statements.

* It is now possible to create and alter <InternalLink version="v23.1" path="create-table#not-visible-property">`NOT VISIBLE`</InternalLink> indexes using the alias `INVISIBLE`. The alias can be used anywhere `NOT VISIBLE` is used when creating or altering indexes. NOTE: the `INVISIBLE` alias is **not supported** for `NOT VISIBLE` columns.

* The `system.table_statistics` table now contains a column called `fullStatisticsID` to store an id referencing the full table statistic the partial statistic was derived from.

* Ordinal column references (e.g., `SELECT @1, @2 FROM t` ) are now deprecated. By default, statements using this syntax will now result in an error. If desired, such statements can be allowed using the session setting `SET allow_ordinal_column_references=true`. Support for ordinal column references is scheduled to be removed in upcoming version v23.2.

* The optimizer will now use table statistics that are merged combinations of the newest partial statistic and latest full statistic collection. And, if forecasting is enabled, the merged statistic will be used in the forecast.

* Added the column `indexes_usage` and the index `indexes_usage_idx` on value on the table `system.statement_statistics`.

* Add the `log_timezone` session variable, which is read-only and always `UTC`.

* Added Two new virtual tables `crdb_internal.index_spans` and `.table_spans`, which list the logical keyspace used by each index/table.

* The following new statements are introduced:
  * `SHOW RANGES FROM CURRENT_CATALOG` and `SHOW RANGES` without a parameter: functions as an alias for `SHOW RANGES FROM DATABASE` on the session's current database.
  * `SHOW RANGES FROM DATABASE... WITH TABLES`: reports at least one row per table. It is possible for the same range ID to be repeated across multiple rows, when a range spans multiple tables.
  * `SHOW RANGES FROM DATABASE... WITH INDEXES`: reports at least one row per index. It is possible for the same range ID to be repeated across multiple rows, when a range spans multiple indexes.
  * `SHOW RANGES FROM TABLE... WITH INDEXES`: reports at least one row per index. It is possible for the same range ID to be repeated across multiple rows, when a range spans multiple indexes.
  * `SHOW CLUSTER RANGES [ WITH { INDEXES | TABLES } ]`: reports ranges across the entire cluster, including ranges that do not contain table data. The behavior of `WITH INDEXES` and `WITH TABLES` is the same as `SHOW RANGES FROM DATABASE`. Additionally, the following new options have been added to the `SHOW RANGES` statement: - `WITH KEYS`: produces the raw bytes of the start/end key boundaries.
  * `WITH DETAILS`: produces more details, using computations that require extra network roundtrips. This option will make the operation slower overall.
  * `WITH EXPLAIN`: produces the text of the SQL query used to run the statement.

* Implemented the `pg_timezone_names` `pg_catalog` table, which lists all supported timezones.

* Improved the performance of trigram operations.

* Previously, CockroachDB would crash if a user creates a <InternalLink version="v23.1" path="user-defined-functions">user-defined function (UDF)</InternalLink> whose function signature includes a implicit record type (essentially a table) which has a column using a user defined enum type. The root cause was a hydration deadloop when looking up descriptors during hydration. This fix adds a new flag to avoid hydration in order to avoid the deadloop.

* Previously, error messages for missing users sometimes had different forms. This is now unified in the form `role/user "user" does not exist`.

* <InternalLink version="v23.1" path="user-defined-functions">User-defined functions (UDFs)</InternalLink>
  with subqueries in the body of the function are now supported.

* Previously, setting a table's locality was not allowed if the table contained any hash sharded index. This restriction is now removed.

* Users can now add a super region when creating a database.

* <InternalLink version="v23.1" path="copy">`COPY`</InternalLink>
  now logs an error during the insert phase on the `SQL_EXEC` logging channel.

* Added a new `REDACT` flag to <InternalLink version="v23.1" path="explain">`EXPLAIN`</InternalLink> which causes constants, literal values, parameter values, and any other user data to be redacted in explain output. Redacted statement diagnostics bundles can now be collected with <InternalLink version="v23.1" path="explain-analyze">`EXPLAIN ANALYZE (DEBUG, REDACT)`</InternalLink>.

* Added two new virtual tables displaying execution insights for transactions:
  * `crdb_internal.cluster_txn_execution_insights`
  * `crdb_internal.node_txn_execution_insights`

* Some queries which previously resulted in the error "could not decorrelate subquery" now succeed.

* If `copy_from_retries_enabled` is set, <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> is now able to retry certain safe circumstances: namely when `copy_from_atomic_enabled` is `false`, there is no transaction running `COPY` and the error returned is retriable. This prevents users who keep running into `TransactionProtoWithRefreshError` from having issues.

* Fixed the databases list API when the database name has special characters.

* The pgwire protocol implementation can now accept arguments of the `JSON[]` type (oid=199). Previously, it could only accept `JSONB[]` (oid=3804). Internally, `JSON[]` and `JSONB[]` values are still identical, so this change only affects how the values are received over the wire protocol.

* CPU time spent during SQL execution is now visible in the output of queries run with <InternalLink version="v23.1" path="explain-analyze">`EXPLAIN ANALYZE`</InternalLink>. This measure does not include CPU time spent while serving KV requests, and CPU time is not shown for queries that perform mutations or for plans that aren't vectorized. This can be useful for diagnosing performance issues and optimizing SQL queries.

* The <InternalLink version="v23.1" path="show-grants">`SHOW GRANTS ON EXTERNAL CONNECTION`</InternalLink> and <InternalLink version="v23.1" path="show-system-grants">`SHOW SYSTEM GRANTS`</InternalLink> statements now use a column name of `privilege_type` rather than `privilege`. For external connections, the `name` column has been changed to `connection_name`. This makes the commands consistent with other `SHOW GRANTS` commands.

* The <InternalLink version="v23.1" path="show-index">`SHOW INDEXES`</InternalLink> statement will now show the expression used to define an index, if one was used.

* It is now possible to run efficient `tsvector @@ tsquery` searches when there is an inverted index on the `tsvector` column being searched.

* Added a `cpuNanos` field to the statistics column of the `crdb_internal.statement_statistics` and `system.statement_statistics` tables that reports the amount of CPU time in nanoseconds during SQL execution for queries that track CPU time.

* Previously, <InternalLink version="v23.1" path="show-backup">`SHOW BACKUP`</InternalLink> options would get parsed as `kv_options`, which meant that a user could not pass multiple values to a `SHOW BACKUP` option, causing feature gaps in `SHOW BACKUP` relative to <InternalLink version="v23.1" path="backup">`BACKUP`</InternalLink> and <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink>. This patch rewrites the show backup option parser, closing the following feature gaps:
  * A user can now pass and check multiple KMS URIs in `SHOW BACKUP`
  * A user can pass locality-aware `incremental_locations`, allowing a user to also pass the `check_files` parameter to a locality-aware backup chain that also specifies the backup incremental location.

* Updated the name of the `cpuNanos` column to `cpuSQLNanos` on `crdb_internal.statement_statistics` and `system.statement_statistics`

* Some queries with `EXISTS` subqueries which previously resulted in the error "could not decorrelate subquery" now succeed.

* Users can query the `crdb_internal.kv_dropped_relation` table to see which tables, materialized views and sequences are currently already dropped but have not yet been garbage collected, along with the garbage collection TTL setting that is currently in force. This setting originates from the table's own zone configuration, or from its parent database which it inherits, or in turn from the default zone configuration. These settings are typically set using `ALTER TABLE... CONFIGURE ZONE USING gc.ttlseconds =...;`.

* Administrators may now call a new <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink> `crdb_internal.upsert_dropped_relation_gc_ttl` to retroactively set the garbage collection TTL on a table, materialized view, or sequence which has already been dropped. Effectively, this retroactively performs `ALTER TABLE... CONFIGURE ZONE USING gc.ttlseconds =...;`. Note that this statement is prevented from being executed on dropped tables because they can no longer be referenced by name at that point. Usage of this built-in is typically in conjunction with the recently-added `crdb_internal.kv_dropped_relations` virtual table. For example, garbage collection can be triggered ASAP for all dropped relations by querying: `SELECT crdb_internal.upsert_dropped_relation_gc_ttl(id, '1 second') FROM crdb_internal.kv_dropped_relations;`. Doing so for all tables in a dropped database requires filtering on the `parent_id` column, the database name being lost at that point.

* Allow `*` expressions in <InternalLink version="v23.1" path="user-defined-functions">user-defined functions (UDFs)</InternalLink>.

* Previously, <InternalLink version="v23.1" path="user-defined-functions">user-defined functions (UDFs)</InternalLink> could be created with any volatility no matter if the function body statements contained any expression which would violate the target volatility. For example, an immutable function might use `random()` in it. This change added validations to guarantee that all statements in the function body should be as strict as the expected UDF volatility.

### Operational changes

* Updated the metrics `queue.gc.info.clearrangesuccess` and `queue.gc.info.clearrangefailed` to include statistics about GC operations that perform `ClearRange` on parts of the range keyspace. Previously those metrics only included requests to remove range data completely when performing a schema change.
* The load-based splitter has been redesigned to be more consistent with CPU-based rebalancing rather than QPS-based rebalancing to improve range splits. This redesign is disabled by default currently.
* The <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `storage.value_blocks.enabled`, when set to `true`, writes the values of older versions of the same key to separate value blocks in the same sstable. For workloads that create many versions, this can improve the performance of reads by increasing locality. It can also help scan performance with single versions due to an optimization that avoids a key comparison (useful if the key are not very short). The default value of this setting is currently `false`.
* The bytes read from SQL clients prior to authentication are now reported via the metric `sql.pre_serve.bytesin`. Previously, this was reported via the `sql.bytesin` metric.
* Transaction errors will contain more detailed information in redacted logs.
* Added the `COCKROACH_RAFT_MAX_INFLIGHT_BYTES` environment variable, which helps strictly limit inflight traffic from a Raft leader to its followers, particularly in situations when many large messages are sent and significantly exceed `COCKROACH_RAFT_MAX_SIZE_PER_MSG * COCKROACH_RAFT_MAX_INFLIGHT_MSGS` which is a softer limit.
* Log messages for write stalls have been adjusted slightly.
* Histogram metrics can now optionally use the legacy `HdrHistogram` model by setting a new environment variable `COCKROACH_ENABLE_HDR_HISTOGRAMS` to `true` on CockroachDB nodes. **Note that this is not recommended** unless users are having difficulties with the newer Prometheus-backed histogram model. Enabling legacy historgrams can cause performance issues with timeseries databases like Prometheus, as processing and storing the increased number of buckets is taxing on both CPU and storage. Note that the legacy `HdrHistogram` model is slated for full deprecation in upcoming releases.
* Prometheus histograms will now export more buckets across the board to improve precision & fidelity of information reported by histogram metrics, such as quantiles. This will lead to an increase in storage requirements to process these histogram metrics in downstream systems like Prometheus, but should still be a marked improvement when compared to the legacy HdrHistogram model. If users have issues with the precision of these bucket boundaries, they can set the environment variable `COCKROACH_ENABLE_HDR_HISTOGRAMS=true` to revert to using the legacy HdrHistogram model instead, although this is not recommended otherwise as the HdrHistogram strains systems like Prometheus with excessive numbers of histogram buckets. Note that HdrHistograms are slated for full deprecation in upcoming releases.
* In the rare event of a range inconsistency, the consistency checker now saves a storage checkpoint on each storage the range belongs to. Previously, this was a full checkpoint, so its cost could quickly escalate on the nodes that went on running. This change makes the checkpoints partial, i.e., they now only contain the relevant range and its neighbors. This eliminates the time pressure on the cluster operator to remove the checkpoints.
* The count of new SQL connections is now also reported on `sql.pre_serve.new_conns`.
* The count of network bytes sent to report re-authentication errors to a SQL client is now reported via the metric `sql.pre_serve.bytesout` (instead of `sql.bytesout` previously). The count of pre-authentication errors is now reported via the metric `sql.pre_serve.conn.failures` (instead of `sql.conn.failures` previously).

### Command-line changes

* The TLS parameters to connect to a <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> cluster from SQL clients have been simplified.

* The password assigned to the `demo` user in <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> can now be overridden by the env var `COCKROACH_DEMO_PASSWORD`. This is meant for use in automated tests, when tests cannot be configured to use TLS client certificate authentication using the client certificates in `$HOME/.cockroach-demo`.

* <InternalLink version="v23.1" path="cockroach-sql">`cockroach sql`</InternalLink>
  and
  <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink>
  now support an `\info` client-side command to print the server details again.

* <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink>
  is now able to preserve open web sessions across restarts of the `cockroach demo` command. The sessions are saved in
  the directory `~/.cockroach-demo` alongside the TLS certificates and keys.

* The file format used for transient loss of quorum recovery files has changed. It is not possible to use replica info files generated by earlier versions to be used with current and future versions.

* Workloads that take a `--seed` argument previously defaulted to `1`. Now, they use a randomly generated seed in each run. Users can still pass a custom seed with the `--seed` flag.

* Added `cpu_time_per_second` to the `hot-ranges.sh` utility `debug zip` script.

### DB Console changes

* Secure clusters now show correct login information in the top right corner.
* The databases filter dropdown in the **Statements** page now uses the `getDatabasesList()` API call, resulting in all cluster databases showing up.
* Added information about the selected plan to the **Explain Plan** tab under **Statement Details**.
* The **Databases** page and the **Databases Details** pages now each contain search and filter components, allowing the ability to search and filter through databases and their tables.
* Graphs can now be clicked on to toggle legend "stickiness" and make the points stop following the mouse. This makes it easier to read dense graphs with many series plotted together.
* The **Statement Fingerprint Details** page in the DB Console no longer infinitely loads after 5 minutes.
* Added a time picker to the **Workload Insights Overview** pages in the DB Console.
* Added all three session status options ( `Active`, `Closed`, and `Idle` ) and an empty results placeholder.
* Added a list of all statement fingerprints that use a given index to the **Index Details page**.
* Removed `reset sql stats` and `reset index stats` from the DB Console when the user is a non-admin.
* Remove `reset sql stats` from the **Transactions** page for non-admins.
* Added an insights type filter for the **Workload Insights** page, and added an execution status filter for the **Active Execution** pages.
* Hid the apply option for index recommendation when the user is not an admin.
* The Database list filter now shows all databases in the cluster on CC console.
* Hid the filter for the **Databases** and **Database Details** pages if both the node and regions dropdowns are also hidden.
* The introduction of the **Key Visualizer** makes it easy to identify historical hotspots. To support this new feature, three new <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> are introduced:
  * `keyvisualizer.enabled`: enables the Key Visualizer.
  * `keyvisualizer.sample_interval`: controls the frequency at which the Key Visualizer collects samples.
  * `keyvisualizer.max_buckets` controls the maximum number of buckets in a sample.
* Added a CPU Time chart to the **Statement Details** page.
* Added CPU time as a column on the **Statement and Transaction** tables.
* Hid the list of used fingerprints per index on the **Index Details** page for non-admin users.
* Added write bytes, write keys, read bytes, read keys and cpu statistics to the `/hotranges` DB Console page. These statistics are the rated average over the last 30 minutes.
* The loading spinner on the **Insights Overview** page now only shows when a request is pending and either the data is nullish or invalid (i.e., a new time range selected).
* Previously, transaction start time for the **Transaction Insights** page was only available for transaction insights with high contention as the issue. This information is now available for all transaction insights: start time, end time, and time elapsed.
* Added search, filter and time picker for the list of most-used statement fingerprints on the **Index Details** page.
* Added CPU Time to the **Statement and Transaction Insights** page.
* Previously, the stale node metrics displayed in the **Cluster Overview Nodes** table may mislead users in to thinking that they are current values when in fact they are stale. Now these metrics are displayed with a stale tag, allowing for users to be informed about the staleness of the data displayed to them regarding dead nodes.

### Bug fixes

* Fixed a bug where the `session_id` session variable would not be properly set if used from a subquery.
* Fixed a bug where CockroachDB could, in rare cases, encounter an internal error when evaluating the `crdb_internal.range_stats` <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink> (which powers the <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> command among other things). The bug was introduced in v22.2.0 and is now fixed.
* Fixed a bug that could prevent `CASE` expressions that used placeholder return values from type-checking correctly.
* Updated the volatility of the `hmac`, `digest`, and `crypt` built-ins to be immutable.
* Server logs are now correctly fsynced at every syncInterval.
* The `stxnamespace`, `stxkind` and `stxstattarget` columns are now defined in `pg_statistics_ext`.
* Fixed a bug where, when experimental MVCC range tombstones are enabled (they are disabled by default), a bulk ingestion (e.g., an `IMPORT` ) could fail to take a committed-but-unresolved write intent into account during conflict checks when written above an MVCC range tombstone. It was therefore possible in very rare circumstances for the ingestion to write a value below the timestamp of the committed intent, causing the ingested value to disappear.
* This patch fixes `JOIN` queries involving tables with unique constraints using `LIMIT`, `GROUP BY`, and `ORDER BY` clauses to ensure that the optimizer considers streaming group-by with no `TopK` operation, when possible. This is often the most efficient query plan.
* Secure clusters now show correct login information in the top right corner.
* Previously, CockroachDB could crash in rare circumstances when evaluating lookup and index joins. The bug has been present since the v22.2.0 release. You can also employ a temporary workaround without upgrading to the release with this fix by changing the value of the undocumented <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.distsql.use_streamer.enabled` to `false`.
* The `CREATE ROLE`, `DELETE ROLE`, `GRANT`, and `REVOKE` statements no longer function when the transaction is in read-only mode.
* Fixed a bug where, when experimental MVCC range tombstones are enabled (they are disabled by default), a bulk ingestion (e.g., an `IMPORT` ) could, in some situations, fail to properly check for conflicts with existing MVCC range tombstones. This could cause the ingestion to write below a recently-written MVCC range tombstone, in turn losing the ingested data. This could only happen in rare circumstances where a bulk ingestion was applied concurrently with an import cancellation.
* Fixed a bug where, in some cases, the start/end key columns of the output of <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES`</InternalLink> was missing.
* Fixed a bug where trigrams ignored unicode (multi-byte) characters from input strings.
* Fixed a bug that could happen when type-checking an array expression that only contains NULLs and placeholder values. The bug was only present in v22.2.1.
* Fixed a bug where tables which receive writes concurrently with portions of an `ALTER TABLE... SET LOCALITY REGIONAL BY ROW` may fail with an error: `duplicate key value violates unique constraint "new_primary_key"`. This bug was introduced in 22.1.
* Fixed a bug where CockroachDB could encounter an internal error when evaluating window functions with `RANGE` window frame mode with an `OFFSET PRECEDING` or `OFFSET FOLLOWING` boundary set when an `ORDER BY` clause has the `NULLS LAST` option set. This will now result in a regular error since the feature is marked as unsupported.
* Previously, CockroachDB could delay the release of the locks acquired when evaluating `SELECT FOR UPDATE` statements in some cases. This delay (up to 5s) could then block future readers. The bug was introduced in 22.2.0, and the temporary workaround without upgrading to a release with this fix is to set the undocumented <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.distsql.use_streamer.enabled` to `false`.
* Record types can now be encoded with the binary encoding of the Postgres wire protocol. Previously, trying to use this encoding could case a panic.
* Fixed a panic that could be caused when using a SQL cursor to access tables in the `crdb_internal` schema.
* Fixed a bug in which `RESTORE SYSTEM USERS` would fail to restore <InternalLink version="v23.1" path="alter-role#role-options">role options</InternalLink>.
* Fixed a crash that could occur on the gateway node when collecting a statement diagnostics bundle (e.g., <InternalLink version="v23.1" path="explain-analyze">`EXPLAIN ANALYZE (DEBUG)`</InternalLink> ) on a statement that fails with certain errors. This crash has existed in various forms since the introduction of statement bundles in v20.1.0.
* Fixed a recursive CTE expressions which cause internal errors when explicit CASTs of initial expressions to output types are missing.
* Previously, certain `GRANT` or `REVOKE` commands on a user which does not exist would error with the correct PG code. This is now fixed.
* The `pg_proc` and `pg_type` virtual OID indexes no longer incorrectly show cross-db objects.
* It is now possible to run `cockroach version` and `cockroach start` (and possibly other sub-commands) when the user running the command does not have permission to access the current working directory.
* It is now possible to use a directory whose name is `"disabled"` via `--external-io-dir`. To actually disable external I/O, use `--external-io-dir=""`.
* This patch fixes an internal error occurring in CASE expressions when a column present in a `THEN` or `ELSE` expression is of an inequivalent type compared to that of a constant this column is compared to in an equality predicate, e.g., `(CASE WHEN false THEN int_col ELSE 1 END) IN (int_col) AND int_col=3/2`.
* The `pronamespace` column of the `pg_proc` table now correctly reports the `crdb_internal` schema for <InternalLink version="v23.1" path="functions-and-operators">built-in functions</InternalLink> that have the "crdb\_internal" prefix.
* In the SQL shell ( <InternalLink version="v23.1" path="cockroach-sql">`cockroach sql`</InternalLink> / <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> ), when using `\c` / `\connect` to connect to a different server, CockroachDB would previously report an error if the new server had a different cluster ID. This has been fixed: this situation is merely a warning.
* When using identity maps (via `server.identity_map.configuration` ), authentication now correctly verifies that the client-provided username matches at least one of the mappings for the system identity. Previously, the client-provided username was incorrectly ignored and authentication could fail if the first candidate mapping did not result in a valid DB username.
* The `prokind` column of `pg_catalog.pg_proc` is now populated properly.
* `pg_catalog.pg_description` and `pg_catalog.obj_description()` are now able to retrieve the descriptive help for <InternalLink version="v23.1" path="functions-and-operators">built-in functions</InternalLink>.
* Fixed a crash that could occur when formatting a tuple with an unknown type.
* Fixed a bug where a DNS lookup was performed during gossip remote forwarding while holding the gossip mutex. This could cause processing stalls if the DNS server was slow to respond.
* Fixed a bug where `CLOSE ALL` would not respect the "ALL" flag and would instead attempt to close a cursor with no name.
* Fixed a bug where default expressions could have a type which differs from the type of the column as long as the expression's type could be cast in an assignment context, which could lead to a panic during a backfill if such a default expression was added to a new column. This bug was introduced in v22.2.0.
* DB Console features that check for the `VIEWACTIVITYREDACTED` privilege now also account for <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system-level privileges</InternalLink>.
* CockroachDB now supports receiving `regXXX` -type values in binary extended protocol.
* Operations like <InternalLink version="v23.1" path="backup">`BACKUP`</InternalLink> can now reuse a previously created AWS KMS client if the client was created with the same parameters. This addresses the `NoCredentialProviders` errors on EC2 for backups with long incremental chains.
* The syntax `EXPLAIN (DDL) COMMENT ON` is now possible.
* Fixed a bug where a database <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> would not grant `CREATE` and `USAGE` on the public schema to the public role.
* Fixed the formatting of JSON values inside of a SQL array so they no longer have improper quoting.
* Fixed a bug which could cause expressions with side-effects (e.g., volatile expressions or data-modifying statements like `INSERT` ) in `NOT MATERIALIZED` CTEs to be executed more than once. This bug was present since `NOT MATERIALIZED` was first supported in version 20.2.0.
* Fixed `pg_get_indexdef` so that it shows the expression used to define an expression-based index. In addition, the function was previously including columns stored by the index, which was incorrect and has now also been fixed.
* Reduced register session, deregister session, and session cancel query contention.
* Fixed a bug that could cause arguments of a <InternalLink version="v23.1" path="functions-and-operators#conditional-and-function-like-operators">`COALESCE`</InternalLink> statement to be evaluated when previous arguments always evaluated to non-NULL values. This bug could cause query errors to originate from arguments of a `COALESCE` that should have never been evaluated.
* Fixed the `array_to_string` <InternalLink version="v23.1" path="functions-and-operators">built-in function</InternalLink> so that nested arrays are traversed without printing 'ARRAY' at each nesting level.
* Fixed a bug where using the <InternalLink version="v23.1" path="copy">`COPY`</InternalLink> statement to copy data into a column with collated strings would result in an error similar to `internal error: unknown type collatedstring`.
* The content of `column_default` in `information_schema.columns` no longer has type annotations.
* Fixed a long-standing bug that caused incorrect parsing of double-quoted identifiers separated by one or more newlines.
* Fixed a rare internal errors in `LATERAL` queries with redundant function calls.
* Fixed an internal error which may occur in the `SHOW RANGE FROM TABLE` statement when the `FOR ROW` clause specifies a `BYTE` literal and the corresponding column data type is `BIT`.
* Fixed an internal errors which may occur on some `AS OF SYSTEM TIME` expressions.
* Fixed a bug where a node with a disk stall would continue to accept new connections and preserve existing connections until the disk stall abated.
* Fixed a bug where a <InternalLink version="v23.1" path="restore">`RESTORE`</InternalLink> flow could hang indefinitely in the face of a context cancellation, manifesting as a stuck restore job.
* Fixed a bug where the `NOSQLLOGIN` <InternalLink version="v23.1" path="security-reference/authorization#supported-privileges">system-level privilege</InternalLink> had a bug that made CockroachDB ignore it entirely, so it had no effect. The bug was introduced in v22.2.0-alpha.1. The `NOSQLLOGIN` <InternalLink version="v23.1" path="alter-role#role-options">role option</InternalLink> is unaffected by this bug.
* The compatibility scalar functions in `information_schema` are now listed in the proper namespace in `pg_catalog.pg_proc`.
* Fixed a bug in which the <InternalLink version="v23.1" path="create-schedule-for-backup">`CREATE SCHEDULE`</InternalLink> statement would not properly handle a placeholder for the `revision_history` option.

### Performance improvements

* The optimizer can now avoid planning a sort in more cases with joins that perform lookups into an index with one or more columns sorted in descending order. This can significantly decrease the number of rows that have to be scanned in order to satisfy a <InternalLink version="v23.1" path="limit-offset">`LIMIT`</InternalLink> clause.
* Significantly reduced CPU usage of the underlying gossip network in large clusters.
* Refactored the query logic when fetching database index recommendations for the `DatabaseDetails` API endpoint, greatly reducing the query time and cost, particularly for large schemas.
* Improved performance when populating `crdb_internal.default_privileges`.
* Some types of <InternalLink version="v23.1" path="user-defined-functions">user-defined functions (UDFs)</InternalLink> are now inlined in query plans as relation expressions, which speeds up their evaluation. UDFs must be non-volatile and have a single statement in the function body to be inlined.
* Improved the performance of `pg_{function,table,type}_is_visible`.
* Long chains of incremental backups and restore of such chains will now allocate less memory during the unmarshaling of metadata.
* Extended the RPC compression encoding with a length prefixing format, allowing more efficient decompression on receivers.
* When planning lookup joins with a <InternalLink version="v23.1" path="limit-offset">`LIMIT`</InternalLink> clause from a `REGIONAL BY ROW` input table, the optimizer will now explore a locality-optimized-search plan of two lookup joins to possibly avoid high latency of reading rows in a remote region.
* Improve the performance of the `SHOW FUNCTIONS` statement.
* Improved the performance of several PostgreSQL compatibility built-ins.
* In some cases, when planning an inverted zigzag join, the optimizer can now detect whether it is necessary to re-apply the filter after the zigzag join. If it is not necessary, the optimizer can produce a more efficient plan.
* Fixed a bug which could lead to very slow drop when tables or views have a very large number of columns (greater than 1000).
* In 22.2, CockroachDB introduced support for `DISCARD TEMP` and made `DISCARD ALL` actually discard temp tables. This implementation ran expensive logic to discover temporary schemas rather than consulting in-memory data structures. As a result, `DISCARD ALL`, which is issued regularly by connection pools, became an expensive operation when it should be cheap. This problem is now resolved.
* In 22.2, logic was added to make `SET SESSION AUTHORIZATION DEFAULT` not a no-op. This implementation used more general code for setting the role for a session which made sure that the role exists. This improves the performance of the `DISCARD ALL` and `SET SESSION AUTHORIZATION DEFAULT` statements.
* The optimizer now plans inverted index scans for queries that filter by JSON fetch value operators ( `->` ) with integer indices, e.g, `json_col->0 = '{"b": "c"}'`.
* The optimizer now plans inverted index scans for queries that filter by JSON fetch value operators ( `->` ) with integer indices alongside the "contains" or the "contained by" operators, e.g, `json_col->0 @> '{"b": "c"}' or json_col->0 <@ '{"b": "c"}'`.
* Added delegated snapshots which can reduce WAN traffic for snapshot movement. If there is another replica for this range with a closer locality than the delegate, the leaseholder will attempt to have that delegate send the snapshot. This is particularly useful in the case of a decommission of a node where most snapshots are transferred to another replica in the same locality.
* The Raft proposal pipeline has been optimized to reduce interference between Raft proposals. This improves average and tail write latency at high concurrency.

### Build changes

* The native binary for Cypress is now only downloaded and installed when UI end-to-end tests are run, instead of eagerly downloading it on all platforms at build-time. This restores the ability for non-\{Windows, Darwin, Linux} platforms like FreeBSD and illumos to build CRDB without modifications, which broke in the initial 22.2 release.
* Required NPM dependencies are now fetched from a Google Cloud Storage bucket managed by Cockroach Labs instead of from a git submodule committed in-tree.

### Contributors

This release includes 820 merged PRs by 95 authors. We would like to thank the following contributors from the CockroachDB community:

* HighPon (first-time contributor)
* Vivian Kong

## v23.1.0-alpha.1

Release Date: December 19, 2022

### Downloads

<Danger>
  CockroachDB v23.1.0-alpha.1 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
</Danger>

<Note>
  Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments,
  whether they are for testing releases or production releases.
</Note>

<table>
  <thead>
    <tr>
      <th>Operating System</th>
      <th>Architecture</th>
      <th>Full executable</th>
      <th>SQL-only executable</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td rowspan="2">Linux</td>
      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.linux-amd64.tgz">
          cockroach-v23.1.0-alpha.1.linux-amd64.tgz
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.linux-amd64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.linux-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.1.linux-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.linux-amd64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.linux-arm64.tgz">
          cockroach-v23.1.0-alpha.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(<a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.linux-arm64.tgz.sha256sum">SHA256</a>
        )
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.linux-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.1.linux-arm64.tgz

          <br />

          (Experimental)
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.linux-arm64.tgz.sha256sum">SHA256</a>)
      </td>
    </tr>

    <tr>
      <td rowspan="2">
        Mac

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.darwin-10.9-amd64.tgz">
          cockroach-v23.1.0-alpha.1.darwin-10.9-amd64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.darwin-10.9-amd64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.darwin-10.9-amd64.tgz">
          cockroach-sql-v23.1.0-alpha.1.darwin-10.9-amd64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.darwin-10.9-amd64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>ARM</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.darwin-11.0-arm64.tgz">
          cockroach-v23.1.0-alpha.1.darwin-11.0-arm64.tgz
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.darwin-11.0-arm64.tgz.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.darwin-11.0-arm64.tgz">
          cockroach-sql-v23.1.0-alpha.1.darwin-11.0-arm64.tgz
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.darwin-11.0-arm64.tgz.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>

    <tr>
      <td>
        Windows

        <br />

        (Experimental)
      </td>

      <td>Intel</td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.windows-6.2-amd64.zip">
          cockroach-v23.1.0-alpha.1.windows-6.2-amd64.zip
        </a>

        <br />(
        <a href="https://binaries.cockroachdb.com/cockroach-v23.1.0-alpha.1.windows-6.2-amd64.zip.sha256sum">SHA256</a>)
      </td>

      <td>
        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.windows-6.2-amd64.zip">
          cockroach-sql-v23.1.0-alpha.1.windows-6.2-amd64.zip
        </a>

        <br />(

        <a href="https://binaries.cockroachdb.com/cockroach-sql-v23.1.0-alpha.1.windows-6.2-amd64.zip.sha256sum">
          SHA256
        </a>

        )
      </td>
    </tr>
  </tbody>
</table>

### Docker image

[Multi-platform images](https://docs.docker.com/build/building/multi-platform) include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

Within the multi-platform image:

* The ARM image is **Experimental** and not yet qualified for production use and not eligible for support or uptime SLA commitments.
* The Intel image is **Generally Available** for production use.

To download the Docker image:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.1
```

### Backward-incompatible changes

* Replaced the `cdc_prev()` <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink> in favor of a `cdc_prev` tuple. This is an incompatible change that may break <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink> that use the previous `cdc_prev()` function.
* <InternalLink version="v23.1" path="show-ranges">`SHOW RANGES FOR TABLE`</InternalLink>
  now includes rows for all indexes that support the table. Prior to this change, `SHOW RANGES FOR TABLE foo` was an
  alias for `SHOW RANGES FOR INDEX foo@primary`. This was causing confusion, as it would miss data for secondary
  indexes. It is still possible to filter to just the primary index using `SHOW RANGES FOR INDEX foo@primary`. The
  statement output now also includes the index name.

### Security updates

* It is now possible to create <InternalLink version="v23.1" path="security-reference/transport-layer-security">TLS client certificates</InternalLink> for identity principals that are not a valid SQL username using <InternalLink version="v23.1" path="cockroach-cert">`cockroach cert create-client`</InternalLink> and the new flag `--disable-username-validation`. This is meant to be used in combination with the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `server.identity_map.configuration` and the `map` option in HBA rules ( `server.host_based_authentication.configuration` ). To test this feature, use `cockroach sql`. Cockroach Labs recommends passing the username separately from the connection URL.
* There is a new SQL <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> `system_identity` defined to contain the identity principal presented by the SQL clients during the initial connection. This may be different from `session_user` when the identity was mapped, either using GSSAPI and `include_realm=0`, or when using an identity map.

### General changes

* Upgraded gRPC to v1.49.0
* The connection timeout for cluster-internal connections between nodes has been reduced to 5s to potentially reduce the impact of network issues. Previously, CockroachDB employed a 20s connection timeout.
* CockroachDB no longer shares a TCP connection for the KV and Gossip subsystems. Each subsystem now uses their own connection, so the total number of outgoing and incoming TCP connections at each node in the cluster will increase by 30 to 50 percent.
* Bulk operations now log the (sanitized) destinations they are connecting to. For example: `backup planning to connect to destination gs://test/backupadhoc?AUTH=specified&CREDENTIALS=redacted`.

### Enterprise edition changes

* <InternalLink version="v23.1" path="show-jobs#show-changefeed-jobs">`SHOW CHANGEFEED JOBS`</InternalLink>
  no longer reveals Confluent schema registry user information, including a user's secret key. This information is now
  redacted, meaning it will not be stored in CockroachDB internal tables at all.

* <InternalLink version="v23.1" path="change-data-capture-overview">Changefeeds</InternalLink>
  JSON encoder performance is improved by 50%.

* Changefeeds, using cloud storage sink, now have better throughput.

* Added the <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `changefeed.event_consumer_workers` which allows changefeeds to process events concurrently.

* Changefeed) exports are up to 25% faster due to uniform work assignment.

* Changefeeds can emit files compressed with the ZSTD algorithm, which provides good compression and is much faster than GZIP. In addition, a new, faster implementation of GZIP is used by default.

* When a changefeed is run with the option `virtual_columns = "null"`, the virtual column will be ordered last in each row.

* For Kafka <InternalLink version="v23.1" path="changefeed-sinks">sinks</InternalLink>, you can now add the optional JSON field `"Compression"` to the `kafka_sink_config` option. This field can be set to `"none"` (default), `"GZIP"`, `"SNAPPY"`, `"LZ4"`, or `"ZSTD"`. Setting this field will result in the specified compression protocol to be used when emitting events.

* Fixed a bug that could cause changefeeds to fail during a rolling restart.

* Changefeeds will now treat all errors, unless otherwise indicated, as retryable errors.

* CockroachDB now supports passing in the optional external ID when <InternalLink version="v23.1" path="cloud-storage-authentication">assuming a role</InternalLink>. This is done by extending the values of the comma-separated string value of the `ASSUME_ROLE` parameter to the format `<role>;external_id=<id>`. Users can still use the previous format of just `<role>` to specify a role without any external ID. When using role chaining, each role in the chain can be associated with a different external ID.

* <InternalLink version="v23.1" path="sso-sql">JWT authentication</InternalLink>
  <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink>
  can now be modified from within tenants to better support serverless use cases.

* <InternalLink version="v23.1" path="cdc-queries">CDC queries</InternalLink>
  are now planned and evaluated using the SQL optimizer and distSQL execution. The state of the previous row is now
  exposed as the `cdc_prev` tuple.

* Changefeeds no longer require the `COCKROACH_EXPERIMENTAL_ENABLE_PER_CHANGEFEED_METRICS` environment variable to be set in order to use the `metrics_label` option.

* Changefeeds can now be scheduled at intervals specified in crontab notation.

### SQL language changes

* Added the `crdb_internal.to_json_as_changefeed_with_flags` <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink> to help debug JSON <InternalLink version="v23.1" path="change-data-capture-overview">changefeeds</InternalLink>.

* Added the `regions` column to the <InternalLink version="v23.1" path="show-backup">`SHOW BACKUP`</InternalLink> command which will output a string of `ALTER DATABASE` commands if the database is a multi-region database and `NULL` for everything else. Previously, the user did not have an easy way to see if a backed up database is multi-region.

* Types with length modifiers can now be used to prefix literals.

* A new column `plan_gist` was added to `crdb_internal.{node,cluster}_queries` representing the compressed logical plan.

* You can generate easy-to-read <InternalLink version="v23.1" path="create-index">`CREATE INDEX`</InternalLink> statements for a table's (secondary) indexes using the `SHOW CREATE INDEXES FROM <table_name>` and `SHOW CREATE SECONDARY INDEXES FROM <table_name>` statements.

* `enum_first`, `enum_last`, and `enum_range` may now take `NULL` arguments as long as their type can be inferred from the expression.

* <InternalLink version="v23.1" path="online-schema-changes">Declarative schema changer</InternalLink>
  support for `ALTER PRIMARY KEY` statements now extends to tables which have secondary indexes.

* The `backup.restore_span.target_size` cluster setting now defaults to `384 MiB`. This should reduce the number of ranges created during <InternalLink version="v23.1" path="restore">restore</InternalLink> and thereby reduce the merging of ranges that needs to occur after the restore.

* The `transaction_timeout` <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> was added. `transaction_timeout` aborts an explicit transaction when it runs longer than the configured duration. When the timer times out, the current statement is cancelled and the transaction enters an aborted state. This timeout does not have any effect when no statement is being executed, so it should be used with `idle_in_transaction_timeout` for the best results.

* The `crdb_internal.check_consistency` <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink> now does not include the diff between inconsistent replicas, should they occur. If an inconsistency occurs, the storage engine checkpoints should be inspected. This change is made because the maximum range size limit has been increased from 64 MiB to 512 MiB, so inlining diffs in consistency checks does not scale.

* CockroachDB now shows a hash-sharded check constraint in <InternalLink version="v23.1" path="show-create">`SHOW CREATE TABLE`</InternalLink> if it is set to `NOT VALID`.

* Added the `SHOW FUNCTIONS` and `SHOW FUNCTIONS FROM <schema>` statements, which list <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink>.

* The default value of `sql.metrics.statement_details.plan_collection.enabled` is now `false`.

* CockroachDB now supports executing statements of the form `DELETE FROM... USING`.

* The <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `sql.ttl.default_range_concurrency` and table storage parameter `ttl_range_concurrency` are no longer configurable.

* CockroachDB drops the associated scheduled incremental backup when <InternalLink version="v23.1" path="drop-schedules">`DROP SCHEDULE`</InternalLink> or `DROP SCHEDULES` is called. Previously, whenever a user dropped a <InternalLink version="v23.1" path="create-schedule-for-backup">scheduled full backup</InternalLink>, the corresponding scheduled incremental backup would not be dropped.

* Added the `sql.auth.change_own_password.enabled` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink>. It defaults to `false`. When set to `true`, any user is allowed to change their own password to a non-null value. Changing other role options still has the same privilege requirements as before (either `CREATEROLE` or `CREATELOGIN`, depending on the option).

* The `sql.distsql.max_running_flows` <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> has been removed.

* The query field in the `crdb_internal.node_queries`, `crdb_internal.cluster_queries`, and `SHOW QUERIES` commands now includes the original comments in the queries.

* Added a new `descriptor_validation` <InternalLink version="v23.1" path="set-vars">session variable</InternalLink> which can be set to `read_only` or `off` to disable descriptor validation, which may be useful when mitigating or recovering from catalog corruption.

* CockroachDB now supports using <InternalLink version="v23.1" path="alter-table#drop-constraint">`DROP CONSTRAINT, ADD CONSTRAINT`</InternalLink> to add a new primary key without moving the existing primary key to a secondary index if the primary key name is a reserved SQL keyword. Previously, a `constraint already exists` error was returned.

* Added the `contention_events` column to the `cluster_execution_insights` table to see which transaction is blocking the specific statement.

* `crdb_internal.scan` and `crdb_internal.list_sql_keys_in_range` return the timestamp for the time at which the value for a key was written, in addition to the raw key and value.

* Previously, the <InternalLink version="v23.1" path="as-of-system-time">`AS OF SYSTEM TIME`</InternalLink> value was set at the start of the TTL job (with a TTL cutoff - 30s), but this results in an error for TTL jobs that run longer than `gc.ttlseconds`: `error selecting rows to delete: ttl select defaultdb.public.events: batch timestamp 1666883527.780656000,0 must be after replica GC threshold 1666883574.542825089,0`. CockroachDB now makes the `AS OF SYSTEM TIME` value relative to when each `SELECT` query is run (query time - 30s) to prevent this error from happening, but each `SELECT` query will run against a different table state. This should be ok because if records are missed during one job invocation they should still be picked up the next.

* The `system.sql_instances` table now includes pre-allocated ID entries, where all the fields except `id` will be `NULL`.

* The `to_char(timestamp, string)` <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink> has been added.

* The `to_char(interval, string)` built-in <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink> has been added.

* The `system.table_statistics` table now contains a column called `partialPredicate` to store a predicate for a partial statistic collection.

* A new `NumericStat`, `idleLat`, was introduced to the statistics column of `crdb_internal.statement_statistics`. This reports the time spent waiting for the client to send the statement while holding a transaction open. Developers may use this stat to identify opportunities for restructuring their apps to reduce contention.

* The set of supported compression algorithms in compress/decompress built-in <InternalLink version="v23.1" path="functions-and-operators">functions</InternalLink> is expanded to include `lz4`, `snappy`, and `zstd`.

* A new column `database` was added to `crdb_internal.{node,cluster}_queries` and list sessions <InternalLink version="v23.1" path="cluster-api">endpoint</InternalLink>.

* Fixed a bug in the legacy schema changer where comments were not dropped together with the database.

* The `round(decimal` ) built-in <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink> no longer returns negative 0 for any input.

* Added an estimate for the number of request units consumed by a query to the output of <InternalLink version="v23.1" path="explain-analyze">`EXPLAIN ANALYZE`</InternalLink> for tenant sessions.

* Enabled forward indexes on arrays.

* Users can now manually create partial single-column statistics at the extreme values on columns that are prefixes of their index. The output of <InternalLink version="v23.1" path="show-statistics">`SHOW STATISTICS`</InternalLink> now includes a column indicating the partial predicate for a partial statistic, or `NULL` for a full statistic.

* A new SQL statement `SHOW COMMIT TIMESTAMP` has been added. This statement can be used to retrieve the commit timestamp of the current explicit transaction, current multi-statement implicit transaction, or previous transaction. The statement may be used in a variety of settings to maximize its utility in the face of connection pooling. When used as a part of an explicit transaction, the statement implicitly commits the transaction internally before being able to return a causality token.

* Added support for the `pg_blocking_pids` built-in <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink>. It is hardcoded to return an empty array because CockroachDB has no equivalent concept of PIDs as in PostgreSQL.

* Added a list of indexes used by the query on the statistics column on the `system.statement_statistics` and `crdb_internal.statement_statistics` tables. The format is `tableID@indexID`.

* Added a list of used indexes (with the format `tableID@indexID` ) to the sampled query telemetry log.

* A new `NumericStat`, `idleLat`, was introduced to the statistics column of `crdb_internal.transaction_statistics`. It reports the time spent waiting for the client to send statements while holding a transaction open.

* Added an in-memory-only evaluation of `tsvector` and `tsquery` datatypes and the `@@` matches operator.

* Implemented the <InternalLink version="v23.1" path="alter-table">`ALTER TABLE... ADD CHECK`</InternalLink> statement in the <InternalLink version="v23.1" path="online-schema-changes">declarative schema changer</InternalLink>.

* `to_char` now has caching for parse formats, marking a speedup when running `to_char` with the same format between sessions.

* Casts from index name to `REGCLASS` are now supported. Previously, only table names could be cast to `REGCLASS`.

* Added user-defined composite column types.

* SQL queries running on remote nodes now show up in CPU profiles with `distsql.*` labels. Currently this includes `appname`, `gateway`, `txn`, and stmt.

* CockroachDB now permits non-indexed storage of `tsvector` and `tsquery` datatypes

* Implemented the `parse_ident` built-in <InternalLink version="v23.1" path="functions-and-operators">function</InternalLink>, which splits a qualified identifier into an array of identifiers, removing any quoting of individual identifiers. By default, extra characters after the last identifier are considered an error; but if the second parameter is `false`, then such extra characters are ignored.

### Operational changes

* Reduced the length of the `raft.process.handleready.latency` metric help text to avoid it being rejected by certain Prometheus services.
* Logs produced by increasing the vmodule setting for `s3_storage` are now directed to the `DEV` channel rather than `STDOUT`.
* Added observability for when load-based splitting cannot find a key to indicate the reasons why the load splitter could not find a split key, which provides more insight into why a range is not splitting easier.
* Added five new fields to the `sampled_query` telemetry events:
  * `ScanCount`: Number of scans in the query plan.
  * `ScanWithStatsCount`: Number of scans using statistics (including forecasted statistics) in the query plan.
  * `ScanWithStatsForecastCount`: Number of scans using forecasted statistics in the query plan.
  * `TotalScanRowsWithoutForecastsEstimate`: Total number of rows read by all scans in the query, as estimated by the optimizer without using forecasts.
  * `NanosSinceStatsForecasted`: The greatest quantity of nanoseconds that have passed since the forecast time (or until the forecast time, if it is in the future, in which case it will be negative) for any table with forecasted stats scanned by this query.
* Added a new debug tool to allow for decrypting files in a store using <InternalLink version="v23.1" path="security-reference/encryption">encryption-at-rest</InternalLink>. This tool is intended for use while debugging, or for providing debug artifacts to Cockroach Labs to aid with support investigations. It is intended to be run "in-situ" (i.e., on site), as it prevents having to move sensitive key material.
* Added a new command that can be used by an operator to list the files present in the <InternalLink version="v23.1" path="security-reference/encryption">encryption-at-rest</InternalLink> file registry.
* Release version binaries can now be instructed via the enviroment variable `COCKROACH_FORCE_DEV_VERSION` to override their cluster version support to match that of development builds, which can allow a release binary to be started in a cluster that is run (or has previously run) a development build.
* The consistency check failure message is now more informative, and suggests a few actions that operators should perform in the unlikely event a failure occurs.
* Updated metric descriptions of `rebalancing.*` to include the recording period.
* CockroachDB now prioritizes non-voters in voter additions, meaning that when selecting a store to add a voter on (in the allocator), CockroachDB will prioritize candidate stores that contain a non-voter replica higher. This reduces the number of snapshots that need to be sent over the WAN.
* CockroachDB now uses response data rather than just the request span in the <InternalLink version="v23.1" path="load-based-splitting">load-based splitter</InternalLink> to pass more accurate data about the keys iterated over to the load splitter to find a suitable split key, enabling the load splitter to find a split key under heavy range query workloads.
* Added the `replicas.leaders_invalid_lease` metric, which indicates how many replicas are Raft group leaders but holding invalid leases.
* The <InternalLink version="v23.1" path="cluster-settings">cluster settings</InternalLink> `server.web_session.purge.period` and `server.web_session.purge.max_deletions_per_cycle`, which were specific to the cleanup function for `system.web_sessions`, have been replaced by `server.log_gc.period` and `server.log_gc.max_deletions_per_cycle` which apply to the cleanup function for `system.eventlog`, `system.rangelog` and `system.web_sessions` equally.
* The <InternalLink version="v23.1" path="cluster-settings">cluster setting</InternalLink> `server.web_session.auto_logout.timeout` has been removed.
* Splunk dashboard templates are available in the public repository under `/monitoring/splunk-dashboard/`.
* The network timeout for RPC connections between cluster nodes has been reduced from 3 seconds to 2 seconds, with a connection timeout of 4 seconds, in order to reduce unavailability and tail latencies during infrastructure outages. This can now be changed by setting the `COCKROACH_NETWORK_TIMEOUT` environment variable, which defaults to `2s`.
* The Raft election timeout has been reduced from 3 seconds to 2 seconds, and the lease interval from 9 seconds to 6 seconds, with a corresponding reduction in the node heartbeat interval from 4.5 seconds to 3 seconds. This reduces the period of unavailability following leaseholder loss, but places tighter restrictions on network latencies (no more than 500ms roundtrip time). This can be adjusted by setting the `COCKROACH_RAFT_ELECTION_TIMEOUT_TICKS` environment variable, which now defaults to 10 and will scale all of these intervals proportionally.
* The RPC heartbeat and gRPC keepalive ping intervals have been reduced to 1 second to detect failures faster. This is adjustable via the new `COCKROACH_PING_INTERVAL` environment variable. The timeouts remain unchanged.

### Command-line changes

* The interactive <InternalLink version="v23.1" path="cockroach-sql">SQL shell</InternalLink> now retains a maximum of 1000 entries. There was no limit previously.
* The deprecated CLI command `debug unsafe-remove-dead-replicas` has been removed. Use `debug recover` instead.
* The `\df` metacommand was added to the <InternalLink version="v23.1" path="cockroach-sql">SQL shell</InternalLink>, which will list all <InternalLink version="v23.1" path="user-defined-functions">user-defined functions</InternalLink> in the current database.
* In the <InternalLink version="v23.1" path="cockroach-workload#kv-workload">`kv` workload</InternalLink>, you can now enable `--splits` with the `--sequential` flag and adjust splitting to uniformly partition the keyspace.
* Added the `--insert-count` flag to insert rows before the <InternalLink version="v23.1" path="cockroach-workload#kv-workload">`kv` workload</InternalLink> begins.
* CockroachDB will now include recommended remediation actions alongside log messages for some errors.
* The input syntax of `\set` is now more flexible: it is now more accepting of space characters in various positions of the syntax and it supports quoted values, e.g., via `\set prompt1 "a b c"`.
* <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo --global`</InternalLink>
  will now start up more quickly. The latency that will be injected will not be injected until after the initial cluster
  is set up internally.
* The engine used as line editor in the interactive shell ( <InternalLink version="v23.1" path="cockroach-sql">`cockroach sql`</InternalLink> and <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> ) has been updated. It includes numerous bug fixes and new features. The previous engine can still be accessed by setting the `COCKROACH_SQL_FORCE_LIBEDIT` environment variable to true. This support will be removed in a later version.
* The interactive <InternalLink version="v23.1" path="cockroach-sql">SQL shell</InternalLink> now supports an advanced debug mode for troubleshooting when `--debug-sql-cli` is specified on the command line. The debug mode can be enabled with Ctrl+@ or Ctrl+\_ (Ctrl+space on macOS).
* The following fields have been redacted and were added to the redacted debug zip:
  * `crdb_internal.create_statements`:
    * `create_statement`
      * `create_nofks`
    * `alter_statements` (each element is redacted)
  * `crdb_internal.create_function_statements`:
    * c `reate_statement`
  * `crdb_internal.{node,cluster}_distsql_flows`:
    * `stmt`
  * `crdb_internal.{cluster,node}_sessions`:
    * `last_active`
    * `active_queries`
  * `crdb_internal.{cluster,node}_queries`:
    * `query`
* The interactive <InternalLink version="v23.1" path="cockroach-sql">SQL shell</InternalLink> now supports a rudimentary form of tab completion to input the name of SQL objects and functions.
* The command-line flag `--empty` to <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink> is not marked as deprecated anymore; it is more convenient than `--no-example-database`. However, the latter remains supported as an alias.
* The command-line flags `--logtostderr`, `--log-file-verbosity`, `--no-color`, `--redactable-logs`, `--log-file-max-size`, `--log-group-max-size`, `--log-dir`, `--sql-audit-dir` are not marked as deprecated anymore; instead, they are defined as convenience aliases for various `--log` specifications.
* <InternalLink version="v23.1" path="cockroach-demo">`cockroach demo`</InternalLink>
  now supports `--pid-file` for symmetry with
  <InternalLink version="v23.1" path="cockroach-start">`cockroach start`</InternalLink>
  .
* The debug utility script `hot-ranges.sh` partitions output by statistics: `queries_per_second`, `writes_per_second`, `read_bytes_per_second`, `write_bytes_per_second`. It also decreased the number of ranges shown under each heading from 20 to 10.

### DB Console changes

* The High Contention Time insight description now accurately reflects the event's contention duration in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink>.
* **Overview** and **Explain Plan** tabs were added to the **Active Statement Details** page.
* The **Apply** button was added on the **Table Details** page ( <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> only) when there is a recommendation to drop an unused index.
* **Overview** and **Explain Plan** tabs were added to the **Statement Insight Details** page.
* The <InternalLink version="v23.1" path="ui-jobs-page">Jobs Page</InternalLink> now includes a column picker.
* The fingerprint ID values for statements and transactions on the <InternalLink version="v23.1" path="ui-insights-page">Insights</InternalLink> pages are links that open the respective details page on the time period of the execution of that statement or transaction.
* Requests to fetch table and database statistics now have limited concurrency. This may make loading the <InternalLink version="v23.1" path="ui-databases-page">Databases</InternalLink> page slower, but in return should result in making those pages less disruptive.
* The **Transaction** filter label on the **SQL Activity** page was fixed.
* The metric graph tooltip styling was fixed to prevent content collapse.
* Index recommendations were added to the **Statement Active Execution Details** page, and the plan gist was added as the first line of the explain plan.
* Transaction insights pages now show insights about slow execution with unknown causes, index recommendations, and failed executions. The following fields have also been added on the **Details** page, but are not available for transactions where the insight is "High Contention" (i.e., user name, session ID, rows processed, rows read, rows written, retries, last retry reason, full scan, and transaction priority).
* The fingerprint ID in hex format was added to the **Statement Details** page and **Transaction Details** page.
* The contention time, schema, database, table, and index info was added to the **Insights Statement Details** page.
* The query column in the insight recommendations table was removed. Instead, the statement is included in the description if the transaction being reported has multiple statements.
* Graphs on the **Metrics** page now downsample using max value instead of average. Previously, zooming out on a graph would cause any spikes in the graph to smooth out, potentially hiding anomalies. These anomalies are now visible even when looking at a zoomed out interval.
* The **Statement Execution** and **Planning Time** chart on the **Statement Fingerprint** page now includes a third value ("Idle") representing the time spent by the application waiting to execute this statement while holding a transaction open.
* A list of used index per explain plan was added, under the **Explain Plan** tab on the **Statement Details** page, with links to the table or index details pages.
* The <InternalLink version="v23.1" path="ui-insights-page">Insights</InternalLink> pages in the <InternalLink version="v23.1" path="ui-overview">DB Console</InternalLink> now show the seconds and milliseconds for all timestamp values.
* Links were added on the fingerprint ID in the **High Contention** table on the **Transaction Insights Details** page.
* The following new charts were added to the Metrics page, under SQL view: **Service Latency: SQL Statements, 99.9th percentile** and **Service Latency: SQL Statements, 99.99th percentile**.
* Renamed the chart on the **Statement Details** page from **Statement Execution and Planning Time** to **Statement Times**.
* The **Transaction resource usage** card on the **Transaction Fingerprin** t page now includes an "Idle latency" row, representing the time spent by the application performing other work while holding this transaction open.
* The **Databases table** page now displays all the grants in a single row per user.
* Added a goroutine scheduling latency graph to the **Overload** dashboard in the DB Console. It shows what the per-node p99 scheduling latency is for goroutines.
* CockroachDB now prevents polling `/settings`, `/nodes_ui,` and `/cluster` endpoints on incorrect login.
* The **Statement** and **Transaction** pages for tenant clusters gained region columns and filters for multi-region tenants.

### Bug fixes

* The flag `--sql-advertise-addr` now properly works even when the SQL and RPC ports are shared (because `--sql-addr` was not specified). Note that this port sharing is a deprecated feature in v22.2.
* Fixed a bug introduced in v21.2 that could cause an internal error in rare cases when a query required a constrained index scan to return results in order.
* Fixed a bug that existed from before v21.1 that could cause an internal error when executing a query with a limit ordering on the output of a window function.
* Fixed an incorrect default value of `cloudstorage.gs.chunking.retry_timeout` to 60 seconds
* Fixed a bug in `pg_catalog` tables that could result in an internal error if a schema is concurrently dropped.
* Fixed a bug that caused `ALTER CHANGEFEED` to fail if the changefeed was created with a cursor option and had been running for more than `gc.ttlseconds`.
* Fixed a bug that could cause a panic when running a query with `EXPLAIN` that attempts to order on a non-output column.
* Fixed missing automatic statistics collection at cluster startup when the `sql.stats.automatic_collection.enabled` cluster setting is false, but there are tables with the storage parameter `sql_stats_automatic_collection_enabled` set to true.
* Fixes an issue where when a statement bundle was collected for a query that results in an error due to a `statement_timeout`, the bundle would not be saved.
* CockroachDB now excludes check constraints of hash-shared indexes from being invalidated when executing `IMPORT INTO`.
* CockroachDB now flushes WAL when writing storage checkpoints on consistency checker failures.
* Fixed optimizer selectivity and cost estimates of zigzag joins in order to prevent query plans from using it when it would perform poorly (e.g., when many rows are qualified).
* Changefeeds will now never permanently error on a "failed to send RPC" error.
* Fixed a bug that could occur when dropping a role that owned two schemas with the same name in different databases. The bug was introduced in v22.1.0.
* CockroachDB now avoids a source of internal connectivity problems that would resolve after restarting the affected node.
* CockroachDB now shows the correct value on table stats on UI, when there are no values to show.
* Charts on the **Statement Details** page in the DB Console are no longer overlapping.
* It is now possible to create tables, views, columns, etc. with the name `nothing` (e.g., `CREATE TABLE nothing...` ) without having to quote the name, like in PostgreSQL. This bug was introduced in CockroachDB v2.0.
* Fixed detection and erroring out of queries using locality-optimized joins when the session setting `enforce_home_region` is true and the input table to the join has no home region or its home region does not match the gateway region.
* Fixed an issue with the `enforce_home_region` session setting which may cause `SHOW CREATE TABLE` or other non-DML statements to error out if the optimizer plan for the statement involves accessing a multi-region table.
* Fixed a bug in `changefeed.batch_reduction_retry` which resulted in only a single level of retry being able to occur.
* During JWT based auth, CockroachDB now infers the algorithm type if it is not specified by the JWKS. This enables support for a wider range of keys.
* Fixed an extremely rare out of bounds crash in the protected timestamp subsystem.
* Fixed the calculation of the `pg_attribute.attnum` column for indexes so that the `attnum` is always based on the order the column appears in the index. Also fixed the `pg_attribute` table so that it includes stored columns in secondary indexes.
* Fixed a bug in the DB Console where when the height of the filter was big, you had to scroll to get to the **Apply** button.
* Fixed a bug in the DB Console to now send the proper start and end values to the endpoint used on the **SQL Activity** page so it returns the full hour as described on the UI.
* Fixed a rare bug where concurrent follower read/split operations could lead to invalid read results.
* Fixed a bug that could cause `UPDATE.. FROM` clauses to update the same row multiple times, resulting in incorrect `UPDATED` row counts and duplicate output rows for statements with a `RETURNING` clause. The bug only appeared when the target table had a hidden primary key column (e.g., an implicit `rowid` primary key column). The bug has been present since support for `UPDATE.. FROM` was added in v19.0.
* Protected timestamps are now created during index validation. Before, index validation could be starved if it took longer than any GC jobs for a given table.
* Fixed a bug where `SELECT *` operations on tables with virtual computed columns undergoing schema changes could potentially fail.
* Fixed a bug where in large, multi-region clusters it was possible for the leasing mechanism used for jobs to get caught in a live-lock scenario whereby jobs could not be adopted.
* CockroachDB now ensures changefeeds shut down when one of the aggregator nodes returns an error.
* Fixed a bug the occurred when attempting to reduce the size of a fixed-size `VARCHAR` column.
* Fixed a bug that caused ranges to remain without a leaseholder in cases of asymmetric network partitions.
* Fixed a bug that would prevent data from a failed restore from being cleaned up quickly.
* Fixed a bug which, in rare cases, could result in a changefeed missing rows which occur around the time of a split in writing transactions which take longer than the closed timestamp target duration (defaults to 3s).
* Fixed a bug where point lookups on the `pg_catalog.pg_type` table would fail to find the implicit record type that gets created for tables in the `pg_catalog`, `information_schema`, and `crdb_internal` schemas.
* Fixed a bug that prevented the usage of implicit record types for tables in the `pg_catalog`, `information_schema`, and `crdb_internal` schemas.
* Fixed a bug that could result in transient errors when dropping a database and immediately recreating a database with the same name and connecting to it for use.
* Fixes a bug that resulted in the regions listed for databases and tables including an incorrect list of regions due to the logic including information about tables which are adjacent in the keyspace.
* Fixed a bug where the experimental `scrub` command did not handle type descriptors in the database.
* Fixed a panic that could occur when calling `st_distancespheroid` or `st_distancesphere` with a spatial object containing an `NaN` coordinate. This now produces an error, with the message "input is out of range".
* Fixed a bug that could result in infrequent progress updates for very large backup or restore jobs.
* Added leading zeros to fingerprint IDs with less than 16 characters.
* Fixed a bug causing changefeeds to fail when a value is deleted while running on a non-primary column family with multiple columns.
* Fixed a bug that existed since before v21.1 where the `cgroup` memory limit was undetected when using `systemd`.
* Fixed a bug that existed since v20.2 that could cause incorrect results in rare cases for queries with inner joins and left joins.
* Fixed an unhandled error that could happen if `ALTER DEFAULT PRIVILEGES` was run on the system database.
* CockroachDB now prevents schema changes on the `crdb_internal_expiration` table.
* When configured to true, the `sql.metrics.statement_details.dump_to_logs` cluster setting no longer causes a mutex deadlock.
* Fixed a bug that could lead to errors when running multiple schema change statements in a single command using a driver that uses the extended pgwire protocol internally (for example the Npgsql C# driver). The error messages was "attempted to update job for mutation 2, but job already exists with mutation 1".
* Fixed the **Statement Activity** page so that it no longer shows multi-statement implicit transactions as "explicit."
* Server crashes that occur during startup are now more clearly reported in logs and the standard error output.
* Fixed incorrect cancellation logic when attempting to detect stuck rangefeeds.
* Fixed an internal error when comparing a tuple type with a non-tuple type.
* Fixed incorrect selectivity estimation for queries with `OR` predicates all referencing a common single table.
* Added sort setting to tables on the **Transaction** and **Statement Insights Details** pages.
* Fixed an issue where `changefeed.emitted_messages` would be increased twice per message for changefeed cloud storage sinks.
* Fixed a bug where `attidentity` in `pg_attribute` for the `GENERATED BY DEFAULT AS IDENTITY` column should be `d`.
* CockroachDB previously could incorrectly evaluate queries that performed left semi and left anti "virtual lookup" joins on tables in `pg_catalog` or `information_schema`. These join types can be planned when a subquery is used inside of a filter condition. The bug was introduced in v20.2.0 and is now fixed.
* Fixed a link to index details on the **Drop Index Insights** in the Cloud Console.
* Fixed a bug where encoding of `ARRAY` type to Parquet format would fail in some cases during the `EXPORT` command.
* Fixed a rare panic only present in v22.2.0 that occurs when using particular forms of existing statistics in table statistics forecasting.
* In the presence of several backup files, CockroachDB now speeds up slow listing calls that could manifest as restore queries hanging during execution.
* Prepared statements that use type hints can now succeed type-checking in more cases when the placeholder type is ambiguous.
* Fixed a bug where glob patterns that matched no tables in `GRANT` or `REVOKE` statements would return an internal error with a confusing message as opposed to the appropriate "no objects matched" error.
* Fixed a bug where empty `COPY` commands would not escape after an EOF character or error if encountering a `\.` with no input.
* Fixed a bug where in PostgreSQL extended protocol mode it was possible for auto-commits to not execute certain logic for DDL, when certain DML (insert/update/delete) and DDL were combined in an implicit transaction.
* Fixed the `pg_table_is_visible` built-in function so it correctly reports visibility of indexes based on the current `search_path`.
* Fixed a bug that would result in incomplete backups when non-default, non-public resource limiting settings ( `kv.bulk_sst.max_request_time` or `admission.elastic_cpu.enabled` ) were enabled.
* The `pg_function_is_visible` function now correctly reports visibility based on the functions that are visible on the current `search_path`.
* Fixed a rare bug that could cause upgrades from v22.1 to v22.2 to fail if the job coordinator node crashes in the middle of a specific upgrade migration.
* Fixed a bug for queries with disjunctions (i.e., contains `OR` ) where all the columns referenced in the disjunctions are known to have a single value.
* Fixed a bug introduced in v22.1.0 in which the non-default nulls ordering, `NULLS LAST`, was ignored in window and aggregate functions. This bug would cause incorrect query results when `NULLS LAST` was used.
* Fixed a bug that caused an internal error when trying to execute a UDF with an empty function body. This bug was present since UDFs were introduced in v22.2.0.
* Fixed an issue where `DISTINCT ON` queries would fail with the error "SELECT DISTINCT ON expressions must match initial ORDER BY expressions" when the query included an `ORDER BY` clause containing `ASC NULLS LAST` or `DESC NULLS FIRST`.
* Fixed a bug where selecting a small timeframe in the past in a timeseries query resulted in no data in the graphs.
* Fixed a bug where CockroachDB would error when receiving Geometry/Geography using binary parameters.
* Fixed an internal error that could occur when comparing a column of type void to `NULL` using `col IS NULL` or `col IS NOT NULL`.
* Fixed a bug where a query would incorrectly pass if a given interval for `AS OF SYSTEM TIME` interval was a small positive duration.

### Performance improvements

* The <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> will now plan <InternalLink version="v23.1" path="inverted-indexes">inverted index</InternalLink> scans for queries with JSON subscripting filters, like `json_col['field'] = '"value"`.
* CockroachDB now avoids wasteful contention on the gossip mutex caused by checking if the network needs tightening hundreds of times per second.
* Some types of queries with comparisons with constant values now execute faster.
* The <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> now explores plans with a single <InternalLink version="v23.1" path="joins#lookup-joins">lookup join</InternalLink> expressions in rare cases where it previously planned two lookup join expressions.
* Consistency checks are now properly cancelled on timeout, preventing them from piling up.
* Raft ticks now adapt to scheduling delays. This helps preventing re-elections, and the corresponding performance effects, in the event of relatively short (sub-second) processing delays.
* HTTP requests with `Accept-encoding: gzip` previously resulted in valid GZIP-encoded, but uncompressed, responses. This resulted in inefficient HTTP transfer times, as far more bytes were transferred than necessary. Those responses are now properly compressed, resulting in smaller network responses.
* `pg_catalog.col_description` is now much faster when resolving columns for tables in the `pg_catalog`, `crdb_internal`, or `information_schema` namespaces.
* The <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> now does less copying of histograms while planning queries, which will reduce memory pressure a little.
* Added early inlining of `VALUES` clauses and unnested arrays in `WITH` queries in order to eliminate unnecessary joins.
* Added significantly faster JSON parsing, which should help with any workloads that insert large amounts of JSON data, including <InternalLink version="v23.1" path="import">`IMPORT`</InternalLink> workloads.
* Loading the **Database Details** page in the DB Console is now somewhat less expensive when there are a large number of databases and a large number of tables in each database and a large number of ranges in the cluster.
* Tables in `pg_catalog` and `information_schema` (when not explicitly referenced as `"".information_schema` ) may now be much faster if the current database has a small number of relations relative to the total number in the cluster.
* The overhead of running <InternalLink version="v23.1" path="explain-analyze">`EXPLAIN ANALYZE`</InternalLink> and `EXPLAIN ANALYZE (DISTSQL)` has been significantly reduced. The overhead of `EXPLAIN ANALYZE (DEBUG)` did not change.
* Enabled more efficient <InternalLink version="v23.1" path="joins#lookup-joins">lookup joins</InternalLink> by deriving new join constraints when equijoin predicates exist on the column(s) of a unique constraint on one table which are a proper subset of the referencing columns of a foreign key constraint on the other table. If an index exists on those foreign key constraint referencing columns, equijoin predicates are derived between the primary key and foreign key columns not currently bound by `ON` clause predicates.
* The setup of the distributed query execution is now fully parallelized which should reduce the query latencies, especially in multi-region setups.
* Performance of the `LIKE` and `ILIKE` operators using patterns without any wildcards has been improved.
* The <InternalLink version="v23.1" path="cost-based-optimizer">optimizer</InternalLink> can now better calculate the properties of recursive <InternalLink version="v23.1" path="common-table-expressions">common table expressions</InternalLink> in the presence of a `LIMIT`.
* Certain types of reads will now have a far smaller contention footprint with conflicting concurrent writers.
* In some cases, the key-value store client now needs to look up where to send requests. Prior to this change, such lookup requests were always routed to the leaseholder of the metadata range storing that information. Now the client can attempt to look up this metadata from followers. This can improve tail latency in multi-region clusters in cases where the range addressing cache is cold.
* The garbage collection score triggering a MVCC GC run has been lowered. The GC Score is a ratio computed from MVCC stats and uses the ratio of live objects and estimated garbage age to estimate collectability of existing data. The reduced score will trigger garbage collection earlier, lowering the interval between runs 3 times, giving 2 times reduced peak garbage usage at the expense of 30% increase of wasteful data scanning on constantly updated data.
* CockroachDB in some cases now correctly incorporates the value of the `OFFSET` clause when determining the number of rows that need to be read when the `LIMIT` clause is also present. Note that there was no correctness issue here, only that extra unnecessary rows could be read.
* In 22.2, privileges on virtual tables (system catalogs like `pg_catalog`, `information_schema`, and `crdb_internal` ) were introduced. A problem with this new feature is that we now must fetch those privileges into a cache before we can use those tables or determine their visibility in other system catalogs. This process used to occur on-demand, when the privilege was needed. Now, CockroachDB will fetch these privileges eagerly during startup to mitigate latency when accessing `pg_catalog` right after the server boots up.

### Contributors

This release includes 1655 merged PRs by 101 authors.

We would like to thank the following contributors from the CockroachDB community:

* Alex (first-time contributor)
* Ambuj Kumar (first-time contributor)
* Faizaan Madhani (first-time contributor)
* GirishV (first-time contributor)
* Klaus Rettinghaus (first-time contributor)
* Vivian Kong (first-time contributor)
* e-mbrown
* likzn
* nnaka2992
* quanuw (first-time contributor)
* rharding6373
* shralex
