[doc] minor fix for CREATE INDEX CONCURRENTLY

Started by Frédéric Yhuelover 1 year ago4 messageshackers

Thread notes

1 note#docs
hackorum-bot#docs
hackorum-bot
1 day ago

@global #docs

#docs
Jump to latest
#1Frédéric Yhuel
frederic.yhuel@dalibo.com

Hi,

I believe that the description of which transactions will block a CREATE
INDEX CONCURRENTLY command from proceeding isn't right.

Please find the attached patch.

Best regards,
Frédéric

Attachments:

t51884_1
0001-Fix-documentation-about-CREATE-INDEX-CONCURRENTLY.patchtext/x-patch; charset=UTF-8; name=0001-Fix-documentation-about-CREATE-INDEX-CONCURRENTLY.patchDownload+1-2
#2Mihail Nikalayeu
mihailnikalayeu@gmail.com
In reply to: Frédéric Yhuel (#1)
#3Frédéric Yhuel
frederic.yhuel@dalibo.com
In reply to: Mihail Nikalayeu (#2)
Re: [doc] minor fix for CREATE INDEX CONCURRENTLY

On 7/9/25 16:06, Mihail Nikalayeu wrote:

Hello!

No, I think the comment is correct, it is about [0].

[0]: https://github.com/postgres/postgres/blob/f5a987c0e5f6bbf0cc0420228dc57e7aae4d7e8f/src/backend/commands/indexcmds.c#L4217

Aaahhh... yes, you're right! thanks!

#4Frédéric Yhuel
frederic.yhuel@dalibo.com
In reply to: Frédéric Yhuel (#3)
Re: [doc] minor fix for CREATE INDEX CONCURRENTLY

On 7/9/25 16:30, Frédéric Yhuel wrote:

On 7/9/25 16:06, Mihail Nikalayeu wrote:

Hello!

No, I think the comment is correct, it is about [0].

[0]: https://github.com/postgres/postgres/blob/
f5a987c0e5f6bbf0cc0420228dc57e7aae4d7e8f/src/backend/commands/
indexcmds.c#L4217

Aaahhh... yes, you're right! thanks!

Come to think of it, shouldn't it be that instead?

"and in addition it must wait for all existing transactions that modify
the indexed table, and for those that could potentially modify or use
the index to terminate."

I think the first set isn't included in the second one, as long as the
default isolation level is READ COMMITTED.