On Sat, Aug 07, 2021 at 07:18:19PM +0900, Michael Paquier wrote:
> As a matter of curiosity, I have checked how it would look to handle
> the no-op case for the sub-commands other than SET TABLESPACE, and one
> would need something like the attached, with a new flag for
> AlteredTableInfo.  That does not really look good, but it triggers
> properly the object access hook when SET LOGGED/UNLOGGED/ACCESS METHOD
> are no-ops, so let's just handle the case using the version from
> upthread.  I'll do that at the beginning of next week.

So, on a closer look, it happens that this breaks the regression tests
of sepgsql, as the two following commands in ddl.sql cause a rewrite:
ALTER TABLE regtest_table_4 ALTER COLUMN y TYPE float;
ALTER TABLE regtest_ptable_4 ALTER COLUMN y TYPE float;

I have been fighting with SE/Linux for a couple of hours to try to
figure out how to run our regression tests, but gave up after running
into various segmentation faults even after following all the steps of
the documentation to set up things.  Perhaps that's because I just set
up the environment with a recent Debian, I don't know.  Instead of
running those tests, I have fallen back to my own module and ran all
the SQLs of sepgsql to find out places where there are rewrites where
I spotted those two places.

One thing I have noticed is that sepgsql-regtest.te fails to compile
because /usr/share/selinux/devel/Makefile does not understand
auth_read_passwd().  Looking at some of the SE/Linux repos, perhaps
this ought to be auth_read_shadow() instead to be able to work with a
newer version?

Anyway, as the addition of this InvokeObjectPostAlterHook() is
consistent for a rewrite caused by SET LOGGED/UNLOGGED/ACCESS METHOD I
have applied the patch.  I'll fix rhinoceros once it reports back the
diffs in output.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to