Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit236f1ea

Browse files
committed
Fix and clarify function comment on LogicalTapeSetCreate.
Commitc4649cc removed the "shared" and "ntapes" arguments, but thecomment still talked about "shared". It also talked about "a sharedfile handle", which was technically correct because even before commitc4649cc, the "shared file handle" referred to the "fileset"argument, not "shared". But it was very confusing. Improve thecomment.Also add a comment on what the "preallocate" argument does.Backpatch to v15, just to make backpatching other patches easier inthe future.Discussion:https://www.postgresql.org/message-id/af989685-91d5-aad4-8f60-1d066b5ec309@enterprisedb.comReviewed-by: Peter Eisentraut
1 parent67c5b88 commit236f1ea

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

‎src/backend/utils/sort/logtape.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,14 +537,20 @@ ltsInitReadBuffer(LogicalTape *lt)
537537
* The tape set is initially empty. Use LogicalTapeCreate() to create
538538
* tapes in it.
539539
*
540-
*Serial callerspass NULL argument forshared, and -1 for worker. Parallel
541-
* worker callers pass a shared file handle and their own worker number.
540+
*In a single-process sort,pass NULL argument forfileset, and -1 for
541+
* worker.
542542
*
543-
* Leader callers pass a shared file handle and -1 for worker. After creating
544-
* the tape set, use LogicalTapeImport() to import the worker tapes into it.
543+
* In a parallel sort, parallel workers pass the shared fileset handle and
544+
* their own worker number. After the workers have finished, create the
545+
* tape set in the leader, passing the shared fileset handle and -1 for
546+
* worker, and use LogicalTapeImport() to import the worker tapes into it.
545547
*
546548
* Currently, the leader will only import worker tapes into the set, it does
547549
* not create tapes of its own, although in principle that should work.
550+
*
551+
* If preallocate is true, blocks for each individual tape are allocated in
552+
* batches. This avoids fragmentation when writing multiple tapes at the
553+
* same time.
548554
*/
549555
LogicalTapeSet*
550556
LogicalTapeSetCreate(boolpreallocate,SharedFileSet*fileset,intworker)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp