Thread: Confussion with table-lock levels and isolation levels

Confussion with table-lock levels and isolation levels

From
Gabriel Fernandez
Date:
Hi fellows !

I would only want to ask some questions concerning table-locking levels
and isolation levels:

* First of all:  should I assume that AccessXXXXXXX  modes imply locking
the complete table and RowXXXX imply locking only the  rows which have
been accessed ? Will then the conflicts be solved according the
hierarchy between modes ?

* Second:
          - What does exactly mean that a mode 'CONFLICTS'  with another
?
          - Does it mean that another concurrent transactions having
these modes will have to wait until the first transaction
          have finished (commit or roll back) ?
          - Can we determine (when accessing a row in a table) wether we
will have a conflict or not according to the criteria
          explained in the previous question (Access-> complete table,
Row -> rows accessed) ?

*Third:
     If all the previous assumptions are true:
               - When there is a conflict, will the only consequence be
that all concurrent transactions will be processed in a
               FIFO serie and not in parallel ?
               - What about all the others concurrent transactions which
haven't conflicted ? How can you avoid falling into
               contradiction with the isolation level (and assure the
protection against non-repeteable reads or phantom
               reads ?
               - I feel those two levels (transactions and isolation
levels) are two layers so the transactions will be
               processed according to a FIFO serie when exist any
problem concerning the isolation level or the
               table-locking. Is this a good way to describe the way
PostgreSQL manages the things ?

Thank you very much for your help.  By the way, is the first time i'm
subscribed to a mailing list so if I do anything inappropiate or strange
please tell me.

Best regards

Gabi     :-)


Re: [GENERAL] Confussion with table-lock levels and isolation levels

From
Peter Eisentraut
Date:
On 2000-01-13, Gabriel Fernandez mentioned:

>           - What does exactly mean that a mode 'CONFLICTS'  with another
> ?
>           - Does it mean that another concurrent transactions having
> these modes will have to wait until the first transaction
>           have finished (commit or roll back) ?

Yes. You can try that pretty easily. Start up two psqls, in the first one
enter:
BEGIN TRANSACTION;
LOCK pg_class IN ACCESS EXCLUSIVE MODE;

In the second one enter:
SELECT * FROM pg_class;

The latter will hang.

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



Re: [GENERAL] confusion with vacuum commnad.

From
ANURADHA PAIDARKAR
Date:
Hi !
Can anybody help us.
 When I run vacuum command it gives me following error:
(for table pend_cust)
NOTICE: Rel pend_cust : uninitialized page 1161 fixing

Most of the time pend_cust table is accessed for spooling the reports,
where in the records are continuously getting added and deleted whenever
report is being run.
  What does the above error mean?


regards
AP.