aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/constraint.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-08-31 15:04:05 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-08-31 15:04:05 -0400
commit6b9667392d815caea3c3bd138d360f0d321f9c36 (patch)
tree28e67e736ee458ad3bb6208a8d94a45ed4abfcbc /src/backend/commands/constraint.c
parent2f1ed9d98c38a62ffa4b0a6589c9fcc529ae0883 (diff)
downloadpostgresql-6b9667392d815caea3c3bd138d360f0d321f9c36.tar.gz
postgresql-6b9667392d815caea3c3bd138d360f0d321f9c36.zip
In pg_dump, avoid doing per-table queries for RLS policies.
For no particularly good reason, getPolicies() queried pg_policy separately for each table. We can collect all the policies in a single query instead, and attach them to the correct TableInfo objects using findTableByOid() lookups. On the regression database, this reduces the number of queries substantially, and provides a visible savings even when running against a local server. Per complaint from Hubert Depesz Lubaczewski. Since this is such a simple fix and can have a visible performance benefit, back-patch to all supported branches. Discussion: https://postgr.es/m/20210826084430.GA26282@depesz.com
Diffstat (limited to 'src/backend/commands/constraint.c')
0 files changed, 0 insertions, 0 deletions