From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Large expressions in indexes can't be stored (non-TOASTable) |
Date: | 2024-09-19 23:16:24 |
Message-ID: | ZuywyFGKb0zqh8bz@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 19, 2024 at 01:36:36PM -0500, Nathan Bossart wrote:
> + PushActiveSnapshot(GetTransactionSnapshot());
>
> /*
> * Now we must wait until no running transaction could be using the
> @@ -2283,8 +2284,10 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
> * Again, commit the transaction to make the pg_index update visible
> * to other sessions.
> */
> + PopActiveSnapshot();
> CommitTransactionCommand();
> StartTransactionCommand();
> + PushActiveSnapshot(GetTransactionSnapshot());
>
> /*
> * Wait till every transaction that saw the old index state has
> @@ -2387,6 +2390,8 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
> {
> UnlockRelationIdForSession(&heaprelid, ShareUpdateExclusiveLock);
> UnlockRelationIdForSession(&indexrelid, ShareUpdateExclusiveLock);
> +
> + PopActiveSnapshot();
> }
> }
Perhaps the reason why these snapshots are pushed should be documented
with a comment?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan S. Katz | 2024-09-19 23:37:55 | Re: Should rolpassword be toastable? |
Previous Message | Michael Paquier | 2024-09-19 22:53:13 | Re: Custom connstr in background_psql() |