forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita70f2a5
committed
Don't try to dump RLS policies or security labels for extension objects.
checkExtensionMembership() set the DUMP_COMPONENT_SECLABEL andDUMP_COMPONENT_POLICY flags for extension member objects, even thoughwe lack any infrastructure for tracking extensions' initial settingsof these properties. This is not OK. The result was that a dumpwould always include commands to set these properties for extensionobjects that have them, with at least three negative consequences:1. The restoring user might not have privilege to set these propertieson these objects.2. The properties might be incorrect/irrelevant for the version of theextension that's installed in the destination database.3. The dump itself might fail, in the case of RLS properties attachedto extension tables that the dumping user lacks privilege to LOCK.(That's because we must get at least AccessShareLock to ensure thatwe don't fail while trying to decompile the RLS expressions.)When and if somebody cares to invent initial-state infrastructure forextensions' RLS policies and security labels, we could think aboutfinding another way around problem#3. But in the absence of suchinfrastructure, this whole thing is just wrong and we shouldn't do it.(Note: this applies only to ordinary dumps; binary-upgrade dumpsstill dump and restore extension member objects separately, withall properties.)Tom Lane and Jacob Champion. Back-patch to all supported branches.Discussion:https://postgr.es/m/00d46a48-3324-d9a0-49bf-e7f0f11d1038@timescale.com1 parent24943fb commita70f2a5
File tree
3 files changed
+41
-10
lines changed- src
- bin/pg_dump
- test/modules/test_pg_dump
- t
3 files changed
+41
-10
lines changedLines changed: 12 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1680 | 1680 |
| |
1681 | 1681 |
| |
1682 | 1682 |
| |
1683 |
| - | |
1684 |
| - | |
1685 |
| - | |
1686 |
| - | |
1687 |
| - | |
1688 |
| - | |
1689 |
| - | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
1690 | 1687 |
| |
1691 | 1688 |
| |
1692 | 1689 |
| |
1693 | 1690 |
| |
1694 | 1691 |
| |
1695 | 1692 |
| |
1696 | 1693 |
| |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
1697 | 1701 |
| |
1698 | 1702 |
| |
1699 | 1703 |
| |
| |||
1702 | 1706 |
| |
1703 | 1707 |
| |
1704 | 1708 |
| |
1705 |
| - | |
1706 |
| - | |
1707 |
| - | |
| 1709 | + | |
1708 | 1710 |
| |
1709 | 1711 |
| |
1710 | 1712 |
| |
|
Lines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
178 | 191 |
| |
179 | 192 |
| |
180 | 193 |
| |
| |||
284 | 297 |
| |
285 | 298 |
| |
286 | 299 |
| |
| 300 | + | |
287 | 301 |
| |
288 | 302 |
| |
289 | 303 |
| |
| |||
321 | 335 |
| |
322 | 336 |
| |
323 | 337 |
| |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
324 | 348 |
| |
325 | 349 |
| |
326 | 350 |
| |
| |||
704 | 728 |
| |
705 | 729 |
| |
706 | 730 |
| |
| 731 | + | |
707 | 732 |
| |
708 | 733 |
| |
709 | 734 |
| |
| |||
720 | 745 |
| |
721 | 746 |
| |
722 | 747 |
| |
| 748 | + | |
723 | 749 |
| |
724 | 750 |
| |
725 | 751 |
| |
| |||
743 | 769 |
| |
744 | 770 |
| |
745 | 771 |
| |
| 772 | + | |
746 | 773 |
| |
747 | 774 |
| |
748 | 775 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| 21 | + | |
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
|
0 commit comments
Comments
(0)