pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro
5+ messages / 1 participants
[nested] [flat]

* pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro
@ 2018-08-28 23:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-08-28 23:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make pg_restore's identify_locking_dependencies() more bulletproof.

This function had a blacklist of dump object types that it believed
needed exclusive lock ... but we hadn't maintained that, so that it
was missing ROW SECURITY, POLICY, and INDEX ATTACH items, all of
which need (or should be treated as needing) exclusive lock.

Since the same oversight seems likely in future, let's reverse the
sense of the test so that the code has a whitelist of safe object
types; better to wrongly assume a command can't be run in parallel
than the opposite.  Currently the only POST_DATA object type that's
safe is CREATE INDEX ... and that list hasn't changed in a long time.

Back-patch to 9.5 where RLS came in.

Discussion: https://postgr.es/m/11450.1535483506@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e0a0cc28d0829bea5d339fc2db6ac26ea13d5ab4

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro
@ 2018-08-28 23:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-08-28 23:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make pg_restore's identify_locking_dependencies() more bulletproof.

This function had a blacklist of dump object types that it believed
needed exclusive lock ... but we hadn't maintained that, so that it
was missing ROW SECURITY, POLICY, and INDEX ATTACH items, all of
which need (or should be treated as needing) exclusive lock.

Since the same oversight seems likely in future, let's reverse the
sense of the test so that the code has a whitelist of safe object
types; better to wrongly assume a command can't be run in parallel
than the opposite.  Currently the only POST_DATA object type that's
safe is CREATE INDEX ... and that list hasn't changed in a long time.

Back-patch to 9.5 where RLS came in.

Discussion: https://postgr.es/m/11450.1535483506@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/49841edcc6440ccfe8cab2a2f478edadc9a0b266

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro
@ 2018-08-28 23:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-08-28 23:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make pg_restore's identify_locking_dependencies() more bulletproof.

This function had a blacklist of dump object types that it believed
needed exclusive lock ... but we hadn't maintained that, so that it
was missing ROW SECURITY, POLICY, and INDEX ATTACH items, all of
which need (or should be treated as needing) exclusive lock.

Since the same oversight seems likely in future, let's reverse the
sense of the test so that the code has a whitelist of safe object
types; better to wrongly assume a command can't be run in parallel
than the opposite.  Currently the only POST_DATA object type that's
safe is CREATE INDEX ... and that list hasn't changed in a long time.

Back-patch to 9.5 where RLS came in.

Discussion: https://postgr.es/m/11450.1535483506@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e2841d399a89636b8411d9985c468f202cfd0171

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro
@ 2018-08-28 23:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-08-28 23:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make pg_restore's identify_locking_dependencies() more bulletproof.

This function had a blacklist of dump object types that it believed
needed exclusive lock ... but we hadn't maintained that, so that it
was missing ROW SECURITY, POLICY, and INDEX ATTACH items, all of
which need (or should be treated as needing) exclusive lock.

Since the same oversight seems likely in future, let's reverse the
sense of the test so that the code has a whitelist of safe object
types; better to wrongly assume a command can't be run in parallel
than the opposite.  Currently the only POST_DATA object type that's
safe is CREATE INDEX ... and that list hasn't changed in a long time.

Back-patch to 9.5 where RLS came in.

Discussion: https://postgr.es/m/11450.1535483506@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/97aa524f18c0c5d4f800a6b37bb340890dba3224

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro
@ 2018-08-28 23:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-08-28 23:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make pg_restore's identify_locking_dependencies() more bulletproof.

This function had a blacklist of dump object types that it believed
needed exclusive lock ... but we hadn't maintained that, so that it
was missing ROW SECURITY, POLICY, and INDEX ATTACH items, all of
which need (or should be treated as needing) exclusive lock.

Since the same oversight seems likely in future, let's reverse the
sense of the test so that the code has a whitelist of safe object
types; better to wrongly assume a command can't be run in parallel
than the opposite.  Currently the only POST_DATA object type that's
safe is CREATE INDEX ... and that list hasn't changed in a long time.

Back-patch to 9.5 where RLS came in.

Discussion: https://postgr.es/m/11450.1535483506@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/aac21f11df0dbe6ee32ac8151bd1ea2c7987f683

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2018-08-28 23:47 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 23:47 pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro Tom Lane <tgl@sss.pgh.pa.us>
2018-08-28 23:47 pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro Tom Lane <tgl@sss.pgh.pa.us>
2018-08-28 23:47 pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro Tom Lane <tgl@sss.pgh.pa.us>
2018-08-28 23:47 pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro Tom Lane <tgl@sss.pgh.pa.us>
2018-08-28 23:47 pgsql: Make pg_restore's identify_locking_dependencies() more bulletpro Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox