Lag error stop limit exceeded

4007: Lag error stop limit exceeded Info: Current lag error Data type: REAL Description: Runtime error when position controller is active if the lag error PCTRL_LAG_ERROR exceeds the configured lag error limit value AXLIM_DS_STOP. Reaction: Default setting STOP_ERR_DECEL_RAMP=ncA_LIMIT: Movement stopped with speed regulated ramp, with axis limits and by switching off the controller. Setting […]

Содержание

  1. 4007: Lag error stop limit exceeded
  2. Lag error stop limit exceeded
  3. Lag error stop limit exceeded
  4. Lag error stop limit exceeded
  5. Lag Error Stop Limit Exceeded
  6. 4007 : Lag error stop limit exceeded
  7. Solved: System Limit Exceeded error Recover Point — Dell .
  8. Exceeded Account Email Limit — Microsoft Community
  9. How to fix error DB_ROWLENGTH_LIMIT_EXCEEDED when …
  10. Usage limit exceeded. Try again tomorrow. — Microsoft .
  11. AX2xxx Drive — Status and Error Codes
  12. Excess following error alarm troubleshooting on CNC .
  13. ACOPOS Error Texts — xn--brtschi-5wa.ch
  14. Common Firmware Errors — Hexagon Manufacturing Intelligence
  15. 12 Service — SEW Eurodrive
  16. Lag Error Stop Limit Exceeded Fixes & Solutions

4007: Lag error stop limit exceeded

Info: Current lag error
Data type: REAL

Description:
Runtime error when position controller is active if the lag error PCTRL_LAG_ERROR exceeds the configured lag error limit value AXLIM_DS_STOP.

Reaction:
Default setting STOP_ERR_DECEL_RAMP=ncA_LIMIT:
Movement stopped with speed regulated ramp, with axis limits and by switching off the controller.

Setting STOP_ERR_DECEL_RAMP=ncINDUCTION:
Independent of controller mode: Movement is aborted with induction stop. See also error number 9001.

Setting STOP_ERR_DECEL_RAMP=ncCTRL_OFF:
Independent of controller mode: Movement is aborted by switching off the controller and the power section immediately. The drive has no electrical torque.

Cause/Remedy:
Lag error limit too small (AXLIM_DS_STOP).

Incorrect configuration for set value generation:
— Parameters for acceleration, deceleration or speed too large (e.g. AXLIM_A1_NEG, BASIS_MOVE_V_POS. ).

Incorrect controller configuration:
— Controller is set too weak.
— Feed forward incorrectly configured (e.g. prediction time = 0).
— Unstable control loop.

Current limiting:
— Increased current. See error number 9030.
— EMF: Operating speed too high and/or network voltage too low. Check if the motor is being run within the voltage limit sqrt(ICTRL_USD_REF^2+ ICTRL_USQ_REF^2)> UDC_ACT/sqrt(3).
— Current limiting: Check if the current ICTRL_ISQ_REF is limited with the limits sqrt(2)* MOTOR_CURR_MAX or sqrt(2)* ACOPOS_CURR_MAX.
— Torque limiting: Check if the set value of the current controller ICTRL_ISQ_REF is limited with the 4 quadratic torque limiter (LIM_T1_POS, LIM_T1_NEG, LIM_T2_POS, LIM_T2_NEG, LIM_T1_POS_OVR, LIM_T1_NEG_OVR, LIM_T2_POS_OVR, LIM_T2_NEG_OVR und LIM_T_OVR_GRP).
— ISQ-filter limiting: Check if the set value of the current controller ICTRL_ISQ_REF is limited with one of the ISQ-filter.
— Under-voltage limiter: Check if UDC_ACT UDC_BLEEDER_ON and ICTRL_ISQ_REF = ISQ_MAX_UDC and ICTRL_ISQ_REF = ISQ_MIN_UDC.
— Temperature limiter: The current is limited when movement is stopped due to over-temperature on junction. See error number 9030.

