Re: Question about PostgreSQL from Delphi newsgroups - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Question about PostgreSQL from Delphi newsgroups
Date
Msg-id dcc563d10711151431p38932a41y28ddf83b64d16632@mail.gmail.com
Whole thread Raw
In response to Question about PostgreSQL from Delphi newsgroups  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
List pgsql-general
On Nov 15, 2007 3:00 PM, Tony Caduto <tony_caduto@amsoftwaredesign.com> wrote:
> Hi,
> Someone asked me a question about PostgreSQL on the Delphi newsgroups
> and I was not sure how to answer them:
>
> "Do you know if using PostgreSQL a query or connection can have a
> priority set, so it can run quicker than other queries?
> For example, in a POS system the reporting queries should have lower
> priority than the generated invoices insert queries. "

The answer is Yes, No, and sort of.

It is possible to set different priorities on various backend
processes by means things like renice etc...  There are issues of
priority inversion (look it up on wikipedia) that may or may not
affect you, and changing the priority may or may not help, because in
most OSes process priority does not translate to I/O priority, which
is usually the real underlying issue.

My recommendation is that if you want to have a live fast
transactional database, AND you want to run reports, then you should
something like slony replication and run your reports against the
slave server.  It certainly works well for me.

pgsql-general by date:

Previous
From: Tom Hart
Date:
Subject: Re: automating backups with windows scheduled tasks and pg_dumpall
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Tom thinks it's bad code was 8.3 vs 8.2 sql compatibility issue