Skip to content

Instantly share code, notes, and snippets.

@nvcnvn
nvcnvn / read-access.sql
Created September 8, 2020 02:51 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@nvcnvn
nvcnvn / logs.txt
Created October 30, 2020 01:59
gRPC recv time
2020/10/11 09:15:13.555517 16.462457 /manabie.bob.Course/RetrieveLO
09:15:13.555597 . 80 ... RPC: from 127.0.0.1:45602 deadline:none
09:15:29.955995 16.400397 ... recv: &RetrieveLORequest{StudentId:f4YFTQJkY8RA5iq2zBf7oFOhEzU2,TopicIds:[VN12-CH-UP-L-001 VN12-CH-U
09:15:30.016542 . 60548 ... OK
09:15:30.017953 . 1411 ... sent: &RetrieveLOResponse{LearningObjectives:[]*LearningObjective{&LearningObjective{Id:VN10-CH-01-L
{
"version":130003,
"stmts":[
{
"stmt":{
"SelectStmt":{
"targetList":[
{
"ResTarget":{
"val":{
E0608 04:27:15.934969 12 status.go:71] apiserver received an error that is not an metav1.Status: &url.Error{Op:"Get", URL:"https://10.148.0.16:10250/containerLogs/stag-xxxxxxx-kafka/kafka-connect-cb8bb6d6-k9m5j/kafka-connect?follow=true&sinceSeconds=60&tailLines=100&timestamps=true", Err:(*errors.errorString)(0xc010b91510)}: Get "https://10.148.0.16:10250/containerLogs/stag-xxxxxxx-kafka/kafka-connect-cb8bb6d6-k9m5j/kafka-connect?follow=true&sinceSeconds=60&tailLines=100&timestamps=true": dial timeout, backstop
I0608 04:27:15.935536 12 trace.go:205] Trace[1615819059]: "Get" url:/api/v1/namespaces/stag-xxxxxxx-kafka/pods/kafka-connect-cb8bb6d6-k9m5j/log,user-agent:k9s/v0.0.0 (linux/amd64) kubernetes/$Format,audit-id:3e8bcfef-2059-4c7a-a7d6-4be656672924,client:14.169.228.176,accept:application/json, */*,protocol:HTTP/2.0 (08-Jun-2022 04:26:45.930) (total time: 30004ms):
I0608 04:27:15.936006 12 httplog.go:109] "HTTP" verb="GET" URI="/api/v1/namespaces/stag-xxxxxxx-kafka/pods/kafka-connect-cb8bb6d
{
"trip": {
"locations": [
{
"type": "break",
"lat": 10.772002,
"lon": 106.699562,
"original_index": 0
},
{
[
{
"rural": {
"way": [
40,
30,
30,
30,
30,
30,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.