Speed limiting:
— Speed controller. Check if the speed SCTRL_SPEED_REF is limited with the limits SCTRL_LIM_V_POS, SCTRL_LIM_V_NEG or MOTOR_SPEED_MAX.
— Position controller. Check if the speed PCTRL_V_ACT is limited with the limit POS_CTRL_P_MAX.

Encoder position or speed contains an error: See error number 4014.
Motor wiring error: See error number 6044.
Motor wiring error: See error number 6045.
Motor defect: See error number 6045.
ACOPOS defect: See error number 6045.

Источник

Lag error stop limit exceeded

Hi,
I’m sorry.I not good english.
Used B&R Automation Studio communication with Acopos 1090 find >>>>
error code:7210 DC Bus:Charging :Voltage unstable

You can change Capacitor value 0.033uF/275Vac.
Acopos 1090 connect 3 phase input.

Hi, what is the reason servo drive acopos 1090 with module plugin C114 error LED blinking? cannot find the error on any manuals. please help plis..

Which error LED is blinking, the one on the drive or the LED on the module, and what colour is it blinking.

Hi,
I’m sorry.I not good english.
Used B&R Automation Studio communication with Acopos 1090 find >>>>
error code:7210 DC Bus:Charging :Voltage unstable

You can change Capacitor value 0.033uF/275Vac.
Acopos 1090 connect 3 phase input.

THANK YOU for this information! It solved our problem with the same drive.
Symptom: Green LED on drive continuously blinking.
Changed all three (3) noise supression caps, as suggested.
Drive now starts up and is stable once again.
We found these capacitors at DigiKey Electronics:
http://www.digikey.com/product-detai. 599-ND/3465874

THANK YOU, THANK YOU, THANK YOU!!

hi,
i also have facing same symptom LED GREEN blinking ,what is the problem on this driver Acopos 1090 .

please need help

i have check that capacitor 3 units, in the my driver is not 0.033uf its 1uf/400vac i have remove that capacitor and measure with LCR meter,but its showing that 0.689 for the 2psc and the another one is show 0.989uf so can you please tell me is that is will ok or any other probelmis in the PCB?

PLEASE I NEED YOUR HELP

Hi,
If you look where the 3 phases from the bottom board come up onto the main power board, there are some small resistor chains leading away, they go over to 3 grey capacitors with glue on the top. Directly above it is a big grey capacitor, and above that is the power block/heatsink.
It will be one of those 3 capacitors which have failed. They drop the AC line voltage down to a low level where it is rectified and monitored by the control card.
They should measure 33nF but commonly one fails to around 6nF

If you require any industrial repairs, please email me

DEAR FRIEND, as you said have 3 psc of gray color capacitor is correct, but the value of capacitor is 1uf/400v its not the 33nf
so could be is that capacitor is failure?
the reading i measured in the LCR meter is showing 0.689uf for 2 psc .the only 1 psc is showing 0.989uf so thereare some tolerence ,about 45% of the capacitor value is faild.

Источник

Lag error stop limit exceeded

that is correct 3 psc of capacitor i have removed and measure, ihave send you email the attactments of the picture and also with the LCR meter reading.

i have write there the all of information regarding this driver with the photo ,send by PDF file at this afternoon ,malaysia time about 12.30pm sir.

please reply sir if you get it my email .

What address did you send the email to?

the file i send is about 9mb ,i cant send to plc forum its can support only 300kb.

so if that adress is wrong,please give me your email adress sir?

hello friends
in acopos 1090 drive with error 32061 & i have change three phase line input capacitor 1uf/275v but problem are still that so please help me( mihir_electro@hotmail.com)

Before everyone goes replacing capacitors in the drive, the Run light blinking green is a standard pattern for either input power not being turned on (so the drive only has 24V DC) or the enable input being false.

In other words, a blinking run light means you don’t have a fault yet, but you will if you try to run the drive.

Hello Friends,
In Acopos 1090 the error 7210 is comming means, Voltage unstable.As checked the AC110 & AC122 module is ok.

If anyone one suggest to rectify this problem.

