1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2015
    Rep Power

    Single-thread I/O

    Hello - I am new to this forum and know nothing about PostgreSQL. I have managed Microsoft SQL for 15 years (I know ....)

    We have a third party application (Nable by SolarWinds) that uses PostgreSQL for the database engine. Performance writing to our Dell Compellent SAN sucks. What I've read about PostgreSQL is that it's a single-thread I/O system where only one read/write operation executes at a time.

    Can you tell me if this is correct?

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Rep Power
    In general I don't think using a SAN for a database is a good idea to begin with.

    where only one read/write operation executes at a time
    No, that's not correct (and if it was, it would make Postgres pretty useless).

    You are probably referring to the fact that a single query (for one connection) will not use more than one thread - which means that each query (for each connection) will read the data in its own thread (process).

    This will change with the upcoming 9.6 however where a single query can distribute work in multiple threads.

    Writing is indeed done through a single process which controls the buffer cache and handles checkpoints and writes dirty pages to disk - which is pretty much the same in SQL Server or many other DBMS if I'm not mistaken.

    A quick overview is e.g. here: https://en.wikibooks.org/wiki/PostgreSQL/Architecture or here: Simple PostgreSQL Blog: PostgreSQL Architecture
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.

    Tips on how to ask better questions:

IMN logo majestic logo threadwatch logo seochat tools logo