Thread: what happens to postmaster?
...when i am importing a table (from oracle, or updating it), and a user queries that same table? is it ok to be concerned about corruption etc. using 8.1.
> -----Original Message----- > From: pgsql-general-owner@postgresql.org [mailto:pgsql-general- > owner@postgresql.org] On Behalf Of zach cruise > Sent: Tuesday, June 22, 2010 11:09 AM > To: pgsql-general@postgresql.org > Subject: [GENERAL] what happens to postmaster? > > ...when i am importing a table (from oracle, or updating it), and a > user queries that same table? > > is it ok to be concerned about corruption etc. > > using 8.1. This is a relational database. All those things are handled automatically. The whole idea of a multi-user DBMS like PostgreSQLis that you can have concurrent access. PostgreSQL uses MVCC. Here is an article that explains how it works. If you read it perhaps you will feel more comfortable: http://en.wikipedia.org/wiki/Multiversion_concurrency_control
In response to zach cruise <zachc1980@gmail.com>: > ...when i am importing a table (from oracle, or updating it), and a > user queries that same table? I depends on a lot of information you haven't provided ... Is the update inside a transaction? Have you locked the table? The real answer is: whatever you want to happen. Depending on how you set up the import, you have control over how others can interact with the table while the import is running. Some examples: * Grab an access exclusive lock on the table, nobody else will be able to access it until you're done. * Grab an exclusive lock on the table, others will be able to read, but not write to it until you're done. Some documentation to read up on: http://www.postgresql.org/docs/8.4/static/explicit-locking.html > is it ok to be concerned about corruption etc. You should always be concerned about those things. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/
using navicat 8's import wizard which does row inserts (provider=msdaora.1; persist security info=true). more http://www.navicat.com/manual/online_manual/win_manual/ImportODBC.html i know this is not navicat support, but can anyone from navicat support also try answer this question? On Tue, Jun 22, 2010 at 2:21 PM, Bill Moran <wmoran@potentialtech.com> wrote: > In response to zach cruise <zachc1980@gmail.com>: > >> ...when i am importing a table (from oracle, or updating it), and a >> user queries that same table? > > I depends on a lot of information you haven't provided ... Is the > update inside a transaction? Have you locked the table? > > The real answer is: whatever you want to happen. Depending on how you > set up the import, you have control over how others can interact with > the table while the import is running. > > Some examples: > * Grab an access exclusive lock on the table, nobody else will be able > to access it until you're done. > * Grab an exclusive lock on the table, others will be able to read, but not > write to it until you're done. > > Some documentation to read up on: > http://www.postgresql.org/docs/8.4/static/explicit-locking.html > >> is it ok to be concerned about corruption etc. > > You should always be concerned about those things. > > -- > Bill Moran > http://www.potentialtech.com > http://people.collaborativefusion.com/~wmoran/ > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general
On Wed, Jun 23, 2010 at 12:42 PM, zach cruise <zachc1980@gmail.com> wrote: > using navicat 8's import wizard which does row inserts > (provider=msdaora.1; persist security info=true). more > http://www.navicat.com/manual/online_manual/win_manual/ImportODBC.html > > i know this is not navicat support, but can anyone from navicat > support also try answer this question? >> Some documentation to read up on: >> http://www.postgresql.org/docs/8.4/static/explicit-locking.html >> >>> is it ok to be concerned about corruption etc. >> As long as the import process is going through a regular postgresql backend connection, and not trying to write directly to the database files, you should have nothing ot worry about as far as corruption goes. Now pg_bulkloader, that's another story. There you shut down the database and let the bulk loader do its magical, dangerous stuff.