pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2830

English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.

Subscribe to a channel

PostgreSQL

Notabug, generally.

(Well, maybe pg_dump would have to deal with that sometimes).

Set search_path in your function to include public. pg_dump explicitly resets it to nothing.

Читать полностью…

PostgreSQL

Getting error no match for argument: libmemcached

Читать полностью…

PostgreSQL

install the dependenies needed for your pgpool version

Читать полностью…

PostgreSQL

While installing pgpool getting error

Читать полностью…

PostgreSQL

Hm. Am i hitting a bug?

While restoring my database schema, i have CREATE EXTENSION ltree in both my schema and public, however it fails when a SQL function with ltree in it is defined.

Читать полностью…

PostgreSQL

Then it prefers a scan which baffles me

Читать полностью…

PostgreSQL

Timescale and uri grouping?

Читать полностью…

PostgreSQL

Doh! Seems that postgresql still prefer btree into equal comparison. Temporary remove the btree index (is it a composite or partial index?) and see what happens could a viable way without impacting your system?

Читать полностью…

PostgreSQL

The fact is that no matter what I do postgresql seems to straight skip the hash indexes

Читать полностью…

PostgreSQL

I've not a 2TB url table to test but googling I've found this article. I'm not sure can fit your data but generally urls are long.
https://evgeniydemin.medium.com/postgresql-indexes-hash-vs-b-tree-84b4f6aa6d61

Читать полностью…

PostgreSQL

I have a table full of webpage snapshots, with the following columns:
- crawl_id = unique id of the webpage snapshot
- uri = url of the webpage (not unique)
- taken_on = timestamp of the snapshot

99% of the lookups are done by exact matching of uri. The table is quite big (2TB) and i would like to partition it. Is hash really the only way here with a sensible number of partitions considering my memory?

Читать полностью…

PostgreSQL

Hello and welcome to this chat. Here we discuss PostgreSQL and provide best-effort voluntary support on Postgresql issues.
If you have any question, try asking kindly, including log files, error descriptions and perhaps what you're trying to do.

- 🚫 photos and screenshots
- 🚫 spam and offtopic
- ✅ questions with log files and clear explanation of what's gone wrong

⬇️ Press the button down here ⬇️

Читать полностью…

PostgreSQL

Im quering it inside server via local domain socket

Читать полностью…

PostgreSQL

Without looking at the actual data? 🤷

Читать полностью…

PostgreSQL

So do u have any alternative to eradicate it.

Читать полностью…

PostgreSQL

search for it then and find a github repository for pgpool specifically, u will find a lot talking about different issues surely u will find a match for your reuqest if it is a common issue or just pull your logs on it and wait for answers

Читать полностью…

PostgreSQL

Try to install libmemcached

Читать полностью…

PostgreSQL

-nothing provides libmemcached.so.11()(64bit) needed by pgpool-II-pg16-4.5betal-1pgdg.rge19.x86_64 from pgpool145

Читать полностью…

PostgreSQL

CREATE EXTENSION IF NOT EXISTS ltree WITH SCHEMA public;

CREATE FUNCTION public.escape_ltree(text) RETURNS public.ltree
LANGUAGE sql IMMUTABLE STRICT
AS $_$

WITH string AS (
SELECT array_to_string(array_agg(
CASE
WHEN chr = '' THEN ''
WHEN chr = '_' THEN '__'
WHEN chr ~ '[0-9A-Za-z]' THEN chr
WHEN strpos('-! "#$%&''()*+,./:;<=>?@[\]^ ^`^y`{|}~\ ', chr) != 0 THEN '_'||substr('0123456789abcdefghijklmnopqrstuvwxyz', strpos('-! "#$%&''()*+,./:;<=>?@[\]^ ^`^y`{|}~\ ', chr), 1)||'_'
ELSE '_'||to_hex(ascii(chr))||'_'
END), '') AS ee FROM (SELECT regexp_split_to_table($1, '') AS chr) a
) SELECT (CASE WHEN length(ee) >= 256 THEN ('_H_'||encode(sha224(convert_to($1, 'UTF8')), 'hex')) ELSE ee END)::ltree FROM string;
$_$;


Fails with

psql:foxo_blue_schema.sql:718: ERROR:  type "ltree" does not exist                                                  
LINE 12: ...24(convert_to($1, 'UTF8')), 'hex')) ELSE ee END)::ltree FROM...

Читать полностью…

PostgreSQL

I mean it's storage could pack the data by uri grouping rather effectively.

Also, some partition improvements in the timescale code may be good for you.

Читать полностью…

PostgreSQL

But i don't care when the page was crawled actually

Читать полностью…

PostgreSQL

Is there an order by 'url' in your query?

Читать полностью…

PostgreSQL

Btree are always used

Читать полностью…

PostgreSQL

Ideally, with a great performance improvement with huge data, hash index seems good (seems)

Читать полностью…

PostgreSQL

Just curious: index on uri is a btree, hash or other type? If not hash, can a hash index increase performance without using partitioning method?
Just curious 😅

Читать полностью…

PostgreSQL

yes thats client side error, but serves has plenty of memory

Читать полностью…

PostgreSQL

You're aware that that's psql running into issues, right? shared_buffers don't matter...

Читать полностью…

PostgreSQL

hi everyone, I have 5gb matherialized view, when quring via psql I get out of memory for query result, shared buffer 16gb

Читать полностью…

PostgreSQL

Each function as a separate SQL file in Git, a bash script to build the schema update file.

Читать полностью…

PostgreSQL

There's obviously some garbage in your source data, or you misconfigured either the export or import config. My guess is that at some place, a NULL gets converted to a binary 0 and that's in turn sent as a text.

Читать полностью…
Subscribe to a channel