PostgreSQL 日报| E-Maj 修复权限提升漏洞(11 月 1 日)

本期聚焦PostgreSQL生态关键安全更新:E-Maj 5.0.1修复权限提升漏洞,pgAdmin 4 v9.19修补15个CVE;Hacker邮件列表讨论涵盖ALTER COLLATION错误码缺失、choose_plan_name() O(N³)规划复杂度、基于栈的WAL/缓冲区追踪、ExecForceStoreHeapTuple数据损坏修复、订阅端逻辑解码消息钩子缺陷,以及Hash索引WAL日志优化等核心内核议题。

PostgreSQL 技术文章

E-Maj 5.0.1:重要安全更新

E-Maj 5.0.1 作为安全更新版本正式发布。E-Maj 是一个 PostgreSQL 扩展,支持对数据库子集进行细粒度写入日志记录和时间回溯操作。此版本修复了一个存在于所有历史版本中的安全漏洞——在特定条件下,普通用户可借此漏洞提升至超级用户权限。建议所有用户尽快升级。E-Maj 5.0.1 支持 PostgreSQL 14 至 19 版本,配套客户…

原文链接:

https://pgnexus.ai/tech-blogs?url=https%3A%2F%2Fwww.postgresql.org%2Fabout%2Fnews%2Fe-maj-501-major-security-update-3425%2F

pgAdmin 4 v9.19 版本发布

pgAdmin 4 v9.19 已发布,包含 136 项错误修复与新功能,以及针对 15 个安全漏洞(CVE-2026-116238 至 CVE-2026-116252)的补丁。安全修复涵盖 Import/Export 工具中的 OS 命令注入、LDAP/Kerberos 认证账号混淆、登录失败限制绕过、路径遍历导致用户凭据泄露,以及 libpq 错误使用…

原文链接:

https://pgnexus.ai/tech-blogs?url=https%3A%2F%2Fwww.postgresql.org%2Fabout%2Fnews%2Fpgadmin-4-v919-released-3426%2F

PostgreSQL Hacker 电子邮件讨论精选

ALTER COLLATION 缺少错误代码

Kirill Reshke 报告称,执行 ALTER COLLATION "default" REFRESH VERSION 时会抛出使用通用内部错误码 XX000 的错误,导致依赖该错误码监控数据损坏的系统产生误报。其提议的修复方案是在 collationcmds.c 的 ereport 调用中补充显式的 errcode()。Heikki…

原文链接:

https://pgnexus.ai/hacker-discussions?subject=ALTER%20COLLATION%20misses%20errcode

自 commit 8c49a484e8e 起,choose_plan_name() 中的规划时间复杂度为 O(N^3)

讨论围绕一个修复补丁(v3),该补丁旨在解决自提交 8c49a484e8e 引入的 choose_plan_name() 函数中 O(N³) 规划时间问题。Tom Lane 对补丁的复杂性和正确性表示质疑。他指出,当用户手写名称(如 “expr_5”)不被识别为自动生成后缀序列的一部分时,会被存入普通基础名称列表,虽然后续逻辑碰巧能正确处理,但整个…

原文链接:

https://pgnexus.ai/hacker-discussions?subject=O(N%5E3)%20planning%20time%20in%20choose_plan_name()%20since%208c49a484e8e

基于栈的单节点 WAL/缓冲区使用情况追踪

Lukas Fittl 提交了该补丁系列的 v18 版本(跳过 v17),主要变更如下:0004 重构了节点级 instrumentation 的开销,改进了内存生命周期管理,并新增 InstrAccumWorkerUsage 函数;0005 用基于栈的方式替代 pgBufferUsage,覆盖 VACUUM/ANALYZE 及 planner i…

原文链接:

https://pgnexus.ai/hacker-discussions?subject=Stack-based%20tracking%20of%20per-node%20WAL%2Fbuffer%20usage

[PATCH] 修复 ExecForceStoreHeapTuple 中缺失 tts_tid 导致的数据损坏问题

该讨论围绕 execTuples.c 中 ExecForceStoreHeapTuple 函数的一个数据损坏修复补丁展开。问题在于 ExecClearTuple() 会重置 slot->tts_tid,而后续代码未能重新设置 tuple 的 TID,导致 tts_tid 丢失。Heikki Linnakangas 对补丁中保存 tup…

原文链接:

https://pgnexus.ai/hacker-discussions?subject=%5BPATCH%5D%20Corruption%20Issue%3A%20Fix%20missing%20tts_tid%20in%20ExecForceStoreHeapTuple

在订阅端添加逻辑解码消息的处理钩子

Zhijie Hou 在审查一个为订阅端添加逻辑解码消息处理钩子的补丁时,发现了一个与流式事务相关的 bug。在非流式模式下,若子事务中止,其包含的事务性逻辑消息会被正确丢弃;但在流式模式下(streaming=on 和 streaming=parallel 均受影响),即使子事务已回滚,这些消息仍会被错误地应用。根本原因在于 ReorderBu…

原文链接:

https://pgnexus.ai/hacker-discussions?subject=Add%20a%20hook%20for%20handling%20logical%20decoding%20messages%20on%20subscribers.

Hash 索引:停止在 WAL 中记录仅 pin 的 bucket 页面(移除 REGBUF_NO_CHANGE)

此次讨论涉及一组补丁,旨在停止将 hash 索引中仅需 pin 的 bucket 页面注册到 WAL,具体是移除对 REGBUF_NO_CHANGE 的使用。Vignesh C 针对 REL_18_STABLE 使用流复制和崩溃恢复进行了测试(启用 wal_consistency_checking = ‘hash’),并指出 XLOG_PAGE_MAGIC…

原文链接:

https://pgnexus.ai/hacker-discussions?subject=Hash%20index%3A%20stop%20registering%20pin-only%20bucket%20pages%20in%20WAL%20(remove%20REGBUF_NO_CHANGE)

社交媒体动态

玛氏箭牌如何借助数据与 AI 打造全球规模的消费者体验

每逢万圣节,糖果需求在全球范围内激增,玛氏箭牌面临的挑战是如何在不同市场中稳定地提供优质消费者体验。为此,公司与 Databricks 合作,构建了标准化、可复用的 AI 与数据分析能力。这套体系帮助各市场团队提升执行效率,在定价策略、促销规划和购买体验方面实现更精准的决策。这一案例展示了统一的数据与 AI 基础设施如何助力全球消费品企业实现更敏捷、更高效的规模化运营。

原文链接:

https://pgnexus.ai/social-media?url=https%3A%2F%2Fwww.linkedin.com%2Fposts%2Fdatabricks_databricks-x-mars-wrigley-activity-7522313477718331392-dfBA

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值