Size: a a a

pgsql – PostgreSQL

2020 December 23

AL

Alexey Lesovsky in pgsql – PostgreSQL
Explain what do you mean under "archivelog" term.
источник

AL

Alexey Lesovsky in pgsql – PostgreSQL
current state of pg_wal/ directory, or all WAL  segments archived using archive_command/pg_receivewal ?
источник

Z

Zumrud in pgsql – PostgreSQL
yes current directory for pg_wal on $PGDATA/pg_wal and i set SET archive_mode = 'on' and my archive_command is for example, 'cp %p /u01/wal/%f'
источник

Z

Zumrud in pgsql – PostgreSQL
and i want to backup using  pg_rman for archivelogs backup
источник

AL

Alexey Lesovsky in pgsql – PostgreSQL
try using du utility, like du -sh /path
источник

KM

Kostya M in pgsql – PostgreSQL
Всем привет. Не могу понять как правильно сделать. У меня в таблице есть jsonb поле, в котором есть jsonb массив, который выглядит примерно так:
[{'type': 'PHONE', 'value': '7000000000'}, {'type': 'EMAIL', value: 'test@mail.ru'}]


У меня стоит задача этот массив перегнать в ts_vector, но так, чтобы туда попали только value, не type

Т.е. мне из этого массива нужно получить строку, типа

'7000000000' 'test@mail.ru'


Подскажите, как добиться этого результата?
Заранее спасибо
источник

Z

Zumrud in pgsql – PostgreSQL
now i want to determine archivelog backup time, that is why i want to know per day how many archive log generate
источник

AL

Alexey Lesovsky in pgsql – PostgreSQL
Zumrud
and i want to backup using  pg_rman for archivelogs backup
look at barman, pgbackrest or wal-g tools, all them can archive WAL continuously
источник

Z

Zumrud in pgsql – PostgreSQL
okay, i investigate working principle of these tools
источник

AL

Alexey Lesovsky in pgsql – PostgreSQL
Zumrud
now i want to determine archivelog backup time, that is why i want to know per day how many archive log generate
you can use pg_current_wal_lsn() to get current WAL position. call it several times with needed interval and subtract values
источник

Z

Zumrud in pgsql – PostgreSQL
Alexey Lesovsky
you can use pg_current_wal_lsn() to get current WAL position. call it several times with needed interval and subtract values
okay, i will use. thanks
источник

Z

Zumrud in pgsql – PostgreSQL
Which online course for learning postgresql do you advise me ?
источник

AL

Alexey Lesovsky in pgsql – PostgreSQL
sorry, don't know such courses, maybe other could ask you
источник

AL

Alexey Lesovsky in pgsql – PostgreSQL
the best course is daily practice ))
источник

Z

Zumrud in pgsql – PostgreSQL
Thanks. If anyone knows, please add online courses list.
источник

Z

Zumrud in pgsql – PostgreSQL
Alexey Lesovsky
the best course is daily practice ))
yes i learn in real work. But I want to strengthen
источник

AL

Alexey Lesovsky in pgsql – PostgreSQL
https://roadmap.sh/postgresql-dba
you also could look here, but it's not a course, just waypoints for self-education
источник

Z

Zumrud in pgsql – PostgreSQL
Many thanks. I will view, it looks like good roadmap for self-study.
источник

2_

2flower _ in pgsql – PostgreSQL
Kostya M
Всем привет. Не могу понять как правильно сделать. У меня в таблице есть jsonb поле, в котором есть jsonb массив, который выглядит примерно так:
[{'type': 'PHONE', 'value': '7000000000'}, {'type': 'EMAIL', value: 'test@mail.ru'}]


У меня стоит задача этот массив перегнать в ts_vector, но так, чтобы туда попали только value, не type

Т.е. мне из этого массива нужно получить строку, типа

'7000000000' 'test@mail.ru'


Подскажите, как добиться этого результата?
Заранее спасибо
jsonb_array_elements и ->>'value'
Если пг 12 или 13 то jsonpath
источник

KM

Kostya M in pgsql – PostgreSQL
2flower _
jsonb_array_elements и ->>'value'
Если пг 12 или 13 то jsonpath
Вот прямо сейчас это проверяю и что-то не так
источник