Hello, I am not sure if pgsql-novice is place for this but this sounds like a basic locking understanding question so here: While studying group commit implementation (commit_delay=0 in this case) in PostgreSQL, I am having some trouble understanding how sometimes a particular backend with earlier WAL flush location has to wait for WALWriteLock. In XLogFlush() when a backend waits on WALWriteLock by a call to LWLockAcquireOrWait(), is it a case that it is queued in the increasing order of flush location. For example, if 3 backends with flush location A, B, C are waiting on WALWriteLock with A < B < C. Is it possible for backend 2 (with B) to get lock earlier than backend 1, causing 1 to have to wait. How does it happen that a backend with flush location which is greater than some of the waiting backends gets WALWriteLock earlier thus causing the flush/fsync piggybacking to happen? -- Amit Langote
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера