PostgreSQL

Moving local settings for pg_hba.conf and postgresql.conf out of PGDATA

One of the configuration aspects of FreeBSD I have long liked is the concept of default values which are overridden by the user. For example, /etc/defaults/rc.conf (see The /etc directory). The default values in this file can be overridden by the user with their preferred values in /etc/rc.conf (or /etc/rc.conf.local, and other locations if you so choose (search for rc_conf_files)). With that approach in mind, I wanted to do the same thing with […]

Moving local settings for pg_hba.conf and postgresql.conf out of PGDATA Read More »

I figured out why pg_dump was failing with PostgreSQL 15-16

In recent blog post, I outlined a problem I hit with pg_dump. Specifically, pg_dump was picking up and using ~/.pgpass with pg_dump from PostgreSQL 12-14, but with PostgreSQL 15-16, it was failing. In this blog post: FreeBSD 13.2 PostgreSQL server 12 / 16 PostgreSQL client 12-16 Bacula 9.6.7 Today we figured out why: $HOME. $HOME for the script was set to / In PostgreSQL < 15, the code used the database to determine

I figured out why pg_dump was failing with PostgreSQL 15-16 Read More »

pg_dump: error: connection to server failed: fe_sendauth: no password supplied

FYI, this problem has been solved and described in I figured out why pg_dump was failing with PostgreSQL 15-16. This morning I encountered this error message: In this post: FreeBSD 13.2 PostgreSQL 12.16 (server – pg02) PostgreSQL 16.1 (client – dbclone) See also While restoring my PostgreSQL database to a new FreeBSD server, I discovered the wrong database server in a configuration file. The backstory: dbclone dumps the bacula database hosted on pg02.

pg_dump: error: connection to server failed: fe_sendauth: no password supplied Read More »

PostgreSQL – convert a user to a role

Users and Roles in PostgreSQL are very similar. When I set up the FreshPorts database back in mid-2000, I was using PostgreSQL 7.0.3 (that’s my best guess based on my blog entry). I suspect roles were not available then and were introduced with PostgreSQL 8. I am positive someone will correct me if that’s wrong. I now have a need to convert a user into a role, then add users to that role.

PostgreSQL – convert a user to a role Read More »

PostgreSQL – logging to a file

These steps were carried out on FreeBSD 11.0 with PostgreSQL 9.6 (two of my favorite tools). I like logging. I like logging PostgreSQL. With logs, you can see what happened. Without, you can only guess. Setting up logging for PostgreSQL involves several parts, each of which must be completed or else I don’t get what I want. This is not a criticism of PostgreSQL. It’s a feature. I am documenting this because each

PostgreSQL – logging to a file Read More »

Have you never been to PGCon?

I remember a time when I’d never been to a conference related to my passions. Once I went, things changed. I realized that making strong working relationships with others who share my passion is important. Not only does this solidify the community of which you are a member, it also helps you personally. Every conference I have attended gave me a great idea for a current or upcoming project. Here are a few

Have you never been to PGCon? Read More »

pg_restore: [custom archiver] could not read from input file: end of file

I’ve been a fan of PostgreSQL since 2000 when I switched to it from MySQL. I wanted stored procedures and functions. I got that with PostgreSQL. I was used to having such features from my years working with other big databases such as DB2, Oracle, and Sybase. I’ve been moving towards using the custom format of pg_dump. In conjunction with that, I’ve been using pg_restore for testing those dumps. As part of my

pg_restore: [custom archiver] could not read from input file: end of file Read More »

Using compression with PostgreSQL’s pg_dump

I attended a few of the talks at PGCon 2013 last month. One talk, for which I took several notes and made a few choice tweets. The main one I’m following up on is using the -Fc option on pg_dump. It was during Magnus Haganders’ talk on PostgreSQL Backup Strategies that I posted that tweet. In the two weeks since that talk, I managed to do some testing. Let’s have a look at

Using compression with PostgreSQL’s pg_dump Read More »

Restricting IP addresses to specific databases

Sometimes, you don’t want just anyone talking to your database. In fact, sometimes, you don’t want anyone accessing your database except very specific applications. In this case, I am setting up about 20 databases, each one dedicated to a specific use, and to be accessed only from one IP address each. In this post, I’ll talk about how I first set this up with pg_hba.conf, and then how I altered it to be

Restricting IP addresses to specific databases Read More »

PGCon 2013 registration is now open

PGCon 2013 is coming up soon. We’ve had confirmation from EnterpriseDB that they be hosting a social event on the Thursday night. You’ll have heard about this party from 2012, seen the pictures, and wish you’d been there. This year, they are going back to the same venue again this year. Of course, in addition to the great social opportunities, we’re also bringing in some big-name speakers for the tutorials and talks. Do

PGCon 2013 registration is now open Read More »

Scroll to Top