Re: [GENERAL] could not fdatasync log file: Input/output error

2017-10-17 Thread said assemlal
16, 2017 at 11:47 PM, said assemlal > wrote: > > Just before we restart the server today, I found only one line as: > > > > PANIC: could not fdatasync log file 000101760083: > Input/output > > error > > the database system is in recovery mode > &

Re: [GENERAL] could not fdatasync log file: Input/output error

2017-10-16 Thread said assemlal
Just before we restart the server today, I found only one line as: PANIC: could not fdatasync log file 000101760083: Input/output error the database system is in recovery mode On Mon, Oct 16, 2017 at 10:43 AM said assemlal wrote: > Hi, > > The postgresql crashed on frid

[GENERAL] could not fdatasync log file: Input/output error

2017-10-16 Thread said assemlal
Hi, The postgresql crashed on friday due to IO errors. It seems that the filesystem puked. PANIC: could not fdatasync log file 000101760077: Input/output error LOG: database system was interrupted; last known up at 2017-10-13 15:26:28 EDT WARNING: terminating connection because of cra

Re: [GENERAL] FOR UPDATE

2016-11-28 Thread said assemlal
to happen. It is a migration case so I was thinking to take the more safe way.. So I think the behaviour is clear to me now. Thank you. On Mon, Nov 28, 2016 at 4:37 PM, Alvaro Herrera wrote: > said assemlal wrote: > > Hello, > > > > PG

[GENERAL] FOR UPDATE

2016-11-28 Thread said assemlal
Hello, PG: 9.4 CentOS 6 I am writing functions to lock results. Let's take an example: CREATE OR REPLACE FUNCTION usp_locking_my_result($1 VARCHAR(50), $2 VARCHAR(50)) RETURNS TEXT AS $$ SELECT value FROM my_table WHERE field1 = $1 AND field2 = $2 FOR UPDATE; $$ LANGUAGE SQL; What happens if

[GENERAL] Generic way to test input arguments

2016-10-17 Thread said assemlal
Hello, I am looking for a way to test generically input arguments to raise an exception if one is either null or empty. I was thinking to create a function who takes an array to check them but not sure if it's really good. What would be the best way to achieve that ? Thanks Saïd