Skip to content
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

[PostgreSQL] CREATE POLICY with USERs in the schema errors out with user does not exist #1655

Open
priyanshi-yb opened this issue Aug 26, 2024 · 0 comments

Comments

@priyanshi-yb
Copy link
Contributor

priyanshi-yb commented Aug 26, 2024

Jira Link: DB-13444
If there are some Policies in the source schema that are associated with USERs. In that case, those will error in the import schema phase with the following error as Voyager currently does not export Users/Grants in the export schema phase.

ERROR: role "regress_rls_group" does not exist (SQLSTATE 42704)

Suggestion: Create the Users manually before import schema to get these policies created in target YugabyteDB

example -

CREATE TABLE public.z1 (
    a integer,
    b text
);
CREATE ROLE regress_rls_group;
CREATE POLICY p2 ON public.z1 TO regress_rls_group USING (((a % 2) = 1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants