-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: show correct persistence information in pg_class table #56656
Comments
Hi @arulajmani, please add a C-ategory label to your issue. Check out the label system docs. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
We don't actually support the functionality for unlogged tables so I think for now we will keep returning If an unlogged table is created now, this notice is sent
|
Watch out for this (and see if it can be fixed)
|
We don't return
There's a separate issue tracking this #56733 which I'm gonna be fixing. It is orthogonal to this issue though, as the comment above wrongly identifies the table descriptor state as the source of the problem. |
Oops my first comment had a mistake. I meant that it doesn't seem like we have an easy way of identifying UNLOGGED tables nor do we implement any UNLOGGED functionality right now, so we return |
Yeah, I dug into this a bit more and looks like we don't store UNLOGGED beyond the parser at the moment. I'm not sure if there's value in changing this so that we can return |
Previously, the relpersistence column in pg_catalog.pg_class displayed 'p' for all tables regardless of persistence status. This is incorrect for temporary tables and unlogged tables, as they are supposed to have `t` and `u` values respectively. This patch fixes this behavior for temp tables, but leaves it unchanged for unlogged tables (as we don't persist unlogged information past parsing). Fixes cockroachdb#56656 Release note (sql change): the relpersistence column in pg_catalog.pg_class now correctly displays `t` as the persistence status for temporary tables.
56827: sql: Enabled correct pg_class.relPersistence for temporary tables r=arulajmani a=mnovelodou Previously, the relpersistence column in pg_catalog.pg_class displayed 'p' for all tables regardless of persistence status. This is incorrect for temporary tables and unlogged tables, as they are supposed to have `t` and `u` values respectively. This patch fixes this behavior for temp tables, but leaves it unchanged for unlogged tables (as we don't persist unlogged information past parsing). Fixes #56656 Release note (sql change): the relpersistence column in pg_catalog.pg_class now correctly displays `t` as the persistence status for temporary tables. Co-authored-by: MiguelNovelo <[email protected]>
Currently, regardless of persistence status (TEMP/UNLOGGED) pg_catalog.pg_class's relpersistence column returns p. Instead, this should return 't' for temp tables and 'u' for unlogged tables.
The text was updated successfully, but these errors were encountered: