Re: Why does the WAL writer sit on completed segments (on Windows)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-04-17 19:07, Christian Ullrich wrote:
On 2017-04-17 18:55, Tom Lane wrote:

Magnus Hagander <magnus@xxxxxxxxxxxx> writes:

But all our files are opened with (FILE_SHARE_READ | FILE_SHARE_WRITE |
FILE_SHARE_DELETE). So shouldn't this allow 7zip (or whatever) to open up
the file, regardless of us holding it open? (Looking at
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363874(v=vs.85).aspx
at least that's how I read it?)

No, I'm afraid not. The share modes have to be compatible across all CreateFile() calls (that result in concurrently open handles). After Postgres has opened the file with all three share modes, any later calls must use all three as well.

Um, no, not exactly. You can open the file _READ|_WRITE as long as no one else actually has it open for delete (by setting the delete-on-close flag?).

And here I thought I understood share modes ... sorry.

I just ran through it in procmon again, and with the input redirection, cmd successfully opens it _READ|_WRITE.

--
Christian


--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux