Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
2cb67c4c
Commit
2cb67c4c
authored
15 years ago
by
Robert Haas
Browse files
Options
Downloads
Patches
Plain Diff
Improve a couple of comments relating to large object snapshot management.
parent
55233c33
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend/catalog/aclchk.c
+6
-11
6 additions, 11 deletions
src/backend/catalog/aclchk.c
src/backend/catalog/pg_largeobject.c
+6
-4
6 additions, 4 deletions
src/backend/catalog/pg_largeobject.c
with
12 additions
and
15 deletions
src/backend/catalog/aclchk.c
+
6
−
11
View file @
2cb67c4c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.16
0
2010/01/0
5 21:53:58
rhaas Exp $
* $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.16
1
2010/01/0
7 02:41:15
rhaas Exp $
*
* NOTES
* See acl.h.
...
...
@@ -3515,16 +3515,11 @@ pg_language_aclmask(Oid lang_oid, Oid roleid,
/*
* Exported routine for examining a user's privileges for a largeobject
*
* The reason why this interface has an argument of snapshot is that
* we apply a snapshot available on lo_open(), not SnapshotNow, when
* it is opened as read-only mode.
* If we could see the metadata and data from inconsistent viewpoint,
* it will give us much confusion. So, we need to provide an interface
* which takes an argument of snapshot.
*
* If the caller refers a large object with a certain snapshot except
* for SnapshotNow, its permission checks should be also applied in
* the same snapshot.
* When a large object is opened for reading, it is opened relative to the
* caller's snapshot, but when it is opened for writing, it is always relative
* to SnapshotNow, as documented in doc/src/sgml/lobj.sgml. This function
* takes a snapshot argument so that the permissions check can be made relative
* to the same snapshot that will be used to read the underlying data.
*/
AclMode
pg_largeobject_aclmask_snapshot
(
Oid
lobj_oid
,
Oid
roleid
,
...
...
This diff is collapsed.
Click to expand it.
src/backend/catalog/pg_largeobject.c
+
6
−
4
View file @
2cb67c4c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/pg_largeobject.c,v 1.3
6
2010/01/0
2 16:57:36 momjian
Exp $
* $PostgreSQL: pgsql/src/backend/catalog/pg_largeobject.c,v 1.3
7
2010/01/0
7 02:41:16 rhaas
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -251,9 +251,11 @@ LargeObjectAlterOwner(Oid loid, Oid newOwnerId)
* We don't use the system cache to for large object metadata, for fear of
* using too much local memory.
*
* Note that LargeObjectExists always scans the system catalog
* with SnapshotNow, so it is unavailable to use to check
* existence in read-only accesses.
* This function always scans the system catalog using SnapshotNow, so it
* should not be used when a large object is opened in read-only mode (because
* large objects opened in read only mode are supposed to be viewed relative
* to the caller's snapshot, whereas in read-write mode they are relative to
* SnapshotNow).
*/
bool
LargeObjectExists
(
Oid
loid
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment