Thread: what happens when concurrent index create
i read documents,i find it that concurrent index create don't lock write.but need scan table twice.it explain is following as: It scans the table once to initially build the index, then makes a second pass to look for things added after the first pass. please explain 1. what happens when concurrent index create .tks. 2.how to trace a backend what do somethings internal.for example oracle 10046 trace. -- View this message in context: http://postgresql.1045698.n5.nabble.com/what-happens-when-concurrent-index-create-tp5615720p5615720.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On Tue, Apr 3, 2012 at 9:50 PM, leo xu <leoxu8703@gmail.com> wrote:
i read documents,i find it that concurrent index create don't lock write.but
need scan table twice.it explain is following as:
It scans the table once to initially build the index, then makes a second
pass to look for things added after the first pass.
please explain 1. what happens when concurrent index create .tks.
2.how to trace a backend what do somethings internal.for
example oracle 10046 trace.
It seems you are looking for a similar behavior of sql_trace in oracle. You can try pgstatstatements contrib module.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/what-happens-when-concurrent-index-create-tp5615720p5615720.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
leo xu wrote: > i read documents,i find it that concurrent index create don't lock write.but > need scan table twice.it explain is following as: > It scans the table once to initially build the index, then makes a second > pass to look for things added after the first pass. > > please explain 1. what happens when concurrent index create .tks. You quoted the explanation above... If you need to know more, read the source: it is the function DefineIndex in src/backend/commands/indexcmds.c > 2.how to trace a backend what do somethings internal.for > example oracle 10046 trace. SET log_min_messages=DEBUG5; Then do what you want logged. Afterwards read the log file. You need to be superuser for this command. If you want to switch to a regular user after issuing the command, say SET SESSION AUTHORIZATION some_user; Yours, Laurenz Albe