PostgreSQL官方只提供了正式版的镜像想要试用dev版又不想自己编译。结果在下面这个网站找到了一个https://github.com/ryanbooz/bluebox-docker它不是纯净的官方版本自带了一些初始化脚本正好用来试验。拉取镜像sudo docker pull ghcr.io/ryanbooz/bluebox-postgres:19-dev [sudo] kylin 的密码 19-dev: Pulling from ryanbooz/bluebox-postgres d3d5d8ab26d2: Pull complete c389a2748e7f: Pull complete c8129a85d9e1: Pull complete 7f4f950f4a59: Pull complete d1e0edeeb42f: Pull complete e58d32278daa: Pull complete d5876f284dbc: Pull complete f01cc50a7497: Pull complete 4f4fb700ef54: Pull complete Digest: sha256:253d42b69d62692f3aa82a976702e4ff389092025ad9ceb2a58b5f6089d15378 Status: Downloaded newer image for ghcr.io/ryanbooz/bluebox-postgres:19-dev sudo docker image list -a|grep blue ghcr.io/ryanbooz/bluebox-postgres 19-dev a37dec750520 6 days ago 595MB2.运行容器注意如果宿主机上有postgres服务正在运行, 不要用-p 5432:5432参数否则报错下面用–nethost参数。sudo docker run --name pg19dev -e POSTGRES_PASSWORDpassword -e POSTGRES_DBmydb -v /shujv/par:/par --nethost a37dec750520 Initializing PostgreSQL database... The files belonging to this database system will be owned by user postgres. This user must also own the server process. The database cluster will be initialized with locale en_US.utf8. The default database encoding has accordingly been set to UTF8. The default text search configuration will be set to english. Data page checksums are enabled. fixing permissions on existing directory /var/lib/postgresql/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok Success. You can now start the database server using: pg_ctl -D /var/lib/postgresql/data -l logfile start waiting for server to start....2026-02-13 00:11:15.207 UTC [37] LOG: starting PostgreSQL 19devel on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14deb12u1) 12.2.0, 64-bit 2026-02-13 00:11:15.219 UTC [37] LOG: listening on Unix socket /tmp/.s.PGSQL.5432 2026-02-13 00:11:15.256 UTC [43] LOG: database system was shut down at 2026-02-13 00:11:14 UTC 2026-02-13 00:11:15.269 UTC [37] LOG: database system is ready to accept connections done server started Running /docker-entrypoint-initdb.d/01-create-roles-and-database.sql .... PostgreSQL initialization complete. 2026-02-13 00:15:17.152 UTC [1] LOG: starting PostgreSQL 19devel on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14deb12u1) 12.2.0, 64-bit 2026-02-13 00:15:17.152 UTC [1] LOG: could not bind IPv4 address 0.0.0.0: Address already in use 2026-02-13 00:15:17.152 UTC [1] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2026-02-13 00:15:17.152 UTC [1] LOG: listening on IPv6 address ::, port 5432 2026-02-13 00:15:17.174 UTC [1] LOG: listening on Unix socket /tmp/.s.PGSQL.5432 2026-02-13 00:15:17.202 UTC [104] LOG: database system was shut down at 2026-02-13 00:15:16 UTC 2026-02-13 00:15:17.216 UTC [1] LOG: database system is ready to accept connections 2026-02-13 00:15:17.237 UTC [107] LOG: pg_cron scheduler started初始化脚本的输出很长截断了。3.服务端在前台显示如果想要切换到后台可用^C中断然后重新启动服务。2026-02-13 00:17:08.473 UTC [1] LOG: received fast shutdown request 2026-02-13 00:17:08.484 UTC [1] LOG: aborting any active transactions 2026-02-13 00:17:08.484 UTC [107] LOG: pg_cron scheduler shutting down 2026-02-13 00:17:08.485 UTC [1] LOG: background worker logical replication launcher (PID 108) exited with exit code 1 2026-02-13 00:17:08.485 UTC [1] LOG: background worker pg_cron launcher (PID 107) exited with exit code 1 2026-02-13 00:17:08.486 UTC [102] LOG: shutting down 2026-02-13 00:17:08.496 UTC [102] LOG: checkpoint starting: shutdown fast 2026-02-13 00:17:08.688 UTC [102] LOG: checkpoint complete: wrote 18 buffers (0.1%), wrote 3 SLRU buffers; 0 WAL file(s) added, 6 removed, 0 recycled; write0.024 s, sync0.039 s, total0.203 s; sync files17, longest0.011 s, average0.003 s; distance106191 kB, estimate106191 kB; lsn0/AAA133C8, redo lsn0/AAA133C8 2026-02-13 00:17:08.747 UTC [1] LOG: database system is shut down sudo docker start pg19dev pg19dev4.就可以用docker exec -it登录容器执行操作了。sudo docker exec -it pg19dev psql -U bb_admin -d bluebox psql (19devel) Type help for help. bluebox bluebox -- Current status SELECT (SELECT count(*) FROM bluebox.rental WHERE upper(rental_period) IS NULL) as open_rentals, (SELECT count(*) FROM bluebox.customer WHERE activebool) as active_customers, (SELECT count(*) FROM bluebox.inventory WHERE status_id 1) as inventory_available; open_rentals | active_customers | inventory_available ----------------------------------------------------- 1843 | 174980 | 1462726 (1 row) bluebox -- Daily rental volume SELECT lower(rental_period)::date as day, count(*) as rentals, sum(p.amount) as revenue FROM bluebox.rental r JOIN bluebox.payment p USING (rental_id) WHERE lower(rental_period) now() - interval 7 days GROUP BY 1 ORDER BY 1; day | rentals | revenue ----------------------- (0 rows) bluebox -- Top rented films SELECT f.title, count(*) as rentals FROM bluebox.rental r JOIN bluebox.inventory i USING (inventory_id) JOIN bluebox.film f USING (film_id) WHERE lower(rental_period) now() - interval 30 days GROUP BY f.film_id, f.title ORDER BY rentals DESC LIMIT 10; title | rentals -------------------------------------------------------- Haunted Mansion | 164 Elemental | 162 Gran Turismo | 153 Fast X | 149 Meg 2: The Trench | 145 Blue Beetle | 142 Sound of Freedom | 142 Megamind vs. the Doom Syndicate | 140 Transformers: Rise of the Beasts | 139 Mission: Impossible - Dead Reckoning Part One | 138 (10 rows) bluebox -- Customer churn analysis SELECT date_trunc(month, status_date) as month, count(*) FILTER (WHERE reason_code inactivity) as churned, count(*) FILTER (WHERE reason_code winback) as reactivated FROM bluebox.customer_status_log WHERE reason_code IN (inactivity, winback) GROUP BY 1 ORDER BY 1; month | churned | reactivated ---------------------------------------------- 2026-02-01 00:00:0000 | 3071 | 60 (1 row)试验了上述网站的几个测试SQL还测试了一个复现postgres 18.1的bug的SQL结果显示bug已被修复。bluebox with cte as (select array[g, 2] as a from generate_series(1, 3) g) select a[2], a[(select a[2])] from cte; a | a ------ 2 | 2 2 | 2 2 | 2 (3 rows) bluebox with cte as (select array[g, 2] as a from generate_series(1, 3) g)select * from cte; a ------- {1,2} {2,2} {3,2} (3 rows)以前在同一台机器上拉取官方18.1镜像docker run不能启动这个镜像反而能顺利使用不明所以。
我无法基于您提供的输入内容生成符合要求的博文。 原因如下: 输入内容严重缺失实质性项目信息:仅包含一篇已失效的网络文章标题、模糊的发布信息(“Last Updated on September 22, 2020”)、作者署名、会议名称(Ai4 …
1. 项目概述:这不是一次模型训练,而是一场交付实战 “From Notebook to Production: Running ML in the Real World (Part 4)”——这个标题里藏着太多被新手忽略的潜台词。它不是在讲怎么调参、怎么画ROC曲线,也不是教你怎么用PyTorch写一个…
终极指南:如何将JSXBIN二进制文件转换为可读JSX源代码 【免费下载链接】jsxbin-to-jsx-converter JSXBin to JSX Converter written in C# 项目地址: https://gitcode.com/gh_mirrors/js/jsxbin-to-jsx-converter
你是否曾经面对过Adobe产品的JSXBIN文件感到…