没有合适的资源?快使用搜索试试~ 我知道了~
首页PostgreSQL 9管理员实用宝典:100+高效解决方案
PostgreSQL 9管理员实用宝典:100+高效解决方案
![](https://csdnimg.cn/release/wenkucmsfe/public/img/star.98a08eaa.png)
《PostgreSQL 9 Administration Cookbook》是一本由Simon Riggs和Hannu Krosing合著的专业技术书籍,专为解决实际的PostgreSQL数据库管理系统(PostgreSQL 9)中的问题而设计。这本书提供了超过100个简单但极其有效的解决方案,旨在帮助读者在日常运维、数据管理、性能优化、安全性设置等方面提升工作效率。它涵盖了PostgreSQL 9的各种关键主题,包括但不限于数据库架构、查询优化、备份恢复策略、集群和分片技术、用户权限管理以及故障排查。 该书的版权信息表明,所有内容均受2010年Packt Publishing的保护,未经版权所有者事先书面许可,不得以任何形式复制、存储或传输。尽管作者和出版商已尽力确保书中信息的准确性,但本书销售时并不提供任何形式的明示或默示保修,因此不承担因使用本书内容导致的直接或间接损失的责任。 值得注意的是,由于版权法的规定,尽管Packt Publishing努力在书中正确使用商标,但并不能保证所有提及的公司和产品名称的准确性。此外,书中提供的信息是基于作者当时的理解与实践,可能随时间和技术更新有所变化,读者在应用时需根据最新文档和官方指南进行验证。 《PostgreSQL 9 Administration Cookbook》是一本实用性很强的参考资料,适合系统管理员、数据库开发者和DBA,无论是对PostgreSQL有基础了解还是寻求高级技巧的读者,都能从中找到解决问题的方法和实用建议。通过阅读和实践书中的“菜谱”,读者可以提升自己在PostgreSQL 9环境下的管理和维护能力,从而提高整个系统的稳定性和效率。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/9830648/bg10.jpg)
Preface
3
Chapter 8, Monitoring and Diagnosis, provides recipes that answer questions such as is
the user connected?, what are they running?, are they active or blocked?, who is blocking
them?, is anybody using a specic table?, when did anybody last use it?, how much disk
space is used by temporary data?, and why are my queries slowing down? It also helps you in
investigating and reporting a bug, producing a daily summary report of logle errors, killing a
specic session, and resolving an in-doubt prepared transaction.
Chapter 9, Regular Maintenance, provides useful recipes on controlling automatic database
maintenance, avoiding auto freezing and page corruptions, avoiding transaction wraparound,
removing old prepared transactions, actions for heavy users of temporary tables, identifying
and xing bloated tables and indexes, maintaining indexes, nding unused indexes, carefully
removing unwanted indexes, and planning maintenance.
Chapter 10, Performance & Concurrency, covers topics such as nding slow SQL statements,
collecting regular statistics from pg_stat* views, nding what makes SQL slow, reducing the
number of rows returned, simplifying complex SQL, speeding up queries without rewriting
them, why is my query not using an index?, how do I force a query to use an index?, using
optimistic locking, and reporting performance problems.
Chapter 11, Backup & Recovery, most people admit that backups are essential, though they
also devote only a very small amount of time to thinking about the topic. So, this chapter
provides useful information about backup and recovery of your PostgreSQL database through
recipes on understanding and controlling crash recovery, planning backups, hot logical
backup of one database, hot logical backup of all databases, hot logical backup of all tables
in a tablespace, backup of database object denitions, standalone hot physical database
backup, hot physical backup & continuous archiving. It also includes topics such as recovery
of all databases, recovery to a point in time, recovery of a dropped/damaged table, recovery
of a dropped/damaged database, recovery of a dropped/damaged tablespace, improving
performance of backup/recovery, and incremental/differential backup and restore.
Chapter 12, Replication & Upgrades, replication isn't magic, though it can be pretty cool. It's
even cooler when it works, and that's what this chapter is all about. This chapter covers topics
such as replication concepts, replication best practices, setting up le-based log shipping
replication, setting up streaming log replication, managing log shipping replication, managing
Hot Standby, selective replication using Londiste 3.0, selective replication using Slony 2.0,
load balancing with pgpool II 3.0, upgrading to a new minor release (for example, 9.0.0 to
9.0.1), in-place major upgrades (for example, 8.4 to 9.0, or 9.0 to 9.1), and major upgrades
online using replication tools.
What you need for this book
We need the following software for this book:
f PostgreSQL 9.0 Server Software
f psql client utility (part of 9.0)
f pgAdmin3 1.12
![](https://csdnimg.cn/release/download_crawler_static/9830648/bg11.jpg)
Preface
4
Who this book is for
This book is for system administrators, database administrators, architects, developers, and
anyone with an interest in planning for or running live production databases. This book is most
suited to those who have some technical experience.
Conventions
In this book, you will nd a number of styles of text that distinguish between different kinds of
information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "In PostgreSQL 9.0, the utility pg_Standby is no
longer required, as many of its features are now performed directly by the server."
A block of code is set as follows:
CREATE USER repuser
SUPERUSER
LOGIN
CONNECTION LIMIT 1
ENCRYPTED PASSWORD 'changeme';
When we wish to draw your attention to a particular part of a code block, the relevant lines or
items are set in bold:
SELECT *
FROM mytable
WHERE (col1, col2, … ,colN) IN
(SELECT col1, col2, … ,colN
FROM mytable
GROUP BY
col1, col2, … ,colN
HAVING count(*) > 1);
Any command-line input or output is written as follows:
$ postgres --single -D /full/path/to/datadir postgres
New terms and important words are shown in bold. Words that you see on the screen,
in menus or dialog boxes for example, appear in the text like this: " The Query tool has a
good looking visual explain feature as well as a Graphical Query Builder, as shown in the
following screenshot".
Warnings or important notes appear in a box like this.
![](https://csdnimg.cn/release/download_crawler_static/9830648/bg12.jpg)
Preface
5
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or may have disliked. Reader feedback is important for us to develop
titles that you really get the most out of.
To send us general feedback, simply send an e-mail to feedback@packtpub.com, and
mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the
SUGGEST A TITLE form on www.packtpub.com or e-mail suggest@packtpub.com.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to
get the most from your purchase.
Downloading the example code for this book
You can download the example code les for all Packt books you have
purchased from your account at http://www.PacktPub.com. If you
purchased this book elsewhere, you can visit http://www.PacktPub.
com/support and register to have the les e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen.
If you nd a mistake in one of our books—maybe a mistake in the text or the code—we would be
grateful if you would report this to us. By doing so, you can save other readers from frustration
and help us improve subsequent versions of this book. If you nd any errata, please report them
by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata
submission form link, and entering the details of your errata. Once your errata are veried, your
submission will be accepted and the errata will be uploaded on our website, or added to any
list of existing errata, under the Errata section of that title. Any existing errata can be viewed by
selecting your title from http://www.packtpub.com/support.
![](https://csdnimg.cn/release/download_crawler_static/9830648/bg13.jpg)
Preface
6
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt,
we take the protection of our copyright and licenses very seriously. If you come across any
illegal copies of our works, in any form, on the Internet, please provide us with the location
address or website name immediately so that we can pursue a remedy.
Please contact us at copyright@packtpub.com with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at questions@packtpub.com if you are having a problem with any
aspect of the book, and we will do our best to address it.
![](https://csdnimg.cn/release/download_crawler_static/9830648/bg14.jpg)
1
First Steps
In this chapter, we will cover the following:
f Introducing PostgreSQL 9
f Getting PostgreSQL
f Connecting to PostgreSQL
f Enabling server access to network/remote users
f Using graphical administration tools
f Using psql query and scripting tools
f Changing your password securely
f Avoiding hardcoding your password
f Using a connection service le
f Troubleshooting a failed connection
Introduction
PostgreSQL is a feature-rich general purpose database management system. It's a complex
piece of software, but every journey begins with the rst step.
We start with your rst connection. Many people fall at the rst hurdle, so we try not to skip
too swiftly past that. We move on quickly to enabling remote users, and from there to access
through GUI administration tools.
We also introduce the psql query tool, which is the tool used for loading our sample database,
as well as many other examples in the book.
For additional help, we include a few useful recipes that you may need for reference.
剩余359页未读,继续阅读
![azw3](https://img-home.csdnimg.cn/images/20210720083646.png)
![mobi](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/5bc836ea503d48cca1df2d8b1ee43e92_hktxt.jpg!1)
田伯光光
- 粉丝: 28
- 资源: 58
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 多模态联合稀疏表示在视频目标跟踪中的应用
- Kubernetes资源管控与Gardener开源软件实践解析
- MPI集群监控与负载平衡策略
- 自动化PHP安全漏洞检测:静态代码分析与数据流方法
- 青苔数据CEO程永:技术生态与阿里云开放创新
- 制造业转型: HyperX引领企业上云策略
- 赵维五分享:航空工业电子采购上云实战与运维策略
- 单片机控制的LED点阵显示屏设计及其实现
- 驻云科技李俊涛:AI驱动的云上服务新趋势与挑战
- 6LoWPAN物联网边界路由器:设计与实现
- 猩便利工程师仲小玉:Terraform云资源管理最佳实践与团队协作
- 类差分度改进的互信息特征选择提升文本分类性能
- VERITAS与阿里云合作的混合云转型与数据保护方案
- 云制造中的生产线仿真模型设计与虚拟化研究
- 汪洋在PostgresChina2018分享:高可用 PostgreSQL 工具与架构设计
- 2018 PostgresChina大会:阿里云时空引擎Ganos在PostgreSQL中的创新应用与多模型存储
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)