pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_dump -Fd fails to detect ENOSPC
4+ messages / 3 participants
[nested] [flat]

* pg_dump -Fd fails to detect ENOSPC
@ 2014-09-16 16:57 Justin Pryzby <pryzby@telsasoft.com>
  2014-09-17 15:26 ` Re: pg_dump -Fd fails to detect ENOSPC Justin Pryzby <pryzby@telsasoft.com>
  2014-09-17 16:16 ` Re: pg_dump -Fd fails to detect ENOSPC Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: Justin Pryzby @ 2014-09-16 16:57 UTC (permalink / raw)
  To: pgsql-bugs

pg_dump -Fc works correctly, but -Fd does not detect out of disk space
condition (even if --jobs is not specified).  Client and server version 9.3.5.

sudo lvcreate -L 1M -n full data
sudo mkfs.ext3 -j -m0 /dev/data/full
sudo mkdir /srv/full
sudo mount /dev/data/full /srv/full
sudo chown postgres: /srv/full
sudo -u postgres strace -xs3 pg_dump -t 'a*' ts -Fd -f /srv/full/x
[...]
write(4, "\x64\x63\x81"..., 1024)       = 1024
write(4, "\x40\x58\xd7"..., 15360)      = 7168
write(4, "\x8f\x71\xad"..., 8192)       = -1 ENOSPC (No space left on device)
write(4, "\x35\x33\xe7"..., 1024)       = 1024
write(4, "\xd7\xe4\x0e"..., 15360)      = -1 ENOSPC (No space left on device)
write(4, "\x35\x33\xe7"..., 1024)       = -1 ENOSPC (No space left on device)
write(4, "\x35\x33\xe7"..., 1024)       = -1 ENOSPC (No space left on device)
poll([{fd=3, events=POLLIN|POLLERR}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "YST"..., 24430, 0, NULL, NULL) = 24430
write(4, "\x35\x33\xe7"..., 1024)       = -1 ENOSPC (No space left on device)
write(4, "\x35\x33\xe7"..., 1024)       = -1 ENOSPC (No space left on device)
write(4, "\x35\x33\xe7"..., 1024)       = -1 ENOSPC (No space left on device)
[...]


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump -Fd fails to detect ENOSPC
  2014-09-16 16:57 pg_dump -Fd fails to detect ENOSPC Justin Pryzby <pryzby@telsasoft.com>
@ 2014-09-17 15:26 ` Justin Pryzby <pryzby@telsasoft.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Justin Pryzby @ 2014-09-17 15:26 UTC (permalink / raw)
  To: pgsql-bugs

Seems to be a simple unchecked return value...I'm testing with this, but won't
endeavor to propose a formal patch.

pg_dump.c
if (copybuf)
{
	int ret2;
	ret2=WriteData(fout, copybuf, ret);
	if (ret!=ret2) {
		exit_horribly(NULL, "error writing, (%d %d)\n", ret, ret2);
	}

	PQfreemem(copybuf);
}


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump -Fd fails to detect ENOSPC
  2014-09-16 16:57 pg_dump -Fd fails to detect ENOSPC Justin Pryzby <pryzby@telsasoft.com>
@ 2014-09-17 16:16 ` Tom Lane <tgl@sss.pgh.pa.us>
  2014-09-29 14:42   ` Re: pg_dump -Fd fails to detect ENOSPC Bruce Momjian <bruce@momjian.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2014-09-17 16:16 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-bugs

Justin Pryzby <pryzby@telsasoft.com> writes:
> pg_dump -Fc works correctly, but -Fd does not detect out of disk space
> condition (even if --jobs is not specified).  Client and server version 9.3.5.

I believe this was dealt with by Bruce in commit 14ea89366, which
will appear in 9.4.  Arguably that was a back-patchable bug fix, but
the patch seemed a bit large to risk back-patching.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump -Fd fails to detect ENOSPC
  2014-09-16 16:57 pg_dump -Fd fails to detect ENOSPC Justin Pryzby <pryzby@telsasoft.com>
  2014-09-17 16:16 ` Re: pg_dump -Fd fails to detect ENOSPC Tom Lane <tgl@sss.pgh.pa.us>
@ 2014-09-29 14:42   ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2014-09-29 14:42 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-bugs

On Wed, Sep 17, 2014 at 09:16:51AM -0700, Tom Lane wrote:
> Justin Pryzby <pryzby@telsasoft.com> writes:
> > pg_dump -Fc works correctly, but -Fd does not detect out of disk space
> > condition (even if --jobs is not specified).  Client and server version 9.3.5.
> 
> I believe this was dealt with by Bruce in commit 14ea89366, which
> will appear in 9.4.  Arguably that was a back-patchable bug fix, but
> the patch seemed a bit large to risk back-patching.

Yeah, that and the lack of complaints about the problem discouraged
backpatching this.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2014-09-29 14:42 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16 16:57 pg_dump -Fd fails to detect ENOSPC Justin Pryzby <pryzby@telsasoft.com>
2014-09-17 15:26 ` Justin Pryzby <pryzby@telsasoft.com>
2014-09-17 16:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2014-09-29 14:42   ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox