Crate a new, read-only user in postgres

Reference taken from this Article ! Script to Create Read-Only user: CREATE ROLE Read_Only_User WITH LOGIN PASSWORD ‘Test1234’ NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL ‘infinity’; Assign permission to this read only user: GRANT CONNECT ON DATABASE YourDatabaseName TO Read_Only_User; GRANT USAGE ON SCHEMA public TO Read_Only_User; GRANT SELECT ON ALL TABLES IN SCHEMA public … Read more

How to find cause of main file system going to read only mode

[26729.124569] Write(10): 2a 00 03 96 5a b0 00 00 08 00 [26729.124576] end_request: I/O error, dev sda, sector 60185264 [26729.125298] Buffer I/O error on device sda2, logical block 4593494 [26729.125986] lost page write due to I/O error on sda2 For me, that’s pretty strong evidence that your /dev/sda is on its way out. You … Read more

How do you re-mount an ext3 fs readwrite after it gets mounted readonly from a disk error?

I just recently ran into this problem and solved it by rebooting but after further investigation it appears that issuing the following command might fix it. echo running > /sys/block/device-name/device/state I think you might want to look at look at section 25.14.4: Changing the Read/Write State of an Online Logical Unit in this document, however, … Read more