Dear all,i had same problem with green light blinking, i change the three 0.033uf caps.it starts working for 1-2 minutes, after it starts blinkig again.

There are some error codes, 4005 and 9002.

It really anoing me.

Thank you in advance

Dear all,i had same problem with green light blinking, i change the three 0.033uf caps.it starts working for 1-2 minutes, after it starts blinkig again.

There are some error codes, 4005 and 9002.

It really anoing me.

Thank you in advance

Hello !
I am working on an acopos 1022 and I have the same problem like you, the caps are good, I have changed the optocoupler after the diode bridge, but no result.

Источник

Lag error stop limit exceeded

that is correct 3 psc of capacitor i have removed and measure, ihave send you email the attactments of the picture and also with the LCR meter reading.

i have write there the all of information regarding this driver with the photo ,send by PDF file at this afternoon ,malaysia time about 12.30pm sir.

please reply sir if you get it my email .

What address did you send the email to?

the file i send is about 9mb ,i cant send to plc forum its can support only 300kb.

so if that adress is wrong,please give me your email adress sir?

hello friends
in acopos 1090 drive with error 32061 & i have change three phase line input capacitor 1uf/275v but problem are still that so please help me( mihir_electro@hotmail.com)

Before everyone goes replacing capacitors in the drive, the Run light blinking green is a standard pattern for either input power not being turned on (so the drive only has 24V DC) or the enable input being false.

In other words, a blinking run light means you don’t have a fault yet, but you will if you try to run the drive.

Hello Friends,
In Acopos 1090 the error 7210 is comming means, Voltage unstable.As checked the AC110 & AC122 module is ok.

If anyone one suggest to rectify this problem.

Dear all,i had same problem with green light blinking, i change the three 0.033uf caps.it starts working for 1-2 minutes, after it starts blinkig again.

There are some error codes, 4005 and 9002.

It really anoing me.

Thank you in advance

Dear all,i had same problem with green light blinking, i change the three 0.033uf caps.it starts working for 1-2 minutes, after it starts blinkig again.

There are some error codes, 4005 and 9002.

It really anoing me.

Thank you in advance

Hello !
I am working on an acopos 1022 and I have the same problem like you, the caps are good, I have changed the optocoupler after the diode bridge, but no result.

Источник

Lag Error Stop Limit Exceeded

We have collected for you the most relevant information on Lag Error Stop Limit Exceeded, as well as possible solutions to this problem. Take a look at the links provided and find the solution that works. Other people have encountered Lag Error Stop Limit Exceeded before you, so use the ready-made solutions.

4007 : Lag error stop limit exceeded

    http://www.xn--brtschi-5wa.ch/automation/html/4007.htm
    Runtime error when position controller is active if the lag error PCTRL_LAG_ERROR exceeds the configured lag error limit value AXLIM_DS_STOP.

Solved: System Limit Exceeded error Recover Point — Dell .

    https://www.dell.com/community/RecoverPoint/System-Limit-Exceeded-error-Recover-Point/td-p/7094326
    Seems as though someone has et the data lag field to 25, so anytime it goes above that number you will get an error. Assuming you are on RP 4.x you can go to the CG -> (copy) -> copy policy and change the value. This means that your RPO is greater than 25 …
    https://answers.microsoft.com/en-us/outlook_com/forum/oemail-osend/exceeded-account-email-limit/6473454b-4a78-4838-a54f-2a14c96a5d84
    Nov 12, 2018 · Exceeded Account Email Limit Received a Notification that my email account has Exceeded the Allowed Limit and prompted me to Delete Inbox emails to Free up space so that New emails can be Received and Sent.

How to fix error DB_ROWLENGTH_LIMIT_EXCEEDED when …

    https://developer.ibm.com/answers/questions/420888/how-to-fix-error-db-rowlength-limit-exceeded-when/
    2017-12-11T13:41:57.552 001910DD ENG FNRCD0022E — ERROR ObjectStoreUpgrade(xxxx) can’t add column recovery_item_id into DocVersionncom.filenet.api.exception.EngineRuntimeException: FNRCD0022E: DB_ROWLENGTH_LIMIT_EXCEEDED: The summation of column lengths exceeds the capacity of the underlying database

