pg_get_indexdef() modification to use TxnSnapshot - Mailing list pgsql-hackers

From shveta malik
Subject pg_get_indexdef() modification to use TxnSnapshot
Date
Msg-id CAJpy0uBvAyGOEHGiZMCC+oCugi-4m4EJep-e_YR3uViChOBCfw@mail.gmail.com
Whole thread Raw
Responses Re: pg_get_indexdef() modification to use TxnSnapshot
Re: pg_get_indexdef() modification to use TxnSnapshot
List pgsql-hackers
I have attempted to convert pg_get_indexdef() to use
systable_beginscan() based on transaction-snapshot rather than using
SearchSysCache(). The latter does not have any old info and thus
provides only the latest info as per the committed txns, which could
result in errors in some scenarios. One such case is mentioned atop
pg_dump.c. The patch is an attempt to fix the same pg_dump's issue.
Any feedback is welcome.

There is a long list of pg_get_* functions which use SearchSysCache()
and thus may expose similar issues. I can give it a try to review the
possibility of converting all of them. Thoughts?

thanks
Shveta

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Cleaning up nbtree after logical decoding on standby work
Next
From: vignesh C
Date:
Subject: Re: pg_get_indexdef() modification to use TxnSnapshot