Commit Graph

3416 Commits

Author SHA1 Message Date
Alek Westover
ebc48ed67c delete notes file 2023-07-12 10:26:44 -04:00
Alek Westover
a6a88d2b9f fix path 2023-07-12 10:24:30 -04:00
Alek Westover
7619a169c1 I guess poetry needs a containr to run int 2023-07-11 14:34:16 -04:00
Alek Westover
e9700d4022 fix style 2023-07-11 14:22:50 -04:00
Alek Westover
5d1c4d10fa I much preffer this organizational scheme 2023-07-11 14:21:06 -04:00
Alek Westover
4fecf82291 black style 2023-07-11 13:58:26 -04:00
Alek Westover
f37980a026 fix directory structure 2023-07-11 13:52:19 -04:00
Alek Westover
13fa5285af remove recursive flag 2023-07-11 12:53:12 -04:00
Alek Westover
f132904546 actually commnet out logic 2023-07-11 12:14:47 -04:00
Alek Westover
ad582470e4 fix bad thing 2023-07-11 10:47:22 -04:00
Alek Westover
de8b914bfe Merge branch 'zip_ext' of github.com:neondatabase/neon into zip_ext 2023-07-11 10:46:40 -04:00
Alek Westover
005e9eee3c upload files 2023-07-11 10:46:23 -04:00
Alek Westover
fdcbadd552 style fix 2023-07-10 18:47:12 -04:00
Alek Westover
e88a3ae640 Merge branch 'zip_ext' of github.com:neondatabase/neon into zip_ext 2023-07-10 18:42:55 -04:00
Alek Westover
8c634622cf try to put the files in the bucket 2023-07-10 18:42:45 -04:00
Alek Westover
7bfde488b6 fixed python script 2023-07-10 13:59:00 -04:00
Alek Westover
26a1daf1bf remember to create and upload index.json 2023-07-10 13:46:32 -04:00
Alek Westover
b06dcaa88a fix again 2023-07-10 13:13:46 -04:00
Alek Westover
4b96e19e44 move script file 2023-07-10 13:13:01 -04:00
Alek Westover
d33bfb130d fix pahs 2023-07-10 13:10:01 -04:00
Alek Westover
8a40044659 merge 2023-07-10 12:39:23 -04:00
Alek Westover
7ccdd0c14e fix typo 2023-07-10 12:38:22 -04:00
Alek Westover
ce14c50a4b try to create folder 2023-07-10 11:41:30 -04:00
Alek Westover
ed95dc1c7a try to do it with just copy-pasting a lot of code 2023-07-10 11:04:10 -04:00
Alek Westover
7f028266b7 control 2023-07-07 13:48:37 -04:00
Alek Westover
e308de8224 dont zip control files 2023-07-07 13:46:43 -04:00
Alek Westover
ae349c7874 fix syntax error 2023-07-07 13:40:55 -04:00
Alek Westover
807ca84e54 copy lib tar gz 2023-07-07 13:37:14 -04:00
Alek Westover
f07c03d5ff fix 2023-07-07 13:15:00 -04:00
Alek Westover
977572bff8 fix 2023-07-07 13:11:45 -04:00
Alek Westover
ed183d1720 change to targz 2023-07-07 11:24:30 -04:00
Alek Westover
afa797d534 zip anon extension. only upload zipped extensions 2023-07-07 11:14:03 -04:00
Dmitry Rodionov
20137d9588 Polish tracing helpers (#4651)
Context: comments here: https://github.com/neondatabase/neon/pull/4645
2023-07-06 19:49:14 +03:00
Arseny Sher
634be4f4e0 Fix async write in safekeepers.
General Rust Write trait semantics (as well as its async brother) is that write
definitely happens only after Write::flush(). This wasn't needed in sync where
rust write calls the syscall directly, but is required in async.

Also fix setting initial end_pos in walsender, sometimes it was from the future.

fixes https://github.com/neondatabase/neon/issues/4518
2023-07-06 19:56:28 +04:00
Alex Chi Z
d340cf3721 dump more info in layer map (#4567)
A simple commit extracted from
https://github.com/neondatabase/neon/pull/4539

This PR adds more info for layer dumps (is_delta, is_incremental, size).

---------

Signed-off-by: Alex Chi Z <chi@neon.tech>
2023-07-06 18:21:45 +03:00
Konstantin Knizhnik
1741edf933 Pageserver reconnect v2 (#4519)
## Problem

Compute is not always able to reconnect to pages server.
First of all it caused by long time of restart of pageserver.
So number of attempts is increased from 5 (hardcoded) to 60 (GUC).
Also we do not perform flush after each command to increase performance
(it is especially critical for prefetch).
Unfortunately such pending flush makes it not possible to transparently
reconnect to restarted pageserver.
What we can do is to try to minimzie such probabilty.
Most likely broken connection will be detected in first sens command
after some idle period.
This is why max_flush_delay parameter is added which force flush to be
performed after first request after some idle period.

See #4497

## Summary of changes

Add neon.max_reconnect_attempts and neon.max_glush_delay GUCs which
contol when flush has to be done
and when it is possible to try to reconnect to page server


## Checklist before requesting a review

- [ ] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics? if so did you add the relevant
metrics to the dashboard?
- [ ] If this PR requires public announcement, mark it with
/release-notes label and add several sentences in this section.

## Checklist before merging

- [ ] Do not forget to reformat commit message to not include the above
checklist
2023-07-06 12:47:43 +03:00
Joonas Koivunen
269e20aeab fix: filter out zero synthetic sizes (#4639)
Apparently sending the synthetic_size == 0 is causing problems, so
filter out sending zeros.

Slack discussion:
https://neondb.slack.com/archives/C03F5SM1N02/p1688574285718989?thread_ts=1687874910.681049&cid=C03F5SM1N02
2023-07-06 12:32:34 +03:00
Tomoka Hayashi
91435006bd Fix docker-compose file and document (#4621)
## Problem

- Running the command according to docker.md gives warning and error.
- Warning `permissions should be u=rw (0600) or less` is output when
executing `psql -h localhost -p 55433 -U cloud_admin`.
- `FATAL: password authentication failed for user "root”` is output in
compute logs.

## Summary of changes

- Add `$ chmod 600 ~/.pgpass` in docker.md to avoid warning.
- Add username (cloud_admin) to pg_isready command in docker-compose.yml
to avoid error.

---------

Co-authored-by: Tomoka Hayashi <tomoka.hayashi@ntt.com>
2023-07-06 10:11:24 +01:00
Dmitry Rodionov
b263510866 move some logical size bits to separate logical_size.rs 2023-07-06 11:58:41 +03:00
Dmitry Rodionov
e418fc6dc3 move some tracing related assertions to separate module for tenant and timeline 2023-07-06 11:58:41 +03:00
Dmitry Rodionov
434eaadbe3 Move uninitialized timeline from tenant.rs to timeline/uninit.rs 2023-07-06 11:58:41 +03:00
Alexander Bayandin
6fb7edf494 Compile pg_embedding extension (#4634)
```
CREATE EXTENSION embedding;
CREATE TABLE t (val real[]);
INSERT INTO t (val) VALUES ('{0,0,0}'), ('{1,2,3}'), ('{1,1,1}'), (NULL);
CREATE INDEX ON t USING hnsw (val) WITH (maxelements = 10, dims=3, m=3);
INSERT INTO t (val) VALUES (array[1,2,4]);

SELECT * FROM t ORDER BY val <-> array[3,3,3];
   val   
---------
 {1,2,3}
 {1,2,4}
 {1,1,1}
 {0,0,0}
 
(5 rows)
```
2023-07-05 18:40:25 +01:00
Christian Schwarz
505aa242ac page cache: add size metrics (#4629)
Make them a member of `struct PageCache` to prepare for a future
where there's no global state.
2023-07-05 15:36:42 +03:00
arpad-m
1c516906e7 Impl Display for LayerFileName and require it for Layer (#4630)
Does three things:

* add a `Display` impl for `LayerFileName` equal to the `short_id`
* based on that, replace the `Layer::short_id` function by a requirement
for a `Display` impl
* use that `Display` impl in the places where the `short_id` and `file_name()` functions were used instead

Fixes #4145
2023-07-05 14:27:50 +02:00
Christian Schwarz
7d7cd8375c callers of task_mgr::spawn: some top-level async blocks were missing tenant/timeline id (#4283)
Looking at logs from staging and prod, I found there are a bunch of log
lines without tenant / timeline context.

Manully walk through all task_mgr::spawn lines and fix that using the
least amount of work required.

While doing it, remove some redundant `shutting down` messages. 

refs https://github.com/neondatabase/neon/issues/4222
2023-07-05 14:04:05 +02:00
Vadim Kharitonov
c92b7543b5 Update pgvector to 0.4.4 (#4632)
After announcing `hnsw`, there is a hypothesis that the community will
start comparing it with `pgvector` by themselves. Therefore, let's have
an actual version of `pgvector` in Neon.
2023-07-05 13:39:51 +03:00
Stas Kelvich
dbf88cf2d7 Minimalistic pool for http endpoint compute connections (under opt-in flag)
Cache up to 20 connections per endpoint. Once all pooled connections
are used current implementation can open an extra connection, so the
maximum number of simultaneous connections is not enforced.

There are more things to do here, especially with background clean-up
of closed connections, and checks for transaction state. But current
implementation allows to check for smaller coonection latencies that
this cache should bring.
2023-07-05 12:00:03 +03:00
Konstantin Knizhnik
f1db87ac36 Check if there is enough memory for HNSW index (#4602)
## Problem

HNSW index is created in memory.
Try to prevent OOM by checking of available RAM.


## Summary of changes

## Checklist before requesting a review

- [ ] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics? if so did you add the relevant
metrics to the dashboard?
- [ ] If this PR requires public announcement, mark it with
/release-notes label and add several sentences in this section.

## Checklist before merging

- [ ] Do not forget to reformat commit message to not include the above
checklist

---------

Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
2023-07-05 11:40:38 +03:00
Christian Schwarz
3f9defbfb4 page cache: add access & hit rate metrics (#4628)
Co-authored-by: Dmitry Rodionov <dmitry@neon.tech>
2023-07-05 10:38:32 +02:00
bojanserafimov
c7143dbde6 compute_ctl: Fix misleading metric (#4608) 2023-07-04 19:07:36 -04:00