Usage limit exceeded. Try again tomorrow. — Microsoft .

    https://answers.microsoft.com/en-us/outlook_com/forum/oemail-oaddacc/usage-limit-exceeded-try-again-tomorrow/59cc0c24-c22d-4a4d-a0f2-59680d862807
    Dec 18, 2018 · I’m trying to create a new e-mail account but when it asks me to put in a a phone number so they can send me the code it comes up with the message «Usage limit exceeded. Try again tomorrow.» when i click send code, I tried the day after.

AX2xxx Drive — Status and Error Codes

    https://infosys.beckhoff.com/content/1033/tcsystemmanager/Reference/AX2xxxx_Status_DriveError.htm
    Warning lag-distance exceeded is set, as soon as the distance between the set position and the position controller trajectory exceed the set value PEMAX . It can be deleted with the command CLRFAULT .

Excess following error alarm troubleshooting on CNC .

    http://machinetoolhelp.com/Alarm_errors/excess_following_error.html
    Link to us from your website and promote the community. Then email us to receive a Free CNC cheat sheet from the CNC Specialty Store!

ACOPOS Error Texts — xn--brtschi-5wa.ch

    http://www.xn--brtschi-5wa.ch/automation/
    • 4014: Two encoder control: Stop limit of positions difference exceeded • 5001: Target position exceeds positive SW limit • 5002: Target position exceeds negative SW limit

Common Firmware Errors — Hexagon Manufacturing Intelligence

    https://docs.hexagonmi.com/pcdmis/2019.1/en/helpcenter/mergedProjects/miim/Leitz-Common_Firmware_Interface/Common_Firmware_Errors.htm
    STATUS Label. Error Message. Cause. x_pos_hw_limit : ERROR MOTOR_X+,S%1,TR_FG004,Plus Hardware Limit Error. The firmware detected that the hardware travel limit is .

12 Service — SEW Eurodrive

    https://download.sew-eurodrive.com/download/pdf/11697415_G12.pdf
    0 Inverter in current limit or in slip limit • Speed controller or current controller (in VFC operating mode without encoder) operating at setting limit due to mechanical overload or phase failure in the power supply or motor. • Encoder not connected correctly or incorrect direc-tion of rotation. •nmax is exceeded during torque control.

Lag Error Stop Limit Exceeded Fixes & Solutions

We are confident that the above descriptions of Lag Error Stop Limit Exceeded and how to fix it will be useful to you. If you have another solution to Lag Error Stop Limit Exceeded or some notes on the existing ways to solve it, then please drop us an email.

Источник

Old
February 20th, 2013, 04:47 AM

 
#16

Member

Malaysia

segar is offline

 

Join Date: Feb 2013

Location: malaysia

Posts: 10

Andy M


DEAR/SIR

that is correct 3 psc of capacitor i have removed and measure, ihave send you email the attactments of the picture and also with the LCR meter reading.

i have write there the all of information regarding this driver with the photo ,send by PDF file at this afternoon ,malaysia time about 12.30pm sir.

please reply sir if you get it my email .

thank you sir

 

Reply With Quote

Old
February 20th, 2013, 10:39 AM

 
#18

Member

Malaysia

segar is offline

 

Join Date: Feb 2013

Location: malaysia

Posts: 10

Andy M


dear/sir

i have send to this adress(<admin@plcs.net>) at this afternoon,
i am sorry if i send it ti wrong adress,because i have message from this adress ,that why i send to following adress email.

the file i send is about 9mb ,i cant send to plc forum its can support only 300kb.

so if that adress is wrong,please give me your email adress sir?

thank you

 

Reply With Quote

Old
July 2nd, 2013, 04:58 AM

 
#19

Member

India

mihir_electro is offline

 

Join Date: Jul 2013

Location: rajkot

Posts: 2

dear sir,
i have acopos 1090 servo drive but last night error light blinking, i change one spare drive m,y machine is running but this drive fault «booting problem». any body know my problem solution.please meil me if possible.(mihir_electro@hotmail.com).

 

Reply With Quote

Old
July 9th, 2013, 05:10 AM

 
#20

Member

India

mihir_electro is offline

 

Join Date: Jul 2013

Location: rajkot

Posts: 2

acopos error still now


hello friends
in acopos 1090 drive with error 32061 & i have change three phase line input capacitor 1uf/275v but problem are still that so please help me( mihir_electro@hotmail.com)

thanks

 

Reply With Quote

Old
May 14th, 2014, 11:29 AM

 
#21

Member

Egypt

aymannessem is offline

 

Join Date: May 2014

Location: cairo

Posts: 6

request


Dear sir
i want how to make reset to acopos 1090 because
the drive led orange
the drive give me motor temperature 0.0
memory act 7&8&9&10 not give me step value

 

Reply With Quote

Old
August 6th, 2014, 12:10 PM

 
#22

Member

United States

CapinWinky is offline

 

CapinWinky's Avatar

 

Join Date: Aug 2011

Location: Virginia

Posts: 555

Before everyone goes replacing capacitors in the drive, the Run light blinking green is a standard pattern for either input power not being turned on (so the drive only has 24V DC) or the enable input being false.

In other words, a blinking run light means you don’t have a fault yet, but you will if you try to run the drive.

__________________
——————————————————
Cycling power is a sign of weakness.

 

Reply With Quote

Old
June 5th, 2015, 04:24 PM

 
#23

Member

Egypt

aymannessem is offline

 

Join Date: May 2014

Location: cairo

Posts: 6

hello friends
i have aproblem with acopos 1090
the error 4007
lag error stop limit exceeded
current lag error:1000.24

 

Reply With Quote

Old
June 5th, 2015, 04:30 PM

 
#24

Member

Egypt

aymannessem is offline

 

Join Date: May 2014

Location: cairo

Posts: 6

hello friends
i have aproblem with acopos 1090
the error 41031
junction temperature model
over temperature
junction temperature:119.094

 

Reply With Quote

Old
June 22nd, 2015, 10:56 PM

 
#25

Member

Viet Nam

lckhanhwsb is offline

 

Join Date: Jun 2015

Location: CANTHO

Posts: 1

i am using PROSONIC M (FMU40-ARB9A2) but it ERRO is » check calibration basic», i don’t know faults, can you help me/
email: lckhanhwsb@gmail.com. thankyou!


Last edited by lckhanhwsb; June 22nd, 2015 at 10:59 PM.

 

Reply With Quote

Old
May 17th, 2016, 08:48 AM

 
#26

Member

India

Manoranjan Pradhan is offline

 

Join Date: May 2016

Location: pune

Posts: 1

Acopos 1090 :- Error no 7210


Hello Friends,
In Acopos 1090 the error 7210 is comming means, Voltage unstable.As checked the AC110 & AC122 module is ok.

If anyone one suggest to rectify this problem.

 

Reply With Quote

Old
August 22nd, 2016, 04:03 PM

 
#27

Member

Iran

m.a_dashti2012 is offline

 

Join Date: Aug 2016

Location: tehran

Posts: 1

hi guys.green led blinking at acopos 1640. I couldent find any reason for that. Please help me


Last edited by m.a_dashti2012; August 22nd, 2016 at 04:05 PM.

 

Reply With Quote

Old
October 25th, 2016, 03:37 AM

 
#28

Member

Viet Nam

Binhhd is offline

 

Join Date: Oct 2016

Location: Hanoi

Posts: 1

Dear Sirs
I have driver acopos 1022 had error 7210 and 7215.
Can you help me to repair that errors
My email: binhhd101984@gmail.com
Thank you very much

 

Reply With Quote

Old
June 17th, 2017, 06:58 AM

 
#29

Member

Georgia

Dobodl is offline

 

Join Date: Jun 2017

Location: Tbilisi

Posts: 1

Dear all,i had same problem with green light blinking, i change the three 0.033uf caps.it starts working for 1-2 minutes, after it starts blinkig again.

There are some error codes, 4005 and 9002.

It really anoing me.

Thank you in advance

David

 

Reply With Quote

Old
December 21st, 2017, 12:03 PM

 
#30

Member

France

Pierre_lmit is offline

 

Join Date: Dec 2017

Location: LE MANS

Posts: 1

Same problem


Quote:

Originally Posted by Dobodl
View Post

Dear all,i had same problem with green light blinking, i change the three 0.033uf caps.it starts working for 1-2 minutes, after it starts blinkig again.

There are some error codes, 4005 and 9002.

It really anoing me.

Thank you in advance

David

Hello !
I am working on an acopos 1022 and I have the same problem like you, the caps are good, I have changed the optocoupler after the diode bridge, but no result…

Do you resolve your problem?

Thanks a lot!

 

Reply With Quote

by wikiDBA on May 13, 2020

Error:

ORA-16810: multiple errors or warnings detected for the member  / ORA-16766: Redo Apply is stopped / ORA-16853: apply lag has exceeded specified threshold

Cause: Redo apply stopped on standby

Solution: Disable and Enable standby in dgmgrl

Example:

DGMGRL> show configuration

Configuration – dg_prmy_config

Protection Mode: MaxPerformance
Members:
prmy – Primary database
stby – Physical standby database
Error: ORA-16810: multiple errors or warnings detected for the member

Fast-Start Failover: DISABLED

Configuration Status:
ERROR (status updated 51 seconds ago)

DGMGRL>
DGMGRL> show database stby

Database – stby

Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 1 second ago)
Apply Lag: 13 hours 58 minutes 18 seconds (computed 1 second ago)
Average Apply Rate: 1.06 MByte/s
Real Time Query: OFF
Instance(s):
stby_1 (apply instance)
stby_2

Database Error(s):
ORA-16766: Redo Apply is stopped

Database Warning(s):
ORA-16853: apply lag has exceeded specified threshold

Database Status:
ERROR

DGMGRL> disable database stby
Disabled.
DGMGRL>
DGMGRL> enable database stby
Enabled.
DGMGRL>
DGMGRL>
DGMGRL> show configuration;

Configuration – dg_prmy_config

Protection Mode: MaxPerformance
Members:
prmy – Primary database
stby – Physical standby database
Warning: ORA-16853: apply lag has exceeded specified threshold

Fast-Start Failover: DISABLED

Configuration Status:
WARNING (status updated 13 seconds ago)

DGMGRL>

DGMGRL>
DGMGRL> show database stby

Database – stby

Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 0 seconds ago)
Apply Lag: 1 second (computed 0 seconds ago)
Average Apply Rate: 24.06 MByte/s
Real Time Query: OFF
Instance(s):
stby_1 (apply instance)
stby_2

Database Status:
SUCCESS

DGMGRL>
DGMGRL>
DGMGRL> show configuration;

Configuration – dg_prmy_config

Protection Mode: MaxPerformance
Members:
prmy – Primary database
stby – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS (status updated 30 seconds ago)

DGMGRL>

Я пытаюсь создать триггер, когда после вставки рисунка я хочу вставить его в таблицу In_Gallery или On_Loan, но не в обе. Когда я пытался создать функцию триггера, я продолжал получать сообщение об ошибке:

ERROR: stack depth limit exceeded
HINT:  Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.

Я не уверен, что с этим не так:

    CREATE OR REPLACE FUNCTION checkOnLoan()    
    RETURNS trigger AS
$$
    DECLARE    
       countGal numeric;
    BEGIN
            SELECT COUNT(*) INTO countGal FROM IN_GALLERY WHERE P_id = new.P_id;
            IF countGal = 0 THEN    
                INSERT INTO ON_LOAN VALUES (new.Certid, new.P_id, new.Insurer);
            ELSE
                RAISE EXCEPTION 'ALREADY IN GALLERY';
            END IF;
    RETURN new;
    END;
$$

LANGUAGE 'plpgsql';

CREATE TRIGGER OnLoan
    AFTER INSERT ON ON_LOAN
    FOR EACH ROW
    EXECUTE PROCEDURE checkOnLoan();

2 ответа

Непосредственной причиной вашей ошибки является бесконечный цикл, подобный объясненному в настоящее время принятому ответу. Но вы должны, вероятно, исправить больше, чем просто это. Триггер BEFORE улучшит ситуацию …

Функция запуска:

CREATE OR REPLACE FUNCTION check_onloan()
  RETURNS trigger AS
$$
BEGIN
   IF EXISTS (SELECT FROM in_gallery WHERE p_id = NEW.p_id) THEN
      RAISE EXCEPTION 'p_id % already in gallery!', NEW.p_id;
   END IF;
   RETURN NEW;  -- for BEFORE trigger
END
$$  LANGUAGE plpgsql;

Курок:

CREATE TRIGGER insert_after_on_loan
BEFORE INSERT ON on_loan             -- !!!
FOR EACH ROW EXECUTE PROCEDURE check_onloan();

RETURN NEW не имеет никакого смысла вообще для триггера AFTER. Руководство:

Возвращаемое значение игнорируется для триггеров уровня строки, запускаемых после операции, и поэтому они могут возвращать NULL.

Мое обоснованное предположение: вам нужен триггер BEFORE. Осталось только сделать исключение. Дешевле проверить перед выполнением работы, чем откатить ее позже. Для этой цели обычно эффективнее проверять существование с помощью IF EXISTS ..., а не подсчитывать. Тогда вам не нужно определять какие-либо переменные и нет DECLARE раздела.

Связанный:

  • PL / pgSQL проверяет, существует ли строка

  • Откат транзакции при ошибке запуска

Очевидно, вам нужен еще один зеркальный триггер для таблицы in_gallery в этом дизайне — который, вероятно, не идеален для начала.

Как бы вы это ни делали, будет оставшееся состояние гонки . При одновременной загрузке записи несколько транзакций могут попытаться ввести один и тот же p_id в обе таблицы практически в одно и то же время, но пока не увидеть p_id в таблице other , и введите его в обе таблицы. Это помогает держать транзакции короткими, чтобы минимизировать временные рамки, но проблема остается в принципе.

Одним чистым решением будет одна таблица painting с флагом boolean, указывающей ее статус. Это может иметь только одно состояние за раз. Детали зависят от вашей полной ситуации …

В стороне: пересмотреть регистр написания идентификаторов в CaMeL в Postgres.

  • Имена столбцов PostgreSQL чувствительны к регистру?


1

Erwin Brandstetter
2 Дек 2019 в 02:04

Вы снова INSERT в триггере AFTER INSERT, вызывая повторный запуск триггера в течение этой секунды INSERT, который снова INSERT запускает и запускает триггер заново, и так далее, и так далее , В какой-то момент стек исчерпан всеми вызовами этой функции, и вы получите ошибку.

Удалите INSERT из функций триггера и просто RETURN new. Возвращение new приведет к завершению оригинала INSERT. Для триггеров AFTER INSERT нет необходимости вручную INSERT в функции триггера.

Как:

CREATE OR REPLACE FUNCTION checkOnLoan()    
RETURNS trigger AS
$$
DECLARE    
    countGal numeric;
BEGIN
    SELECT COUNT(*) INTO countGal FROM IN_GALLERY WHERE P_id = new.P_id;
    IF countGal = 0 THEN    
        RETURN new;
    ELSE
        RAISE EXCEPTION 'ALREADY IN GALLERY';
    END IF;
END;
$$
LANGUAGE plpgsql;

И аналог для другой триггерной функции.


3

sticky bit
30 Ноя 2019 в 00:49

Понравилась статья? Поделить с друзьями:
  • Lag detected new world как исправить
  • L0730 ошибка mitsubishi
  • L071 ошибка jcb
  • Lada xray ошибки на панели приборов
  • Lada xray ошибка p0036